Recently I have found out below new client API:
getContentWindow – Returns the content window that represents an IFRAME or web resource.
It is use to get the control of web source and calling the internal method by passing the Xrm and FormContext during Form On Load.
But there is a cons where user might refresh the web resource using right click and it won’t trigger the method.
Two ways to solve this issue at current moment:
- Pass required data through parameters –
- Using parent.Xrm –
Personally I prefer method 1 in my opinion as parent.Xrm will be obsolete (I guess) in future.