You need to sign in to do that
Don't have an account?
Nong
How to capture field changing in Trigger
Dear All,
I am just the beginner on the APEX and I have the problem as I don't know the APEX code in Trigger to capture if user has changed field Stage in Opportunities or not .
Could you please advise and thank you very much in advance for you help.
Regards
Anong
You can use
for(Opportunity o : Trigger.New){
if(Trigger.oldmap.get(o.id).Stagename != o.stagename){
//write your code
}
}
All Answers
You can use
for(Opportunity o : Trigger.New){
if(Trigger.oldmap.get(o.id).Stagename != o.stagename){
//write your code
}
}
Dear Srini,
Thank you very much for your help, it works!
Best Regards
Anong