从Iframe或新开的窗口访问MS CRM 2011(转)

For those of you trying to access a parent form’s Xrm.Page object in CRM 2011 you can use the following syntax.

From an IFrame HTML page

1document.parentWindow.parent.Xrm.Page

From a new window/dialog

1window.top.opener.parent.Xrm.Page

An example of a new window being used is when you are viewing the Account Form and then choose to create a new Contact from the left hand navigation pane and then within the Contact Form you need to access the Account Form (parent).

原文地址:https://www.cnblogs.com/janmson/p/2183762.html