
Announcements
Hi,
I am using the following js to get records from following table.
It has the following attribute which I used to filter.
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?
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: