Quantcast
Channel: Microsoft Dynamics CRM
Viewing all articles
Browse latest Browse all 154803

Forum Post: RE: QueryExpression and Relationship

$
0
0
Hi ArmenA Did you want to retrieve the data using Relationship Yes you can use Relationship in QueryExpression for sudo sample in this you can use Relationship in Query QueryExpression qe = new QueryExpression(); qe.EntityName = "account"; qe.ColumnSet = new ColumnSet(); qe.ColumnSet.Columns.Add("name"); qe.LinkEntities.Add(new LinkEntity("account", "contact", "primarycontactid", "contactid", JoinOperator.Inner)); qe.LinkEntities[0].Columns.AddColumns("firstname", "lastname"); qe.LinkEntities[0].EntityAlias = "primarycontact"; EntityCollection ec = _orgService.RetrieveMultiple(qe);

Viewing all articles
Browse latest Browse all 154803

Trending Articles