动态365列出REST API的引导状态代码枚举

时间:2018-03-06 09:30:46

标签: metadata dynamics-crm-365

我试图弄清楚如何通过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'"

实现这一目标的适当终点是什么?

1 个答案:

答案 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)