Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

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

The JavaScript is:

/006/e?retURL=%2F{!Contract.Id}&accId={!Contract.AccountId}&ctrcid={!Contract.Id}

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?

Thanks,

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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

share|improve this answer
    
Thank you! I changed it to a URL instead of having it execute JavaScript. –  Andy Hitchings 8 hours ago
    
@AndyHitchings No problem. Glad to help. –  martin 8 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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