Every once in a while CTAs will fire which do not assign the correct assignee. Here is the script to update them
List<JBCXM__CTA__c> ctasToUpdate = [SELECT CreatedDate,Id,JBCXM__Account__c, Name, JBCXM__Account__r.OwnerID,JBCXM__Assignee__c,JBCXM__Type__c, JBCXM__Source__c FROM JBCXM__CTA__c where JBCXM__Source__c = 'Rules' and Name = 'CTA: Declining App Trend Two Weeks in a Row' and createddate = LAST_N_DAYS:2 and JBCXM__Assignee__c = '005G0000002efmLIAQ' order by CreatedDate desc limit 500];
for(JBCXM__CTA__c oneCTA: ctasToUpdate){
oneCTA.JBCXM__Assignee__c = oneCTA.JBCXM__Account__r.OwnerID;
}
update ctasToUpdate;
Search This Blog
Tuesday, August 4, 2015
Tuesday, July 28, 2015
Workbench uploading Dates
To upload Salesforce Data using workbench you need to make sure that the dates are in the proper format: yyyy-mm-dd. This one threw me for a loop. Just format Excel to use this date format instead of the format that it defaults to.
Monday, July 13, 2015
Salesforce Date to Date/Time Conversion
=TEXT(A2,"mm/dd/yyyy"), first convert date to full Date
=CONCATENATE(D2,"T00:00:00.000GMT-07:00"), then add on the time component.
=CONCATENATE(D2,"T00:00:00.000GMT-07:00"), then add on the time component.
Monday, July 6, 2015
Lessons learned
I just keep falling for Javascript. It really feels like the coolest language, and I love programming in it. I'm just not super duper good at programming in general. Today I learned a few of my limitations. I don't fully understand why people organize the data in the way they do. Perhaps my brain just doesn't think on the same plane as the geniuses out there or what, but there is lots of code written that frankly I just don't understand. I don't understand why they had to do it the way they did. What makes their way so robust? Or is that just how they think about solving problems?
I worked on the Salesforce endpoint today on how we will receive the api from Prosper that we need to. It was really fascinating how quickly the time flew when I was concentrating on it. Before I knew it I looked up and the time was 5:00. Programming is definitely my favorite thing. The time flies. Perhaps I need to go back and get a CS degree so that I can learn these skills better.
I worked a lot on the json piece of putting together the packages during the exchanges. There is lots of stuff that goes into them and we need to create both endpoints exactly right otherwise they won't understand the exchange. The problem that I am running into is the decision between dynamic code v hard coded values. I would like a fair few of the features to be dynamic, but I can't think like that. That is considered pre mature optimizing. I need to put in the blank values and then fill in the dynamics after the fact.
A project that keeps pulling me in is the ability to display the metadata in an easy to user interface to be able to track down Salesforce components. I would like to have a gui in front of me of bubbles which display each component. If you click on one of the components it will zoom into the bubble and display new bubbles that tie to that one. Basically, I want a quick way of being able to see all dependencies very quickly, and have it auto generate nightly so that it is always up to date. Perhaps I can take a step back and create a batch job which automatically updates that on the server nightly. Then I can just pull it down every day so that it is the most up to date that it can be. Perhaps that is the way to go, then worry about the fancy tidbits after the fact.
I worked on the Salesforce endpoint today on how we will receive the api from Prosper that we need to. It was really fascinating how quickly the time flew when I was concentrating on it. Before I knew it I looked up and the time was 5:00. Programming is definitely my favorite thing. The time flies. Perhaps I need to go back and get a CS degree so that I can learn these skills better.
I worked a lot on the json piece of putting together the packages during the exchanges. There is lots of stuff that goes into them and we need to create both endpoints exactly right otherwise they won't understand the exchange. The problem that I am running into is the decision between dynamic code v hard coded values. I would like a fair few of the features to be dynamic, but I can't think like that. That is considered pre mature optimizing. I need to put in the blank values and then fill in the dynamics after the fact.
A project that keeps pulling me in is the ability to display the metadata in an easy to user interface to be able to track down Salesforce components. I would like to have a gui in front of me of bubbles which display each component. If you click on one of the components it will zoom into the bubble and display new bubbles that tie to that one. Basically, I want a quick way of being able to see all dependencies very quickly, and have it auto generate nightly so that it is always up to date. Perhaps I can take a step back and create a batch job which automatically updates that on the server nightly. Then I can just pull it down every day so that it is the most up to date that it can be. Perhaps that is the way to go, then worry about the fancy tidbits after the fact.
Thursday, May 7, 2015
Little bits of Truth
While going throughout the day you learn little tid bits of information. How do you keep them all straight so that you can recall them later?
I didn't migrate one of our domain names to Route 53 because then we would have to implement an S3 bucket on top of Route 53, thus decreasing our Up time because of the duel nature of Route 53 and S3 instead of just keeping the domain forwarding in Godaddy. Tricky business, but if we could measure the down time between the two methods then we could make a better decision.
I didn't migrate one of our domain names to Route 53 because then we would have to implement an S3 bucket on top of Route 53, thus decreasing our Up time because of the duel nature of Route 53 and S3 instead of just keeping the domain forwarding in Godaddy. Tricky business, but if we could measure the down time between the two methods then we could make a better decision.
Friday, April 17, 2015
Acronyms
KPI - Key Performance Indicator
NPS - Net Promoter Score
NPS - Net Promoter Score
Thursday, March 26, 2015
Salesforce Date/Times to Excel Date and Time
I needed to do a check between rollup helper and Salesforce Native Rollups. To get around a few problems I had to use the following algorithm to convert Salesforce Date/Times to Excel Dates and Times:
B1 = SUBSTITUTE(SUBSTITUTE(A1,"T"," "),".000Z","")
C1 = DATEVALUE(B1) + TIMEVALUE(B1)
I first exported the two record types from Salesforce using Workbench.
I grouped the two sheets into one.
I added columns on all date times using the above algorithm.
I then ran pivot tables on the data.
B1 = SUBSTITUTE(SUBSTITUTE(A1,"T"," "),".000Z","")
C1 = DATEVALUE(B1) + TIMEVALUE(B1)
I first exported the two record types from Salesforce using Workbench.
I grouped the two sheets into one.
I added columns on all date times using the above algorithm.
I then ran pivot tables on the data.
Subscribe to:
Posts (Atom)