Skip to content

Instantly share code, notes, and snippets.

@winniecluk
Last active April 19, 2017 23:32
Show Gist options
  • Save winniecluk/7ba9f6432d7d052cab2362782feabf97 to your computer and use it in GitHub Desktop.
Save winniecluk/7ba9f6432d7d052cab2362782feabf97 to your computer and use it in GitHub Desktop.
if (pmrList.size() > 0){
upsert pmrList;
// find event from eventList that has its id stored in pmr\'s account_c field
// store pmr id in event\'s pmr id field
for (PM_R_Treatment__c pmr : pmrList){
for (Event e : eventList){
if (e.AccountId == pmr.Account__c){
e.PMRId__c = pmr.Id;
}
} // closes event for loop
} // closes pmr for loop
} // closes the if for pmrList
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment