Everyone knows that in MSCRM 4.0, whenever required to retrieve all columns using query expression we simply use to do it by using the line below.
QueryExpression.ColumnSet = new AllColumns();
But in MSCRM 2011, this is not supported. For one of our requirement I was supposed to this and at last, found an easy solution. You can achieve this in CRM 2011 by a simple line of code as below
ColumnSet cols = new ColumnSet(true);
Here we just need to pass the Boolean value which will suggest if we need all columns or not.
By: Pramod Vilas Zite