We have a custom javascript button on the quotes object in our org that has been working for several months that someone has noticed today is not working.

I'm not sure if there was an update that broke it or what day exactly it stopped working. I'm hoping someone has an idea of where I can even begin to look.

Here's the code:

javascript:location.href= 'mailto:emailaddress@ourdomain.com?SUBJECT='+ escape("{!Quote.Name}")+' - '+ escape("{!Quote.Contact_s_Account__c}") + '&BODY=Please convert ' + escape(location.href)+ ' into a proposal and send it to the email address on the quote.  Thanks!';

Using developer tools in chrome, I see this error after I click the javascript button:

presence: onFailure in event parser ={"status":-5,"statusText":""}page load happens value=true           umps1w4.salesforce.com/umps/UMPSWidget_184/js/dist/umps-min.js?cflag=184.36:14 presence: onFailure in event parser ={"status":-5,"statusText":""}page load happens value=true

I changed my code to something simple:

javascript:location.href= 'mailto:emailaddress@ourdomain.com?SUBJECT='hello' 

and got this error in the developer tools in chrome:

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.

This lead me to the conclusion that I'm having XSS issues. I do remember a SF update not too long about about protecting against XSS issues. I guess I'll have to figure out a different way to implement this functionality.

  • Did you ever find a solution for this ? – Samuel De Rycke Dec 10 '15 at 10:31
  • @SamuelDeRycke I ended up just pointing the user to a SF template rather than kicking them out to a new gmail email. Here's the code I used: /_ui/core/email/author/EmailAuthor?p3_lkid={!Quote.Id}&template_id=00Xd0000000Edtm&p24=support@ourdomain.com&retURL=%2F{!Quote.Id} – rodneyaz Dec 11 '15 at 18:07

Your Answer

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

Browse other questions tagged or ask your own question.