嵌套属性结果错误上的Dynamics 365 Odata提要筛选器条件

嵌套属性结果错误上的Dynamics 365 Odata提要筛选器条件,odata,dynamics-crm,dynamics-365,Odata,Dynamics Crm,Dynamics 365,我想根据ownerid/Name从odata筛选条件中检索数据 下面是我从odata收到的json格式数据的示例,没有任何过滤条件: { activityid: "20a82acf-093e-e711-8101-5065f38b85e1", regardingobjectid: null, prioritycode: { Name: "Normal", Value: 1 }, scheduledstart: "2017-05-21T10:00:00Z", scheduledend: "2017-

我想根据ownerid/Name从odata筛选条件中检索数据

下面是我从odata收到的json格式数据的示例,没有任何过滤条件:

{
activityid: "20a82acf-093e-e711-8101-5065f38b85e1",
regardingobjectid: null,
prioritycode: {
Name: "Normal",
Value: 1
},
scheduledstart: "2017-05-21T10:00:00Z",
scheduledend: "2017-05-21T10:00:00Z",
location: null,
statecode: {
Name: "Completed",
Value: 1
},
ownerid: {
Id: "064f5f55-e930-e711-80fe-5065f38aba91",
Name: "Diana Lee"
},
list-id: "f9a57b07-ee3f-e711-8100-5065f38b0571",
view-id: "bc829d10-a49d-409d-9a61-918fedadbad9",
entity-permissions-enabled: null
},
当我使用筛选条件数据调用以下url时,正在检索:

~/_odata/Appointments?$filter=statecode/Value eq 1
但是,当我使用以下筛选条件调用url时,无法检索数据:

~/_odata/Appointments?$filter=ownerid/Name eq 'Diana Lee'

请帮助我根据所有者名称检索数据。

一种有效的方法是展开所有者关系,并对展开的关系进行筛选:

~/OrganizationData.svc/AppointmentSet?$expand=user_appointment&$filter=user_appointment/FullName eq 'Diana Lee'
您可以添加select子句以缩小投影范围:

~/OrganizationData.svc/AppointmentSet?$select=Subject,OwnerId,user_appointment/FullName&$expand=user_appointment&$filter=user_appointment/FullName eq 'Diana Lee'

一种有效的方法是展开所有者关系,并对展开的关系进行筛选:

~/OrganizationData.svc/AppointmentSet?$expand=user_appointment&$filter=user_appointment/FullName eq 'Diana Lee'
您可以添加select子句以缩小投影范围:

~/OrganizationData.svc/AppointmentSet?$select=Subject,OwnerId,user_appointment/FullName&$expand=user_appointment&$filter=user_appointment/FullName eq 'Diana Lee'