Quantcast
Channel: CRM Development 論壇
Viewing all articles
Browse latest Browse all 10280

DataServiceQuery ServiceAppointment Relationships $expand

$
0
0

I am using Silverlight and querying CRM in the following manner:

query = (DataServiceQuery<ServiceAppointment>)myContext.ServiceAppointmentSet

.AddQueryOption("$select", "ActivityId,Subject,StateCode,ScheduledStart,ScheduledEnd,ServiceId,new_RelatedOrderID,new_salesorder_serviceappointment_RelatedOrderID/OrderNumber,Contact_ServiceAppointments/ContactId,Contact_ServiceAppointments/FullName")

.AddQueryOption("$expand", "Contact_ServiceAppointments,new_salesorder_serviceappointment_RelatedOrderID")

the relationship new_salesorder_serviceappointment_RelatedOrderID gives me the Order the ServiceActivity. came from. The order also has a relationship new_RelatedServiceAppointment that points to the originating Consultation which is also a ServiceActivity.

I need to be able to pull this originating Consultation and get the new_MyField from that.

How can I set up this DataServiceQuery to do that?


Viewing all articles
Browse latest Browse all 10280

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>