You need to sign in to do that
Don't have an account?
Infinite trigger problem
Hey,
I have object X AND Y.When a record is created in X,the trigger creates same record in Y also update,delete,undelete and viceversa.This cause infinite trigger for me.
I have seen a @future method in web and understood how its handle the problem but @future method works with static methods and " Methods with the future annotation cannot take sObjects or objects as arguments.
I pass trigger.new as argument and take it as a list to insert as a record in my method.In static @ future examples,I have seen that they pass trigger.new's id's as set<id> and do their job. @Future method accepts the sets as parameter.I don' t know the way of inserting a new record by passing trigger.new as id.I know that I have to pass it as an object.So I couldn't find the way of preventing infinite trigger.Can you help me with this?
Regards.
The usual means of accomplishing this is through a static variable:
All Answers
The usual means of accomplishing this is through a static variable: