【问题标题】:Save record embedded in iframe保存嵌入在 iframe 中的记录
【发布时间】:2013-07-26 21:43:51
【问题描述】:

场景

CRM2011,汇总 13

带有 iframe 的帐户表单,显示联系表单。要求是当用户在帐户表单上按“保存”按钮时,iframe 中的联系人也应保存。

OnSave 事件代码

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 

我可以获取 iframe 的 Xrm 对象,但它的 dataui 成员设置为 null

有没有办法使用 Xrm.Page 在 iframe 中调用 save()?有其他选择吗?

【问题讨论】:

    标签: dynamics-crm-2011 dynamics-crm


    【解决方案1】:

    使用下面的代码:

    var iframeXrmPage = Xrm.Page.getControl("IFRAME_contact").getObject().contentWindow.contentIFrame.Xrm.Page;

    【讨论】:

      猜你喜欢
      • 2014-08-15
      • 2018-06-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-06
      • 2023-03-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多