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)

Error Using Xrm.WebApi on Address Form: jQueryApi is not defined

(0) ShareShare
ReportReport
Posted on by

We are upgrading from Dynamics 365 online v8 to v9. In the onload event for the Address form, we have some javascript that calls the Web API. Currently, we build an XMLHttpRequest to do this, but if possible, I'd like to switch to using the new Xrm.WebApi object. Here's simplified test code:

Xrm.WebApi.retrieveMultipleRecords("customeraddresses").then(
	function(results) {Xrm.Utility.alertDialog("there are results")},
	function(error) {Xrm.Utility.alertDialog(error.message)}
);

We have this code hooked up to both the Contact and Address form onload events. On the Contact form, it works just fine, but on the Address form, we get the following error:

ReferenceError: jQueryApi is not defined
    at XrmClientApi.OnlineSdk.retrieveMultipleRecords (global.ashx?ver=-766924453:4561)
    at Function.Xrm.WebApi.retrieveMultipleRecords (global.ashx?ver=-766924453:2887)
    at RemoveUsedPremierAddressTypes (tre_AddressTypeFilter.js?ver=-766924453:15)
    at AddressOnLoad (tre_AddressFormScript.js?ver=-766924453:6)
    at crmForm_window_onload_handler (FormScript.js.aspx?businessRulesVersion=1033&formid=df5bef3a-9237-40bd-a27c-2cd7fd434706&FormName=crmForm&fver=345355024&isbulkedit=false&ver=-766924453:24)
    at crmFormOnLoadHandler (FormScript.js.aspx?businessRulesVersion=1033&formid=df5bef3a-9237-40bd-a27c-2cd7fd434706&FormName=crmForm&fver=345355024&isbulkedit=false&ver=-766924453:6)
    at executeAction (pageloader.js?ver=-766924453:76)
    at pageloader.js?ver=-766924453:56

I assume this object is missing because the Address form hasn't been updated to match the new UI in v9. Does that mean we will need to continue to create our own XMLHttpRequest for the Address form, or might the form get updated so we can also use Xrm.WebApi there in the near future?

*This post is locked for comments

I have the same question (0)
  • RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    I can say this for sure but it from the stack trace, the internal method is failing and like you said, it is possibly be because of the old style form.

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

    On a related note - Interestingly Address entity is not listed in neither Legacy (non-refreshed) Entity nor refreshed entity.

    [View:http://www.mohamedmostafa.co.uk/blog/2013/10/21/microsoft-dynamics-crm-2013-refreshed-versus-non-refreshed-legacy-entities-in-the-new-fluid-flat-ux-design/]

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