A similar issue has been reported by a user from past- https://salesforce.stackexchange.com/questions/138247/how-to-prevent-process-builders-to-fire-triggers-on-an-update according to which, the solution is using some custom settings or using a helper class that would enable the execution of the trigger one time and that would become inactive after the execution. This would guarantee that your trigger is only being executed once.
Detailed code mentioned in the above link. It is also worth checking the order of execution mentioned in https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm to design your implementation accordingly and to avoid hitting governor limits.
Related posts: https://salesforce.stackexchange.com/questions/296307/recursive-record-update-by-flow https://salesforce.stackexchange.com/questions/252558/recursion-in-trigger-and-process-builder https://salesforce.stackexchange.com/questions/256444/prevent-recursion-cpu-limit-in-process-builder https://salesforce.stackexchange.com/questions/317560/process-builder-and-flow-resulting-in-recursion
If this information helps, please mark the answer as best.Thank you
A similar issue has been reported by a user from past- https://salesforce.stackexchange.com/questions/138247/how-to-prevent-process-builders-to-fire-triggers-on-an-update according to which, the solution is using some custom settings or using a helper class that would enable the execution of the trigger one time and that would become inactive after the execution. This would guarantee that your trigger is only being executed once.
Detailed code mentioned in the above link. It is also worth checking the order of execution mentioned in https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm to design your implementation accordingly and to avoid hitting governor limits.
Related posts: https://salesforce.stackexchange.com/questions/296307/recursive-record-update-by-flow https://salesforce.stackexchange.com/questions/252558/recursion-in-trigger-and-process-builder https://salesforce.stackexchange.com/questions/256444/prevent-recursion-cpu-limit-in-process-builder https://salesforce.stackexchange.com/questions/317560/process-builder-and-flow-resulting-in-recursion
If this information helps, please mark the answer as best.Thank you
As per best practice you should only keep one approach here. See if you could manage the field update from Process Builder to work in a Trigger where same field is getting updated.
Detailed code mentioned in the above link. It is also worth checking the order of execution mentioned in https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm to design your implementation accordingly and to avoid hitting governor limits.
Related posts:
https://salesforce.stackexchange.com/questions/296307/recursive-record-update-by-flow
https://salesforce.stackexchange.com/questions/252558/recursion-in-trigger-and-process-builder
https://salesforce.stackexchange.com/questions/256444/prevent-recursion-cpu-limit-in-process-builder
https://salesforce.stackexchange.com/questions/317560/process-builder-and-flow-resulting-in-recursion
If this information helps, please mark the answer as best.Thank you
All Answers
Detailed code mentioned in the above link. It is also worth checking the order of execution mentioned in https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm to design your implementation accordingly and to avoid hitting governor limits.
Related posts:
https://salesforce.stackexchange.com/questions/296307/recursive-record-update-by-flow
https://salesforce.stackexchange.com/questions/252558/recursion-in-trigger-and-process-builder
https://salesforce.stackexchange.com/questions/256444/prevent-recursion-cpu-limit-in-process-builder
https://salesforce.stackexchange.com/questions/317560/process-builder-and-flow-resulting-in-recursion
If this information helps, please mark the answer as best.Thank you
As per best practice you should only keep one approach here. See if you could manage the field update from Process Builder to work in a Trigger where same field is getting updated.
Thanks,
Ashvin