+ Start a Discussion
petec@i2isyspetec@i2isys 

conditional logic on button

Hello, I have a custom button with this conditional logic:
if('{!User.ProfileId}'!=='00e40000000zCOY')
{
window.alert("You do not have permission to send survey");
}
else
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
}