Open Webresource with JS and Refresh form on Closing – Dynamics 365
Views (14)
var serverUrl = Xrm.Page.context.getClientUrl();
var addParams = "EntityName=" + EntityName + "&EntityId=" + EntityId;
var AddCommentsHTML = serverUrl + "/WebResources/new_CommentHTML?Data=" + encodeURIComponent(addParams);
var win = window.open(AddCommentsHTML, "ModalPopUp", "toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=0,width=600,height=350,left = 150,top=100");
win.focus();
var timer = setInterval(function () {
if (win.closed) {
clearInterval(timer);
//Refresh Form after closing Pop-up
formContext.data.refresh();
}
}, 500);
This was originally posted here.
*This post is locked for comments