You need to sign in to do that
Don't have an account?

get value of a column before and after update of row using trigger
Hello,
I want to get the value of a column before and after the update.
In the above trigger i get the value of Column1__c after update.
I assume that doing below changes will get me value before update
I want to detect values in a single trigger that what is the value befpre update and after update.
Is there any way to do it.
I want to get the value of a column before and after the update.
trigger test on Custom_Object__c (after insert, after update, before delete) { List <Custom_Object__c> item = new List <Custom_Object__c>(); for (Custom_Object__c w: trigger.new) { String Column1 = w.Column1__c; } }
In the above trigger i get the value of Column1__c after update.
I assume that doing below changes will get me value before update
trigger test on Custom_Object__c (before insert, before update, before delete) { }
I want to detect values in a single trigger that what is the value befpre update and after update.
Is there any way to do it.
You can get the old values before update by getting it from trigger.oldmap.
Sample code:
Regards,
Le
All Answers
Thanks,
Karanraj
You can get the old values before update by getting it from trigger.oldmap.
Sample code:
Regards,
Le