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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

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

(0) ShareShare
ReportReport
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

I have the same question (0)
  • Suggested answer
    ashishkhanna Profile Picture
    180 on at

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

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

  • dpkr28 Profile Picture
    135 on at

    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 .......

  • dpkr28 Profile Picture
    135 on at

    Thanks Guido ...

  • ashishkhanna Profile Picture
    180 on at

    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.

  • Community Member Profile Picture
    on at

    Pavan, do u get any solution?

  • Suggested answer
    Jharana Baliyar Singh Profile Picture
    2,667 on at

    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

  • Suggested answer
    Community Member Profile Picture
    on at

    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)

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans