2

All -

I am trying to create a custom button for the Sales console. This button is calling a specific E-Mail Template and prepopulating data.

I know how to leverage the JavaScript for Custom Buttons that bring up web pages or links for the Salesforce Console, but when I try to combine that functionality with the JavaScript to auto select a template for e-mail I get the following error:

Unexpected token ILLEGAL

Here is my code......what am I missing here?

srcUp('
     location.replace('
            /email/author/emailauthor.jsp?retURL=/{!Case.Id}&p3_lkid={!Case.Id}&rtype=003&p2_lkid={!Case.ContactId}&template_id=00XG0000001bHA9/
     ');
');
  • 2
    I'm exceptionally sure you can't have a newline in a literal string like this. – sfdcfox Apr 15 '15 at 16:34
  • Are you including the integration.js script? {!REQUIRESCRIPT("/support/console/33.0/integration.js")} – Daniel Hoechst Apr 15 '15 at 16:36
1

Try using following:-

srcUp("/email/author/emailauthor.jsp?retURL=/{!Case.Id}&p3_lkid={!Case.Id}&rtype=003&p2_lkid={!Case.ContactId}&template_id=00XG0000001bHA9/");

0

Try to change with this:

srcUp("
     location.replace('
            /email/author/emailauthor.jsp?retURL=/{!Case.Id}&p3_lkid={!Case.Id}&rtype=003&p2_lkid={!Case.ContactId}&template_id=00XG0000001bHA9/
     ');
");
  • Unfortunately this does not solve it, same error – J.P. Blonshine Sep 26 '14 at 19:08

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.