I want to prevent users from being redirected when they click a button and picklist value is false.
I have a custom button on Opportunity related list on account. If the value of Account type is 'OLD', users should get an error message and not redirect the page. If it's anything else, they can be redirected opportunity.
What is the best way of going about this?
Thanks,
-Kenn
Best Answer
In the custom button, do something like this:
For a picklist, you can use ISPICKVAL:
Make sure the type is set to "Execute JavaScript".