Showing results for 
Search instead for 
Did you mean: 

crm 2011 DataServiceQuery $expand return null value

Author Name: Qiming Ji

I have a query like the code below to retrieve related records using oData using c# in a silverlight applicaiton

DataServiceQuery query = (DataServiceQuery)_context
.AddQueryOption("$expand","new_account_new_contact, new_account_new_wharehouse, new_account_new_region");

I have three relationships included here in the expand string.

the code sometimes does not return the related records sometimes. but if i refresh the page (sometimes once, sometimes several times), it does return all the related records.

Reckon it might be a bug?



Status: Under Review
Regular Visitor
Status changed to: Under Review
Regular Visitor
Please see the SDK documentation for this here - , specifically we list out that "By default, you can define up to six relationships to expand. This query, expanding both the opportunities and system user that owns the account, will work, /AccountSet?$select=Name,opportunity_customer_accounts,user_accounts&$expand=opportunity_customer_accounts,user_accounts." If this is not the behavior you are seeing, please open a support request. Thanks