Reputation: 2087
CRM2011, rollup 13
Account form with iframe, that displays contact form. Requirement is that when user press "save" button on account form, contact in iframe should be also saved.
var iframeXrmPage = Xrm.Page.getControl("IFRAME_contact").getObject().contentWindow.Xrm.Page;
iframeXrmPage.data.entity.save(); //error: Unable to get property 'entity' of undefined or null reference
I can get Xrm object of iframe, but it has data
and ui
members set to null
.
Is there any way to call save()
in iframe using Xrm.Page? Are there any alternatives?
Upvotes: 2
Views: 642
Reputation: 213
Use below code:
var iframeXrmPage = Xrm.Page.getControl("IFRAME_contact").getObject().contentWindow.contentIFrame.Xrm.Page;
Upvotes: 1