+ Start a Discussion

recursive trigger call

So I have a trigger that takes two fields in a contact (one custom and one standard) and combines them to fill out a custom field in the same contact. The problem is, I can't use it because the trigger has to run before/after update/insert and all that. This gives me a recursive call, because once the contact is saved, the trigger tries to update it, which calls the trigger again, and so on. Any way I can fix that? All ideas would be helpful. Thanks!!

Shashikant SharmaShashikant Sharma

First of all you should put an entry criteria to your trigger so that if your trigger gets executed again your criteria will not be matched. That is the best solution for your problem. You can also use a static variable to control recursive trigger.



Entry criteria : 


for static