Monday, June 27, 2016

Nolock & Distinct for Query Expression

Hi All,

We have faced an issue that Retrieve and Retrieve Multiple (Query Expression) plugins fetching record too slow when there are more concurrent user access the system , so we have used nolock to overcome.


QueryExpression queryExp = new QueryExpression("account");
queryExp.Nolock = true;
queryExp.EntityName = "account";
var cols = new ColumnSet(new[] { "name", "accountid" });
queryExp.ColumnSet = cols;
queryExp.Distinct = false;
var accounts = service.RetrieveMultiple(queryExp);

No comments:

Post a Comment

How to Remove Unmanged layers in Microsoft Dynamics CRM/Dataverse

 Issues Faced : When we need to create a new field or update a failed, we are having an different environment we are create in that and move...