You need to sign in to do that
Don't have an account?
randombard
Test if old value was blank
HI All,
I have had a search arround but coulnt find anything.
I want to test if a field was previosly blank and now is not then if its not blank execute code. i have everything for if its not blank but i cant work out out to test if it was previosly blank.
do I need to make use of trigger.old?
Thanks
R
Seem to have got it with
Account OLDA = trigger.oldMap.get(A.ID);
then reference the filed I want to test with OLDA.fieldtotest
please let me know if I could do this better.
R
Hi,
I think this is fine; you will get the previous values (old values) from trigger.old or trigger.oldmap.
If in this way you can refer the field what you want then it is fine.