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)

Issue with using Xrm.Utility.openQuickCreate() from HTML web resource

(0) ShareShare
ReportReport
Posted on by 7,396 User Group Leader

I'm trying to open an entity's Quick Create form from an HTML web resource from navigation of an entity. I'm using Xrm.Utility.openQuickCreate("entityname", null, null) for a start.

I get an error saying JQueryApi is not defined in the browser's console.

However, other functions like Xrm.Utility.openEntityForm and Xrm.Utility.isActivityType(entityname) does work.

Any suggestions? Thanks.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rahul-Waghmare Profile Picture
    990 on at

    Hi,

    Please check this, it may help.

    www.inogic.com/.../how-to-open-quick-create-form-in-dynamics-crm-2015-online-update-1

    Regards,

    Rahul

  • Priyesh Profile Picture
    7,396 User Group Leader on at

    Thanks for the response Rahul,

    I wanted the same to be opened from inside an HTML web resource. Unfortunately, Xrm.Utility.openQuickCreate() doesn't work there...

  • Suggested answer
    Rahul-Waghmare Profile Picture
    990 on at

    Did you tried like this,

    / ** Create an object including the accountId. Used to call the

    // ** quick create form in the context of the account

    var parentAccount = {

     entityType: "account",

     id: accountId

    };

    // *** NOTE: Here we aren't setting any parameters! (But we could!)

    var parameters = {};

    // *** Call the Xrm.Utility needed to add a contact.

    Xrm.Utility.openQuickCreate("contact", parentAccount, parameters).then(function (lookup) { successCallback(lookup); }, function (error) { errorCallback(error);});

    // *** Function called on success.

    function successCallback(lookup) {

     alert("lookup: " + lookup.savedEntityReference.id);

     alert("lookup: " + lookup.savedEntityReference.name);

    }

    // **** Function called on error.

    function errorCallback(e) {

     // *** No new contact created, which is an error we can ignore!

     alert("Error: " + e.errorCode + " " + e.message);

    }

    Regardsm

    Rahul

  • Priyesh Profile Picture
    7,396 User Group Leader on at

    Was this successful for you from the HTML web resource?

  • Priyesh Profile Picture
    7,396 User Group Leader on at

    my HTML web resource isn't even on the Form, it's inside navigation area of the record.

    However, other methods from Xrm.Utility work fine in HTML web resource. Strange.

  • Verified answer
    Alex Fun Wei Jie Profile Picture
    33,628 on at

    if your code is inside html page

    window.parent.Xrm.Utility.openQuickCreate(entityLogicalName,createFromEntity,parameters).then(successCallback, errorCallback)

  • Community Member Profile Picture
    on at

    Any luck? 

    window.parent.Xrm.Utility.openQuickCreate...........

    does not work.

  • Kartik MS CRM Profile Picture
    40 on at

    Hi

    Did you have resolved this issue? I am having the same issue?

  • Suggested answer
    Arun Vinoth Profile Picture
    11,615 Moderator on at

    If HTML is embedded in CRM entity form, then window.parent will work.

    If it’s a popup, then window.opener should work.

    stackoverflow.com/.../7920473

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