Cry about...
Dynamics CRM 2011 How To
How to access the parent form from a child form (JavaScript)
When you need to get data from the parent form of a record, you can access the parent form via:
window.top.opener.Xrm.Page
for example:
var userName = window.top.opener.Xrm.Page.getAttribute('cryer_user').getValue();
This works fine, BUT fails if the user closes the parent page and then refreshes the child page. In that scenario Internet Explorer will throw the error:
The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute.
So window.top.opener.Xrm.Page
is not a robust solution.
Sadly I don't yet have an alternative.
These notes have been tested with Microsoft Dynamics CRM 2011, and may apply to other versions as well.
About the author: Brian Cryer is a dedicated software developer and webmaster. For his day job he develops websites and desktop applications as well as providing IT services. He moonlights as a technical author and consultant.