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

Update a checkbox on Account after update
I have created a checkbox SendToSAP on account, which should be 'true' when a record gets created or every time it gets updated. I have set the default value of flag to true and written a trigger on account to set it to true after update.
But the problem is when i am trying to make this flag 'false' through my apex code the trigger is again setting it back to true. so i am unable to set my flag to 'false' in any case.
Can anyone suggest me the workarround for this problem.
Thanks in Advance!
But the problem is when i am trying to make this flag 'false' through my apex code the trigger is again setting it back to true. so i am unable to set my flag to 'false' in any case.
Can anyone suggest me the workarround for this problem.
Thanks in Advance!
Take any other check box field and update that field as true via your apex code and check for that field in trigger .
if(SendToSAP==false && Newfield==false){
update the SendToSAP as true;
}
Hope this will helps you.
Thanks,
Shiva
try to use Recursive functionality.
Please go through the follwing link.
https://help.salesforce.com/apex/HTViewSolution?id=000133752&language=en_US
Thanks.