function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MMuneeeMMuneee 

how to cause recursive trigger ?how to achieve it.explain to me with a sample program?

Balaji BondarBalaji Bondar
This is a simple way to create this error via a trigger on an object called Test__c...

Suppose there is a scenario where in one trigger perform update operation, which results in invocation of second trigger and the update operation in second trigger acts as triggering criteria for trigger one.
trigger TestTrigger on Test__c (before insert) {
    insert new Test__c();
}

Refer the solution  to avoid recursion at : http://developer.force.com/cookbook/recipe/controlling-recursive-triggers


Important :
If this is what you were looking for then please mark it as a "SOLUTION" or You can Click on the "Like" Button if this was beneficial for you.