Getting Total Record Count in CRM 2011

Many a times I run into this particular situation and somehow I observe people still retrieve all records and then loop through to get the total number of records. It is very easy to get it using the code given below. QueryExpression query = new QueryExpression(“account”); query.ColumnSet = new ColumnSet(true); query.Criteria.AddCondition(new ConditionExpression(“accountid”, ConditionOperator.NotNull)); query.PageInfo = Read more about Getting Total Record Count in CRM 2011[…]