+ Start a Discussion

conditional logic on button

Hello, I have a custom button with this conditional logic:
window.alert("You do not have permission to send survey");
blah blah blah

This looks to make sure the person pushing the button has the right profile.  It works fine but now I want to add another profile that would be allowed.  So if not profile 1 OR not profile 2, fire the window alert, else go ahead and do something.

If tried multiple things but can't get it to work.  Any suggestions would be appreciated.
Salesforce DeveloperSalesforce Developer
if('{!User.ProfileId}'!='00e40000000zCOY' && '{!User.ProfileId}'!='2nd profile I’d ’){
// your code