在Dynamics 365中遇到这个问题,它似乎应该可以工作,但给了我:
类型“Microsoft.Dynamics.CRM.biz\u productbuyer”上的属性“\u biz\u buyerlookupid\u value”不是导航属性或复杂属性。只能扩展导航属性。
https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/webapi/query-data-web-api#retrieve-related-entities-by-expanding-navigation-properties
基本上是在相关字段中进行读取,这样我就不必再进行查询了。
因此,在自定义实体中有一个查找字段,名为
Product Buyer
或
biz_productbuyers
,带来
Contact
Product
该字段称为
biz_buyerlookupid
查看实体的字段时。
当您使用web API时,它不会显示任何调用
存在于该实体中。除掉
$select=
把它打开,这样我就可以搜索它了。
_biz_buyerlookupid_value
$select
它返回:
{
@odata.etag: "W/"20636204"",
_biz_buyerlookupid_value: "906595fd-2a83-dc11-ae20-000feaed3854",
biz_productbuyerid: "8be67d14-9efb-4335-98c7-000451a50cef",
}
显然这两个领域之间有某种关系,但听起来像
_商业买家低价值
查找是否指向
Contacts
. 这个
与中的实际值相对应
contact
实体,即单个
contactid
/api/data/v9.0/biz_productbuyers?$select=_biz_buyerlookupid_value&$expand=_biz_buyerlookupid_value($select=contactid, fullname)
/api/data/v9.0/biz_productbuyers?$select=_biz_buyerlookupid_value&$expand=biz_productbuyerid($select=contactid, fullname)
/api/data/v9.0/biz_productbuyers?$select=biz_productbuyerid&$expand=biz_productbuyerid($select=contactid, fullname)
/api/data/v9.0/biz_productbuyers?$select=biz_productbuyerid&$expand=_biz_buyerlookupid_value($select=contactid, fullname)
这是怎么回事?它应该会带来
联系人ID
和
fullname
从
接触
我能说的最好的实体。