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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Form is not reloaded after Dialog execution

(0) ShareShare
ReportReport
Posted on by 352

Hi, I have a Custom "Cancel Case"button which executes a Dialog in order to get a detailed reason for Cancelling the case from the Agent performing that action (our customers wants to get such a detailed information and not relying in the built-in Cancel reasons in the CRM). After getting the text of reason, the Dialog sets the state of the Case record on Cancelled. The code, which I borrowed from the Internet, is as follows:

runDialogAndRefresh = function(objectTypeCode, dialogId) {
    var primaryEntityId = Xrm.Page.data.entity.getId();
    var rundialog = Mscrm.CrmUri.create('/cs/dialog/rundialog.aspx');
    rundialog.get_query()['DialogId'] = dialogId;
    rundialog.get_query()['ObjectId'] = primaryEntityId;
    rundialog.get_query()['EntityName'] = objectTypeCode;
    var hostWindow = window;
        if (typeof(openStdWin) == 'undefined') {
            hostWindow = window.parent; // Support for Turbo-forms in CRM2015 Update 1
        }
        if (typeof(hostWindow.openStdWin) != 'undefined') {
            hostWindow.openStdDlgWithCallback(rundialog, hostWindow.buildWinName(null), 615, 480,function(){Xrm.Utility.openEntityForm(objectTypeCode,primaryEntityId)})
        }         
}
Everything works fine but the Case form is not reloaded after the Dialog is over. If I manually refresh the browser I can see the Case record was indeed cancelled as expected. I tried the code in Chrome and IE and nothing occurs at the end of the Dialog, I mean, the form is still opened with the old status (Active). What am I doing wrong? The CRM version is 2016 Update 1 Online but this should work in 2016 OnPremise, too.
Any suggestion would be much appreciated.
Xavier Villafuerte

*This post is locked for comments

I have the same question (0)
  • Umer990 Profile Picture
    46 on at

    Hi,

    Have you ever get it solved?

  • Umer990 Profile Picture
    46 on at

    Hi,

    Have you ever get it solved?

  • Umer990 Profile Picture
    46 on at

    Hi,

    Have you ever get it solved?

  • Xavier Villafuerte Profile Picture
    352 on at

    Hi Umer, sorry for the late response. As far as I remember, we ended changing Dialogs for other solution because they are a deprecated feature in newer versions.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ZS-27011425-0 Profile Picture

ZS-27011425-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans