Posts

Showing posts with the label get column's value from LinkedEntities

retrieve columns from LinkedEntities in Microsoft CRM 2011

Hi, You prepare QueryExpression and add some LinkedEntities then you want to retrieve fields from linked part.Just follow the sample;  QueryExpression query = new QueryExpression()                     {                                         ...                                         ...                     };                     FilterExpression filterTicket = new FilterExpression();                     ...                     query.Criteria = filterTicket;                     //all about ticket                     query.LinkEntities.Add(new LinkEntity("contact", "new_new_ticket_contact", "contactid", "contactid", JoinOperator.Inner));                     query.LinkEntities[0].EntityAlias = "contacttoticket"; add alias to reach the fields                     query.LinkEntities[0].Columns.AddColumn("new_ticketid"); add column names to the same level of LinkedEntity to obtain later...