I have a custom Opportunity list button. I have placed this button on the Opportunity related list on the contract record.

The JavaScript is:


I am returning this error when I click the button:

A problem with the OnClick JavaScript for this button or link was encountered: Syntax error in regular expression

I don't see anything wrong with this snippet. Can you advise?



You made the button the wrong type. You should be redirecting to a url rather than executing Javascript.

  • Thank you! I changed it to a URL instead of having it execute JavaScript. – Andy Hitchings Sep 14 '15 at 10:24
  • @AndyHitchings No problem. Glad to help. – martin Sep 14 '15 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.