You need to sign in to do that
Don't have an account?
Nish321
Custom button calling a trigger
I have a scenario where i'm auto populating the values using javascript button (which further invokes an apex class). Now the real problem is when these fields are updated, it is invoking a trigger due to update operation. Is there a way to prevent this? In another words, Is there a way to bypass the trigger if the button is clicked?
What you can do is create a context variable in order ot know that the action comes from the button and then, do not go inside the update trigger code. Something like:
Also, remind you that JS buttons are not supported in Lightning Experience so be sure there is no other way to solve this problem in Classic UI that also works in LEX.