You need to sign in to do that
Don't have an account?
Felicia Abramson - Bit9
Error Message on Apex Based Buttons
We have some buttons we want to put on every page layout (since that is the only reason why we have different page layouts on this one object), and the buttons are driven with Apex. The plan is to only allow users in certain profiles or with certain permission sets to click the buttons successfully. Right now when a user clicks the button and doesn't have the Apex class enabled for them, they recieve an ugly error message:
Is there any way we could customize this to show an error message like "Your account is not enabled for this functionality. Please contact the SFDC admins"?
Is there any way we could customize this to show an error message like "Your account is not enabled for this functionality. Please contact the SFDC admins"?
Andy Boettcher
You can use the {!User.Profile} field in your Javascript to help give a more graceful error - read up on another example here: http://salesforce.stackexchange.com/questions/28886/using-user-profile-merge-field-in-javascript-if-statement