You need to sign in to do that
Don't have an account?
Onclick Javascript Help
I'm trying to implement an OnClick Javacript Button to only allow users with a certain profile to use the button. However, I keep getting the following error. Unterminated String constant.
Any help would be appreciated.
Any help would be appreciated.
if("{!User.ProfileId}" = "00e30000000tnOY") { alert("Nice try, think again."); } else{ window.location = "/006/e?retURL={!Account.Id} &accid={!Account.Id} &RecordType=012a0000001ZSiy &ent=Opportunity&opp3="Opportunity" &opp11="New" &opp9={!TODAY()+30}"; }
If it resolves your problem, mark this as an answer for benefit of others.
It seems that your else block is creating issue
Try above code .
Thanks !