Hi,
on my CRM D365 v9.1.x I want mantain a Dialog (MS wants to deprecate it not remove it today, so I don't want I don't want to confuse final users with the use of a new BPF or a new Flow). I call dialog by a custom Button on the Ribbon of the custom entity "pdnt_claim".
I call fine the Dialog by js:
function buttonClaim(primaryControl){ var formContext = primaryControl; var dialogId = "947bd9f1-9df6-43ae-97c4-b9f58c332c08"; var url = Xrm.Utility.getGlobalContext().getClientUrl() + "/cs/dialog/rundialog.aspx?DialogId=%7b" + dialogId + "%7d&EntityName=pdnt_claim&ObjectId=" + formContext.data.entity.getId(); Xrm.Navigation.openUrl(url, { height: 400 }); // I want call the new Xrm API and not deprecated commands like 'window' /* ...after the dialog is closed i want refresh the prevoius parent form... */ }
But after the Dialog is concluded (I click on Finish button) I would like refresh the form.
Using
formContext.data.refresh(save)
after Xrm.Navigation.openUrl(..) return error.
Using:
window.parent.location.reload(true);
after Xrm.Navigation.openUrl(..) is incorrect.
I can't use setCallbackReference like in https://community.dynamics.com/crm/b/crmpowerobjects/archive/2017/03/21/triggering-a-form-refresh-after-crm-dialog-is-closed-on-dynamics-365
because call inconsistent system Mscrm object. Also showModalDialog() it's deprecated.
So there is a js object, MS API or workaround in order to resolve the refresh form after process dialog?
Someone has solved the question?
Outdated Idea: https://community.dynamics.com/crm/f/117/t/118457
https://community.dynamics.com/crm/f/117/t/77749
https://community.dynamics.com/crm/f/117/t/167173
*This post is locked for comments