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

Best practises to skip the recursive trigger logic in batch job
I have 2 objects (Contact and SLM) both has their AFTER triggers. On each triggers we have that recursive trigger logic which we set the static variable at the end to avoid the recurssion.
I have a batch class, which is updating the contact record and update the SLM records in a single transaction. While doing that operation, I see the after update trigger for Contact object is working good and at the end it set the Static variable to true. When the SLM update happens, I am not seeing the SLM trigger is executing, may be because the static variable is set as true.
I need this recursive check in both objects trigger because we have lot other Workflow and process builder to update both object.
How to handle this? any thoughts. Thanks
I have a batch class, which is updating the contact record and update the SLM records in a single transaction. While doing that operation, I see the after update trigger for Contact object is working good and at the end it set the Static variable to true. When the SLM update happens, I am not seeing the SLM trigger is executing, may be because the static variable is set as true.
I need this recursive check in both objects trigger because we have lot other Workflow and process builder to update both object.
How to handle this? any thoughts. Thanks
https://github.com/kevinohara80/sfdc-trigger-framework
Regards,
MQ
Let me know your thoughts...your use case is pretty interesting..
Best,
Nithesh.