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)

Unable to invoke jQuery UI Dialog from Forms

(0) ShareShare
ReportReport
Posted on by

Hi guys, I'm looking to open up the jQuery UI Extended Dialog from one of the entity forms. I've added all the necessary files that are required, but I keep getting this error:


However, if I invoke the method from a HTML web resource page, it works just fine. Sample HTML page is as follows:

<!DOCTYPE html>
<html>
<head>
  <title>Extended Dialog</title>
  <meta charset=utf-8 />
  <link href="new_jquery.ui.css" rel="stylesheet" type="text/css" />
  <script src="new_jquery.3.1.1.js"></script>
  <script src="new_jquery.ui.1.12.1.js"></script>
  <script src="new_jquery.dialogextend.js"></script>
  <script src="new_floatingwidget.js"></script>
</head>
<body>
<script>

  LaunchFloatingWidget();
</script>
</body>
</html>


I have all the script files added in the form library and an attempt to call the LaunchFloatingWidget(); method on Form load fails with the error above.

And this is the script file that contains the method:

function LaunchFloatingWidget()
{
	debugger;
    //dialog options
    var dialogOptions = {
      "title" : "All Artifacts",
      "width" : 400,
      "height" : 300,
      "modal" : false,
      "resizable" : true,
      "draggable" : true,
    };

    // dialog-extend options
    var dialogExtendOptions = {
      "closable" : false,
      "maximizable" : true,
      "minimizable" : true,
      "minimizeLocation" : 'left',
      "collapsable" : true,
      "dblclick" : false,
      "titlebar" : false
    };

    // open dialog
	$("<div></div>").dialog(dialogOptions).dialogExtend(dialogExtendOptions);
}


If I embed the HTML web resource file in the form, I can see the jQuery UI dialog showing up but that's not what I want. Is CRM blocking anything?

Any help would be appreciated.

*This post is locked for comments

I have the same question (0)
  • JohnAnonymous Profile Picture
    5,241 on at

    Are you sure the javascript library is added to and loaded on the form. It looks like it isn't. Also if you're using turbforms I think there's some logic that will only load the script when it's needed (e.g. a function call). I'm not sure about this, bit it's easy to check when you change to legacy rendering.

  • Dynamotion Profile Picture
    on at

    Hi Martijn,

    I did include all the script files in the form library including the jQuery file.

    8255.Untitled1.png

    What I'm thinking is if jQuery is conflicting with Dynamics CRM.

    If  embed my HTML page the code works just fine.

    8255.Untitled1.png

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    Hi,

    It isn't supported to use the jquery ui pop up on a form unless it is embedded in an html web resource.

    You can use the technique that Andrii describes here community.dynamics.com/.../show-your-dialog-in-crm-2013-modal-style

    But this still isn't supported so you may be better finding a different UI approach.

    Hope this helps

  • Dynamotion Profile Picture
    on at

    Hi Scott,

    My aim is to show a floating widget kind of popup instead of a modal dialog; something that will stay active on the form but will still allow the user to interact with the CRM form.

    Any other alternative approaches that you know of?

    Thanks!

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    Hi,

    At this time there is no supported way of doing this since it will code that will break with the next update to Crm.

    Perhaps just show your widget in a static webresource.

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