admin管理员组

文章数量:1431434

We are using M$-CRM 2016 onPremise 9.1 and having the following issue:

I have a lookup on the entity salesorderdetail and use addCustomView for a special filter. But I always getting the error mentioned in subject. On deeper search I recognized why, and don't understand why crm this is doing that. I opened the developer tools and network and saw a 400 bad Request. Detailed error: 'SalesOrderDetail' entity doesn't contain attribute with Name = 'name'

But my fetchXml does not contain this attribute. A closer look at this: this attribute is added by crm automatically. I compared it with a customView for quotedetails, and saw that there is also added an attribute, but in this case:

<attribute name="quotedetailname"/>

and this is correct. But on salesorderdetail it should be

<attribute name="salesorderdetailname"/>

Why does M$-CRM add this name-attribute to my fetchxml? Can anyone reproduce this problem and has anybody a solution for it?

thx ©a-x-i

We are using M$-CRM 2016 onPremise 9.1 and having the following issue:

I have a lookup on the entity salesorderdetail and use addCustomView for a special filter. But I always getting the error mentioned in subject. On deeper search I recognized why, and don't understand why crm this is doing that. I opened the developer tools and network and saw a 400 bad Request. Detailed error: 'SalesOrderDetail' entity doesn't contain attribute with Name = 'name'

But my fetchXml does not contain this attribute. A closer look at this: this attribute is added by crm automatically. I compared it with a customView for quotedetails, and saw that there is also added an attribute, but in this case:

<attribute name="quotedetailname"/>

and this is correct. But on salesorderdetail it should be

<attribute name="salesorderdetailname"/>

Why does M$-CRM add this name-attribute to my fetchxml? Can anyone reproduce this problem and has anybody a solution for it?

thx ©a-x-i

Share Improve this question asked Nov 19, 2024 at 7:47 a-x-ia-x-i 3035 silver badges13 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

My bug was in this line of code:

formContext.getControl("wdps_base_salesorderdetail")).addCustomView(viewId, "product", "Basisprodukt", fetchXml, gridLayout, true);

I passed the wrong logicalName (second parameter). It shoud be "salesorderdetail" rather than "product". The strange thing is the behaviour of Dynamics CRM, because the error-message guides me to the wrong direction and I fot to have a closer look at the code. The other strange thing was, that Dynamics CRM adds an fix parameter to the fetchxml, this is the main-attribute of the entity passed as second parameter. In my case attribute 'name' was the attribute of product.

thx for reading :)

本文标签: fetchxmlcrm 2016 Query Builder Error salesorderdetail customViewStack Overflow