Jakew
Consulting, hacking, and motorcycles

Beware the DynamicEntity

Thursday, 8 October 2009 08:00 by jakew

When working with the CRM service by way of the SDK be sure to mark your retrieve requests with ReturnDynamicEntities.  If you do not and your are retrieving a custom entity you’ll get an InvalidOperationException that doesnt basically says “yeah, that query you just did, it didn’t” when it should really provide something like “uh, try that again but try setting RetrunDynamicEntities to true this time.  OK?”.  It’s clear enough if you want to chase the call stack down to where XmlSerializer pukes, but my more descriptive exception would save you some time.

Anyway, hope that helps.

Categories:   Tech
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed