You need to sign in to do that
Don't have an account?
SS Karthick
Regarding Trigger
Hi Everyone,
Can anyone tell me what is trigger.new, trigger.old and trigger.newmap ,trigger.oldmap
Trigger.oldmap.keyset with sample example
Thanks in advance
Karthick
Can anyone tell me what is trigger.new, trigger.old and trigger.newmap ,trigger.oldmap
Trigger.oldmap.keyset with sample example
Thanks in advance
Karthick
Trigger.new == list of new versions of Sobjects
Trigger.old==list of old versions of Sobjects
Trigger.newMap == Map of Id and new version of Sobject.
Trigger.oldMap==map of id and old version of SObject
=================================
I am modifying one field called country in Account object from USA to INDIA.
Now trigger.new will contain all the fields of that account where the value of country field as INDIA and trigger.old will contain USA.
Trigger.newMap will contain --- accountid and all the fields of that account with fieldvalue of country as USA.
trigger.oldmap will contain -- accountid and all the fields of that account with fieldvalue of country INDIA
All Answers
Trigger.new == list of new versions of Sobjects
Trigger.old==list of old versions of Sobjects
Trigger.newMap == Map of Id and new version of Sobject.
Trigger.oldMap==map of id and old version of SObject
=================================
I am modifying one field called country in Account object from USA to INDIA.
Now trigger.new will contain all the fields of that account where the value of country field as INDIA and trigger.old will contain USA.
Trigger.newMap will contain --- accountid and all the fields of that account with fieldvalue of country as USA.
trigger.oldmap will contain -- accountid and all the fields of that account with fieldvalue of country INDIA
Rather than helpign for samples, it would be meaningfull if you express what you don't understand and why, so the answer could be more specific to helping you out.
best good morning quotes (https://lovequotes.co.in/good-morning-quotes/) and cute good night quotes (https://lovequotes.co.in/good-night-quotes/)