Many times there could a requirement where we need to get most of the attributes of a record in CRM. Then, we can write the code to get all attributes.
Here is the code for it.
We can achieve this by using two things
1) Fetch XML
In FetchXML, if you forgot to mention attribute tag by default it will get all the attributes.
EntityCollection entColAccounts = iService.RetrieveMultiple(new FetchExpression(strFetchXML));
entColAccounts = iService.RetrieveMultiple(new FetchExpression(strFetchXML));
objQueryExpression.ColumnSet = new ColumnSet(true);
entColAccounts = iService.RetrieveMultiple(objQueryExpression);
Note: Mostly avoid retrieving the record with the all-attributes as there could be lot of performance degrade. It is always best and recommended way to mention the specific attributes and retrieve records from CRM.
Hope this helps.