+ Start a Discussion
Charni WigginsCharni Wiggins 

Syntax error for simple custom button with link

Hi all,

I can't figure out why I have a syntax error for the following custom button, I just want it to have a link if the users profile name contains the word "Manager", and if not then have no link. (if there is another way to restrict buttons via a profile please let me know)


{!IF( CONTAINS({!$Profile.Name}, "Manager" ) , /apex/echosign_dev1__AgreementTemplateProcess?masterId={!Contact.Id}&templateID=a8r0Y000000XadDQAS, 0)}

{!$Profile.Name}, is what is highlighted when I click Check Syntax. 

Thank you in advance! 
Narender Singh(Nads)Narender Singh(Nads)
Hey Charni,
Try this

{!IF( CONTAINS($Profile.Name, "Manager" ) , '/apex/echosign_dev1__AgreementTemplateProcess?masterId=Contact.Id&templateID=a8r0Y000000XadDQAS', '0')}

Let me know if it helps.
Alain CabonAlain Cabon

Don't repeat   {!  in the same formula.

{! IF( CONTAINS($Profile.Name, "Manager" ) ,
"/apex/echosign_dev1__AgreementTemplateProcess?masterId=" + Contact.Id + " &templateID=a8r0Y000000XadDQAS", 0) }