Achieve your business goals faster by unlocking our Salesforce Cloud Services.
This variable returns a map of ids to the new versions of sObject records.
Note: This map is only available in before update, after insert, after update and after undelete triggers.
trigger ApexTrigger on Account (before update) {
// Only available in beforeUpdate, afterUpdate, afterInsert, afterUndelete Triggers
Map<Id,Account> nMap = new Map<Id,Account>();
nMap = trigger.newMap;
List<Contact> cList = [Select LastName from Contact where AccountId in :nMap.keySet()];
for(Contact c: cList)
{
Account a = nMap.get(c.AccountId);
c.MailingCity = a.BillingState;
}
update cList;
< < Previous
Next > >
The batch is going to start shortly. Fill the form given below to Register yourself now.
Fill the form below to get a Result
Fill the form below to get a demo of this course.
Online Salesforce Development Course is soon going to be launched. Please fill the form and we will notify you about the course.