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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Xrm.WebApi.retrieveMul...
Power Apps
Unanswered

Xrm.WebApi.retrieveMultipleRecords with fetchXML not working

(1) ShareShare
ReportReport
Posted on by

Hi,

 

I am using the following js to get records from following table.

hiranes_1-1713778866811.png

It has the following attribute which I used to filter. 

hiranes_2-1713778962595.png

 

 

 

function manipulateOrderData(orderNumber) {
	console.log("Step 1:", orderNumber);
 // Clear collections
 var colRemAttr = [];
 console.log("Step 2:");

	var fetchAttributes = `?fetchXml=<fetch>
 <entity name="asset_orderlineattributes">
 <filter>
 <condition attribute="cr6bb_AttrSONumber" operator="eq" value="${orderNumber}" />
 </filter>
 </entity>
 </fetch>`;

 Xrm.WebApi.retrieveMultipleRecords("cr6bb_orderlines", fetchAttributes).then(function (result) {

	colRemAttr = result.entities;
	console.log("Step 4:");
	});
}

 When I trigger the js I am getting the following error.

app.e64ad7545da1714be43e5aa5ff60575b.js:28 [storage] Error Messages: 
1: 'asset_OrderLineAttributes' entity doesn't contain attribute with Name = 'cr6bb_AttrSONumber' and NameMapping = 'Logical'. MetadataCacheDetails: ProviderType=Dynamic, StandardCache=True, IsLoadedInStagedContext = False, Timestamp=11075525, MinActiveRowVersion=11075525, MetadataInstanceId=52925638, LastUpdated=2024-04-22 09:10:04.353, OrgId=7ed4e518-73f9-ed11-a66d-00224828221d

 

The table has the column cr6bb_AttrSONumber, still throwing the error. Can anybody point out what I am doing wrong here?

Categories:
  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    You can see in your error its using Logical name mapping, so in this case you are using the schema name, but need the logical name.

    Click to edit the column, you will then see the logical name listed:

    image.png

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard