Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Close Mscrm.CrmDialog using js code

(0) ShareShare
ReportReport
Posted on by

Hi

I can create and show a CRM dialog by following this article but I can not close it using the js function that calls the dialog. Here is what I do :

var dialofRef;

function callDialog()

{

      dialofRef= new Mscrm.CrmDialog(Mscrm.CrmUri.create(webresourceurl), window, 500, 300);

dialofRef.show();

}

function otherFunction()

{

if(....)

dialofRef.Close();

}

But CrmDialog has not any method like close or hide. Would you please help me ? 

*This post is locked for comments

  • Community Member Profile Picture
    on at
    RE: Close Mscrm.CrmDialog using js code

    MsCRM.CRMDialog is Unsupported. Use Window.Open or If it is a WebResource use Xrm.Utility.openWebResource(webResourceName,webResourceData,width, height)  .

    Please Refer to Below Link

    [View:https://msdn.microsoft.com/en-us/library/jj602956.aspx#openWebResource:750:50]

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Close Mscrm.CrmDialog using js code

    Refer this:

    msdn.microsoft.com/.../gg328483(v=crm.7).aspx

  • Community Member Profile Picture
    on at
    RE: Close Mscrm.CrmDialog using js code

    Hi Nithya

    It is already
    "ClientGlobalContext.js.aspx"

    Thanks


  • Suggested answer
    Nithya Gopinath Profile Picture
    17,076 on at
    RE: Close Mscrm.CrmDialog using js code

    Hi Babak,

    Please change the

    src="../ClientGlobalContext.js.aspx"

                          to

    src="ClientGlobalContext.js.aspx"

    in the code of whole dialog page.

    See: http://stackoverflow.com/questions/38995802/cannot-close-dialog-window-using-javascript-in-crm

    Hope this helps.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,850 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,723 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans