Every CRM developer knows the level of detail sometimes provided by CRM SoapExceptions. Sometimes the Details or InnerXML properties will reveal the actual error like “The specified object was not found.”, sometimes all we get is the infamous “Server was unable to process request”. These error messages are rather generic and can cause “mild” headaches, i’m sure you know what i’m talking about.

But fortunately the CRM MetadaService gives us opportunities to retrieve additional information about objects. Getting that information will produce some overhead, but it’s a good alternative to manually searching the CRM for exactly this kind of information.

Take a look at the following sample and the code below.
Continue reading →

Recently, while refactoring some code, i faced the problem of converting a Dynamic Entity to a core entity. The SDK and other sources like “Converting DynamicEntity to a Core Entity” and “How to convert DynamicEntity to Strongly typed Business Entity” have been a tremendous help, but one problem remained unsolved – setting the statecode in the target core entity.

Even though it is true, that the process of converting a DynamicEntity into a core entity does not apply when changing the statecode in the CRM itself (take a look at a specific SetState Request class for that e.g. SetStateAccountRequest), i still wanted to make use of the statecode field of the core entity for another reason (data replication).
Continue reading →

  • Categories

  • Tags

  • Archives

  • Blogroll

  • Subscribe

  • -->