You need to sign in to do that
Don't have an account?
Electron
Is there possible to specific how we trigger an APEX trigger?
I checked most example triggers, they works on the scenario, such as before insert, after update or something else.
Does it means, no matter what kind action we do, Salesforce will check all triggers that related to the object?
Is it low efficient, and will it slow the system running?
If yes, could we specific the trigger to specific field change?
I know we can detect the filed change by
If(field change)
Could we make same thing to limit trigger? or we needn't to do it.
Salesforce will check all triggers related to the object, as each of the triggers fires at a different point of the order of execution. The platform doesn't make a decision about whether to run the trigger or not - that is up to you to check if you need to proceed with your trigger based on the records being processed.
Your trigger code should ensure that it is not taking action unless it absolutely has to, by checking the field values that have changed for example.
All Answers
Hi,
You can try something like below, which will allow you to execute some code based on condition:
Salesforce will check all triggers related to the object, as each of the triggers fires at a different point of the order of execution. The platform doesn't make a decision about whether to run the trigger or not - that is up to you to check if you need to proceed with your trigger based on the records being processed.
Your trigger code should ensure that it is not taking action unless it absolutely has to, by checking the field values that have changed for example.
Hi Bob,
Thank you so much, you solve all my questions, it's great to have you in this community.