开发者

How to Refresh the parent Form in CRM Dynamics 5.0 after action is completed on custom child form?

开发者 https://www.devze.com 2023-01-23 05:19 出处:网络
I have a parent form called ISSUE. This Issue form has a button called IG on the Form Ribbon that opens custom Html Page.

I have a parent form called ISSUE. This Issue form has a button called IG on the Form Ribbon that opens custom Html Page.

Now after the Submit button is clicked on the Custom form that performs some Inserts into CRM and Cl开发者_如何学运维oses directly. Now I want to refresh the parent ISSUE form on closing the child HTML Page to reflect my Inserts.

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;');

}

Appreciate your help.

Thanks


You could try:

window.location.href = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search

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.

Caveats:

  1. If there is dirty data on the form, you're going to get a dirty data warning.


 well, you can use the following line of code.

 window.location.reload(true);
0

精彩评论

暂无评论...
验证码 换一张
取 消