views:

90

answers:

1

The CRM SDK says this is possible but the following code fails. Does anyone know why?

var request = new RetrieveMultipleRequest();
var query = new QueryExpression(EntityName.asyncoperation.ToString());
query.ColumnSet = new AllColumns();
request.Query = query;
var response = _connection.Execute(request);

The error is:

<error>\n
  <code>0x80040216</code>
  <description>An unexpected error occurred.</description>
  <type>Platform</type>
</error>

If I change the entity name to account, it works fine.

A: 

Found the answer. It appears that it doesn't like the "new AllColumns()" bit. If I specify a column list it works.

Dan Crowther