PCF components are written in TypeScript/JS/HTML and run in the context of a MDA form, so they can easily access the 'Xrm' namespace methods using JavaScript/TS. Considering this I tried to use Xrm namespace from my PCF which was hosted on a canvas app, but I learned that this doesn't work at all. If we look at the source HTML tree we understand that the canvas app is hosted in an iframe and hence accessing 'Xrm' directly won't be possible. I wanted to know if there's any official documentation around this limitation or I'm doing something wrong. I'm not talking about the webAPI, I'm thinking about using XRM JS SDK to get the local state of the controls and to be able to use other SDK methods.
↧









