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

Announcements

No record found.

News and Announcements icon
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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans