best way to reload case form after resolve? RRS feed

  • Question

  • Hello, I've created a custom "Resolve Case" button. It updates the case to resolved via the REST SDK. I need to refresh/redisplay the form after it's been resolved so the user can see the disabled buttons on the form as a visual indicator that the case has been resolved.  location.reload() as the last line of the success callback refreshes the page but it prompts the user with the message: "Are you sure you want to navigate away from this page?" Any ideas on how I can achieve the use case above but avoid the system prompting the user with a confirmation message?

    Wednesday, February 26, 2014 10:29 PM

All replies

  • Try this statement:

    Xrm.Page.data.refresh(), this is a new API in CRM 2013

    Xrm.Page.data.refresh(save).then(successCallback, errorCallback);

    • Proposed as answer by KunuChopra Thursday, February 27, 2014 6:09 AM
    Thursday, February 27, 2014 1:43 AM
  • I have the same problem.

    I have tried the following code, it tells me that the case has resolved.

                if (Xrm.Page.data.entity.getIsDirty()) {
                Xrm.Page.data.refresh(true).then(function () {
                }, function (errorCode, message) {
                    Xrm.Utility.alertDialog("Save record error." + message);

    Thursday, November 12, 2015 4:24 AM