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
Gadivemula Krishna 6Gadivemula Krishna 6 

Can Anyone give One scenario Where we actually Use Trigger.isExecuting ?

Best Answer chosen by Gadivemula Krishna 6
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Krishna,

This is used to check if the code is executed from the trigger or not. There might be scenerios where the method should be executed when it is run by trigger or visual force page call but some part of code should not be excuted while running trigger in that method. In this scenerio we can use and check it.

Let me know if you need any details.

If this solution helps, Please mark it as best answer.

Thanks,
 

All Answers

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Krishna,

This is used to check if the code is executed from the trigger or not. There might be scenerios where the method should be executed when it is run by trigger or visual force page call but some part of code should not be excuted while running trigger in that method. In this scenerio we can use and check it.

Let me know if you need any details.

If this solution helps, Please mark it as best answer.

Thanks,
 
This was selected as the best answer
Gadivemula Krishna 6Gadivemula Krishna 6
Ok Could you please share any example   of apex class and trigger.isExecuting if you have any. That will help me top understand practically,So i can do handson aswell. Thank you in Advance :)