We are implementing SFDC and trying to integrate with a third party (different team within same organization) application using Canvas approach. This third party application is being currently used as a shared services within the organization. The application is built on AngularJS and uses windows javascript postMessage to communicate with the parent application.

When we try to consume window.parent.postMessage from this third application in SFDC we don't get any detail about the message. In fact we cannot even look at the onMessage event of window in SFDC.

Has this been done in past? What is the equivalent of windows.addEventListener("message", function(){}); in SFDC?

The recommendation is to include SFDC canvas SDK into this third party application which is not possible as it will tightly couple this third party application with SFDC.

1 Answer 1


I don't see a way of doing this without using the Canvas SDK to get around the same-origin policy issues. (That's what it's designed do do!)

@metadaddy wrote a very detailed post that covers all the angles here. Take a look.

  • Shane - We will be using Canvas SDK into SFDC to embed the UI of a third party application. However, as I mentioned we don't control this application and this is a shared service within an organization. So can't we not use parent.postMessage or window.postMessage to post a message to the SFDC frame?
    – N. Jain
    Sep 29, 2018 at 2:26
  • @N.Jain -- ya, I hate to be the bearer of bad news, but...it's bad news. I don't see a way around using the Canvas SDK, and since you can't manipulate the 3rd party application, you're out of luck for now. :( Sep 29, 2018 at 2:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .