How to update a parent form in CRM Dynamics 5.0 after an action is performed on a custom child form?

I have a parent form called ISSUE. This release form has an IG button on the form ribbon that opens a custom Html page.

Now after clicking the "Submit" button on the user form, which performs some inserts in CRM and closes directly. Now I want to update the ISSUE parent form when closing the HTML child page to reflect my insertions.

Here is the code I used to call the child form when I clicked the IG button from the release 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

+4
source share
2 answers

You can try:

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

This will enter the same URL minus the hash / fragment. I assume that CRM 5 still uses a snippet that will prevent the page from refreshing if you just made window.location.href = window.location.href.

Cautions:

  • If the form has dirty data, you will receive a warning about dirty data.
+3
source
  well, you can use the following line of code. window.location.reload(true); 
0
source

All Articles