0

Client currently has a plain HTML form on their website that submits data to a separate results page on their website. The entire website is not secure (HTTP). Client wants a custom button in Salesforce Lightning Experience to submit account information to this results page.

I've built a simple Visualforce page to pull the account data and added some Javascript to submit the form, but when I click the custom button in Lightning I'm getting a security error in the Javascript console:

Refused to frame 'http://scan.upsource.com/scan/results' because it violates the following Content Security Policy directive: "frame-src https: mailto:"

My question: If they migrate their website to HTTPS, then will this form submission be allowed?

  • You may want to make HTTP callout via apex here rather than VF posting the form or the other alternative is to embed the form inside lightning component framework and make a callout .Hope this helps – Mohith Shrivastava Apr 2 '16 at 1:29
  • Thanks, I didn't think a callout won't work because I want to redirect to the page, but now I'm thinking I could include the form data as a GET action on the page reference for the redirect. I'll give that a try. – David Cheng Apr 4 '16 at 14:41
0

I added a target="_blank" attribute to the form tag in the VF page and that solved the problem.

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.