Hi,
Whenever i tried using query expression for retrieve multiple operations, came to know some interesting facts which exists and hence would like to share with you all.
As you already know Query expression was used when dealing with a little complex query, lets see this in action
Basic query expression example
// Query using ConditionExpression and FilterExpression ConditionExpression condition1 = new ConditionExpression(); condition1.AttributeName = "lastname"; condition1.Operator = ConditionOperator.Equal; condition1.Values.Add("Brown"); FilterExpression filter1 = new FilterExpression(); filter1.Conditions.Add(condition1); QueryExpression query = new QueryExpression("contact"); query.ColumnSet.AddColumns("firstname", "lastname"); query.Criteria.AddFilter(filter1); query.NoLock = true;//Condition to prevent occurrence of deadlocks, distinct was used to retrieve unique columnsets in the query EntityCollection result1 = _serviceProxy.RetrieveMultiple(query);
Reference: https://msdn.microsoft.com/en-us/library/microsoft.xrm.sdk.query.queryexpression.aspx
https://mscrmmindfire.wordpress.com/2013/11/26/avoiding-deadlock-in-plugins/
http://www.resultondemand.nl/support/sdk/f5d2195b-8cae-49d6-a493-6f8b92e7f54e.htm
Hope this helps some one…
I do believe all of the ideas you have offered to your post. They are very convincing and can certainly work. Still, the posts are very quick for newbies. May you please prolong them a bit from subsequent time? Thank you for the post.
LikeLike
Sure Dong, will try to do so from my coming articles…earlier ones were just some tricks and tips…
LikeLike