如何在自定义子窗体上完成操作后刷新CRM Dynamics 5.0中的父窗体? [英] How to Refresh the parent Form in CRM Dynamics 5.0 after action is completed on custom child form?
问题描述
我有一个名为ISSUE的父表单。
此问题表单在表单功能区上有一个名为IG的按钮,用于打开自定义Html页面。
I have a parent form called ISSUE. This Issue form has a button called IG on the Form Ribbon that opens custom Html Page.
现在,在执行的自定义表单上单击提交按钮后一些插入CRM并直接关闭。现在我想在关闭子HTML页面时刷新父ISSUE表单以反映我的插入内容。
Now after the Submit button is clicked on the Custom form that performs some Inserts into CRM and Closes directly. Now I want to refresh the parent ISSUE form on closing the child HTML Page to reflect my Inserts.
这是我用来点击IG时调用子表单的代码问题表单功能区中的按钮:
Here is the code that i used to call the Child Form on clicking IG Button from the Issue Form Ribbon:
function popup()
{
var url = './WebResources/irpc_/planner.html';
var data =
{
issueGuid: Xrm.Page.data.entity.getId(),
causeCodeGuid: Xrm.Page.data.entity.attributes.get("irpc_causecode").getValue()[0].id,
riskClassificationId: Xrm.Page.data.entity.attributes.get("irpc_riskclassification").getValue()
};
window.showModalDialog(url , data, 'dialogHeight:480px;dialogWidth:1200px;');
}
感谢您的帮助。
谢谢
推荐答案
您可以尝试:
window.location.href = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search
这将输入相同的URL减去散列/片段。我假设CRM 5仍然使用一个片段,如果你只是做了一个window.location.href = window.location.href,它会阻止页面刷新。
This will input the same URL minus the hash/fragment. I'm assuming CRM 5 still uses a fragment which would prevent the page from refreshing if you just did a window.location.href = window.location.href.
警告:
- 如果表单上有脏数据,您将收到脏数据警告。
这篇关于如何在自定义子窗体上完成操作后刷新CRM Dynamics 5.0中的父窗体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!