Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Xrm.Internal.openDialog is not working in MS CRM 2015

Posted on by 135

hi 

One of my business scenario is calling a dialog when you click on lead disqualify button.it is successfully implemented by using window.open 

but my Client don't satisfy with that he want to use oob's methods 

so if i trying implement with "Xrm.Internal.openDialog" i was getting an error message in MSCRM.

4075.Error.png

here is my code:

var URL = Xrm.Page.context.getClientUrl() + "/cs/dialog/rundialog.aspx?DialogId=%7b" + dialogId + "%7d&EntityName=" + entityName + "&ObjectId=" + objectId;
var DialogOption = new Xrm.DialogOptions;
DialogOption.width = 500; DialogOption.height = 420;
Xrm.Internal.openDialog(URL,
DialogOption,
null, null,
CallbackFunction);

 function CallbackFunction(returnValue) {

}

can any please give an advise.......

i am using MS CRM 2015 online 

Thanks in advance 

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Xrm.Internal.openDialog is not working in MS CRM 2015

    if you have turbo forms enabled all your javascripts are in their own iframe called customScriptsFrame

    when you call Xrm.internal.opendialog from javascript it open a dialog inside the invisible customScriptsFrame Iframe. so you don't see it.

    using parent.parent.Xrm.internal.opendialog instead however works for me in Crm 2016

    Ofcourse this might break again with the next rollup.

    walking up the tree to find the last parent with a Xrm object MIGHT be more reliable, but i can't be sure.

    anything unsupported is always at your own risk ofcourse.

    (I know this is a relatively old thread, but its the top google hit)

  • Suggested answer
    Jharana Baliyar Singh Profile Picture
    Jharana Baliyar Singh 2,665 on at
    RE: Xrm.Internal.openDialog is not working in MS CRM 2015

    Hi Pavan,

    For getting object id of record dynamically you can use this just see this one :guruprasadcrm.blogspot.in/.../retrieving-entity-object-type-code.html

    And call this method while you are passing the url .It should work, Try on this if your problem is still not yet solved.

    Thanks,

    Jharana

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Xrm.Internal.openDialog is not working in MS CRM 2015

    Pavan, do u get any solution?

  • ashishkhanna Profile Picture
    ashishkhanna 180 on at
    RE: Xrm.Internal.openDialog is not working in MS CRM 2015

    In your original post, you already had the dialogId and you said it was working fine, so you can use the same parameter. The only other Guid in the post is objectId and the post already talks about getting that value dynamically. This would basically make the entire solution dynamic and you will not have to modify anything after deployment.

  • dpkr28 Profile Picture
    dpkr28 135 on at
    RE: Xrm.Internal.openDialog is not working in MS CRM 2015

    Thanks Guido ...

  • dpkr28 Profile Picture
    dpkr28 135 on at
    RE: Xrm.Internal.openDialog is not working in MS CRM 2015

    Thanks Ashish for your Quick response

    As of know i am wokring on dev enviroment but if want to deploy in QA/live,again i will modify URL right.

    I don't want to do any customization further once it is deployed in one environment to another.

    So, will there be any generic solution/method .......

  • Suggested answer
    ashishkhanna Profile Picture
    ashishkhanna 180 on at
    RE: Xrm.Internal.openDialog is not working in MS CRM 2015

    Did you try this already? Seems to work on my playground environment.

    mahadeomatre.blogspot.com/.../running-crm-dialog-from-custom-ribbon.html

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans