web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / CRM TIPS By PRM / Open Webresource with JS an...

Open Webresource with JS and Refresh form on Closing – Dynamics 365

P. R. M Profile Picture P. R. M 739

  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.

Comments

*This post is locked for comments