Problem: a random user should be selected from a queue to assign a lead. The number of users in the queue is unknown and calculated on the go (variable UserCount).

Implications: multiple records may enter the flow at the same time, so the random number should be generated for those (and the timestamp can't be used to generate the random number).

Solution: Use date with the combination with data that came with a record to generate a random number. The seed (the starting number to generate a random(~er) number) is a concatenation of date and length of the Lead Name (variable getLead.Name)

Implication: we don't know the span of a random number (max and min), so, we can't normalize the output.
Solution: use last digit of the random number -> this normalizes the span [0-9]

Final solution:

			Read more »



<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false" >
  <entity name="contact" >

    <attribute name="contactid" />
    <attribute name="hsl_forecordid" />
    <attribute name="fullname" />
    <attribute name="firstname" />
    <attribute name="lastname" />
    <attribute name="emailaddress1" />
    <attribute name="hsl_legacyid" />
    <attribute name="hsl_id18salesforcelegacy" />

Brand Preferences



<fetch version="1.0" output-format="xml-platform" mapping="logical ... Read more »

WHERE Brand_Name__c != 'Etude' AND RecordTypeId = '012E000000066VlIAI' AND LastModifiedDate < 2020-03-03T00:00:00.000+0000

Select LastModifiedDate from Contact WHERE LastModifiedDate < 2020-03-03T00:00:00.000+0000 LIMIT 2

FROM Contact where RecordTypeId = '012E000000066VlIAI' AND (Brand_Name__c = '19 Crimes' OR Brand_Name__c = 'Acacia' OR Brand_Name__c = 'Cavalieredoro' OR Brand_Name__c = 'Cellar360' OR Brand_Name__c = 'Chateau St. Jean' OR Brand_Name__c = 'Embrazen' OR Brand_Name__c = 'Main & Vine' OR Brand_Name__c = 'Maison De Grand Esprit' OR Brand_Name__c = 'Meridian Vineyards' OR Brand_Name__c = 'Penfolds US' OR Brand_Name__c = 'St. Clement' OR Brand_Name__c = 'The Cellar' OR Brand_Name__c = 'The Walking Dead Wine' OR Brand_Name__c = 'Treasury Wine Event')


Select Id FROM Club_Member__c Where Club__r. ... Read more »

list fixCity = new list([Select Id, City__c from Contact where City__c like '%,%' LIMIT 2);

for (Contact c: fixCity ) {
    Set<String> city = new Set<String>();

Just checking in to see how things are going on your side and to also confirm back to you that we will have our team ready, and to call out some items we need in order to prepare.   Amy and I had a quick planning session and here are our asks:


  • Given our staffing and availability we would like to do our testing on Monday ***  ** – we have fully open calendars (except for 1:00-1:30pm) and would allow us to completely focus on getting done in one day.
  • How much time will you need to Demo to our team to get them prepared for UAT? We would like to get that on calendars for 3/11 now, to block out time for the overview as well as testing. ... Read more »

We don’t really see it as a technical issue around the central profile – it’s more just making sure the team thinks through the customer journey and whether that corporate profile level is really what *** wants, or they’re the decision is just because *** doesn’t support multiple brands natively without incurring another large license fee.


We can support either option no problem, on *** side, there’s a few complications around understanding what’s brand specific vs corporate profile, and then how to message the customer to let them know when they sign up on ***, they’re actually signing up on a number of other sites as well. These are not insurmountable though and we can work within the constraints.


I just want it make it clear tha ... Read more »

While my initial emails have laid out the basics, I feel like my approach is insufficient. Perhaps a more formal kickoff meeting describing the project details to the brand teams that will be specifically impacted would help? I figure that is better for you to decide. 

I personally had a great break, switching off from work and enjoying time with my extended family, teaching the kids to swim, enjoying some wine and getting stuck into some DIY jobs (1 new fence and a half renovated laundry). Also the train line shutdowns here this week are great incentive to get support my new years resolution to spend more time on my bike and improve my fitness - feel free to give me a push back onto two wheels if you catch me on the train. I'm feeling refreshed and energised and ready to get stuck into our ambitious goals for 2019 and make sure it's successful for us all.

Tangible outcomes, such as results, costs saved, or time reduced.

split a single account into individual contacts

list tweContact = new list([Select Id, FirstName, LastName, AccountID from Contact where AccountID = '001E000001cxEiGIAU' LIMIT 10]);
list newAccounts = new list();
for (Contact c: tweContact ) {
 Account a = new Account(Name=c.FirstName+ ' '+c.LastName);
 insert a;
 c.AccountID = :a.Id;
 update c;

1 2 3 »