Showing posts with label Crm 2011. Show all posts
Showing posts with label Crm 2011. Show all posts

Wednesday, May 30, 2012

BizTalk 2010 - CRM 2011 Errors and Resolution

Hi,
I just thought of posting few common and few uncommon Errors :) you might face during Integrating BizTalk with CRM 2011.


<Fault xmlns="http://www.w3.org/2003/05/soap-envelope"><Code><Value>Sender</Value><Subcode><Value xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:    DeserializationFailed </Value></Subcode></Code><Reason><Text xml:lang="en-US">The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://schemas.microsoft.com/xrm/2011/Contracts/Services:entity. The InnerException message was 'There was an error deserializing the object of type Microsoft.Xrm.Sdk.Entity. The value '' cannot be parsed as the type 'Int32'.'.  Please see InnerException for more details.</Text></Reason></Fault>


Resolution: The File send to CRM has a field with wrong format. Ie the field in CRM expects a Integer Value but a string is send. Check CRM for "Whole Number" fields or Option Set fields. Even Option Set fields needs number as a int without any characters like "," or "." . Change the XSLT value script in BizTalk map to have xs:int as datatype for the Integer field.

For a Float Field in CRM = xs: double in BizTalk value mapping XSLT.

I will keep updating this Post with new Errors encountered in CRM.


Sunday, April 15, 2012

CRM 2011 Attribute Lookup: Integrating BizTalk with CRM 2011

Hi Friends,
I have been working on a CRM 2011 Integration using WCF Adapter from BizTalk. Richard Seroter has done a very good job by posting 2 Articles on it which clears most of the basics.
Past few days I have been struggling to get this Lookup thing right. I tried the solution which Richard mentioned but seems he dint test it well...it fails.  I had also posted over msdn forum for help but nothing came up.
http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/3b08958a-cd8e-480d-9b35-eccbdfca04f8/#3b08958a-cd8e-480d-9b35-eccbdfca04f8

But this German link helped me a lot. I had to translate it to English but it was worth every penny.
http://www.msdynamics.de/viewtopic.php?f=60&t=12408

So what was the solution?
I had 2 Script functoids as shown in the map below as Richard has in the basic one first Series of CRM Integration.
http://seroter.wordpress.com/2011/02/10/the-good-bad-and-ugly-of-integrating-dynamics-crm-2011-and-biztalk-server-2010/

The C# Script in Functoid1 returns the name of the Key(Attribute Name) which is simple.

The important thing is mapping the value field where we lookup the other Entity which is shown as below

The Script is as below.


This XML works fine against CRM
LogicalName is always the name of the Entity.

So if you would like to work with CRM lookup its easy but hardly any resources online and strangely nothing from Microsoft on documentation regarding Integrating CRM 2011 with BizTalk.
I wasted good enough days banging my head to make this lookup work but its all is worth when you see it working finally.
Just mail me if you have any questions regarding Integration CRM 2011 using WCF Adapter in Biztalk.
Finally thanks Richard for post such valuable content regarding Integrating CRM 2011 using WCF BizTalk Adapter.

Hope this post helps you all!