我试图弄清楚如何通过REST API列出潜在客户状态代码的枚举选项。我请求如下:
GET [Organization URI]/api/data/v8.2/EntityDefinitions(LogicalName='lead')/Attributes(LogicalName='statuscode')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?$select=LogicalName&$expand=OptionSet
但我收到的错误如下:
"Navigation property Attributes With Id = LogicalName='statuscode' does not exist on Metadata Entity with ID = LogicalName='lead'"
实现这一目标的适当终点是什么?
答案 0 :(得分:0)
使用StatusAttributeMetadata
代替PicklistAttributeMetadata
:
GET [Organization URI]/api/data/v8.2/EntityDefinitions(LogicalName='lead')/Attributes/Microsoft.Dynamics.CRM.StatusAttributeMetadata?$select=LogicalName&$expand=OptionSet($select=Options)