+ Start a Discussion
chandu kumarchandu kumar 

trigger self reference error


I have a scenario,that in account object there are two fields 1>status:checkbox
                                                                                       2>status range:process,final
i have wrote a trigger on on account object that when i checked the checkboxthe status range field shoud be complete otherwise incomplete. but if i try to update account records thetriggers are firing everytime. iwant to avoid it.how?
apex sfdevapex sfdev
You are operating on a same record and not using different objects, In such a case use formula field to update the range field like this,

   status range='complete';

don't forget to deactivate the trigger.