Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

Query Expression Distinct column Plugin Help.

$
0
0

I have created a query expressions which retrieves all order products associated with an order.

Here is my current query expression:

var query =newQueryExpression("salesorderdetail");
            query.ColumnSet=newColumnSet(newstring[]{"salesorderdetailid","productid","new_event","new_inventory","productdescription"});
            query.Criteria.AddCondition("salesorderid",ConditionOperator.Equal, combinedEntity.Id);
            query.Distinct=true;EntityCollection retrieved = context.OrganizationService.RetrieveMultiple(query);

The problem is that I only want to retrieve data with a unique productid.

Is this possible using QueryExpression? Can anyone show me?

Many thanks.


Viewing all articles
Browse latest Browse all 8223

Trending Articles



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