- Ranchi, Jharkhand, India
- hr@nubetree.com
This variable returns a map of ids to the new versions of sObject records.
This map is only available in before update, after insert, after update and after undelete triggers.
trigger ApexTrigger on Account(before update
{
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;
}
We design tailored systems that grow with your business, ensuring flexibility, efficiency, and long-term success.
Our company has a team of certified experts with years of experience and a strong passion for technology.
Stay connected for the latest updates, tips, and exclusive content!
Copyright 2024. All rights reseved by NubeTree.com