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
Leonard SilonLeonard Silon 

Trigger firing 3x when should only fire once

User-added image
This is the code firing multiple times when the oppty stage is changed to closed won. At the same time the oppty is marked closed one, I have potentially two WFRs firing. One WFR checks a date field. If that date field is blank, then it auto populates it with a calculated date. The second WFR fires if the date field changes and just copies that date adding one day to it.

Those two WFRs firing makes the trigger fire 2 more times. What can be changed int eh trigger to make it only fire once when the oppty is changed to closed won the first time. Seems there needs tob e an ISCHANGED clause but I do not know how to add that.
Best Answer chosen by Leonard Silon
Vinoth Vijaya BaskerVinoth Vijaya Basker

Hi Leonard, 

Please click the below link which contains the solution to stop Recursive Trigger, 
https://help.salesforce.com/apex/HTViewSolution?id=000133752&language=en_US (https://help.salesforce.com/apex/HTViewSolution?id=000133752&language=en_US)

Hope it helps. 

Thanks,
Vinoth