You need to sign in to do that
Don't have an account?
AlecS
Check old value of sobject
Within this code, I want to check what's the OLD value of the field Status. This code gives me this error message:
Error: Compile Error: Method does not exist or incorrect signature: [LIST<Contract>].get(String) at line 4 column 70
I know that this is not a complete code - I just need someone to look at this part of the code and tell me how can I quickly check what is the old value of con.Status.
How can I fix this?
for(Contract con : trigger.new){ if(con.Contract_Years__c != null && trigger.old.get(con.Status) != 'Active')
Thank you.
Hi AlecS,
You should reference the map instead of list.
Note that trigger old is only available in update and delete events.
-Hengky-
All Answers
try this.
Hi AlecS,
You should reference the map instead of list.
Note that trigger old is only available in update and delete events.
-Hengky-
Perfect, it worked!
Thanks.