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

Notifications

Announcements

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:
I have the same question (0)
  • iAm_ManCat Profile Picture
    18,228 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard