Wednesday, June 30, 2010

Error publishing Workflows with 'Send Email' step (CRM 4.0)

You might encounter an error while trying to publish workflows with an 'Email Step' added
Error : "An error occured when the workflow was being created. Try to save the workflow again."


The crm logs shows the error as
"Type System.Globalization.CultureInfo is not marked as safe ... in web.config"


Here is the resolution
Add the below entry into the web.config file available in the crm installation directory
Eg : c:\program files\microsoft dynamics crm\crmweb


<authorizedType Assembly="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.Globalization" TypeName="CultureInfo" Authorized="True"/>


Try publishing the workflow again. That should work  :-) !!

Saturday, April 24, 2010

Update Rollup 10 - Microsoft CRM 4.0


Update Rollup 10 for Microsoft Dynamics CRM 4.0 is available
This is a tested, cumulative set of updates for Microsoft Dynamics CRM 4.0. It includes performance enhancements that are packaged together for easy deployment.

Click here to download




Thursday, April 15, 2010

Invalid Argument Error Scenarios - MSCRM 4.0



There are a couple of scenarios, which could generate the above error

 When you create a new record or open an existing record in Microsoft Dynamics CRM 4.0
When you create a new record that contains a date of January 1 in Microsoft Dynamics CRM 4.0, you receive the following error
Invalid Argument
Error code: 0x80040203

This problem also occurs if you open an existing record that contains a date of January 1 after you update from Microsoft Dynamics CRM 3.0 to Microsoft Dynamics CRM 4.0.
The error message might resembles like the one below
Crm Exception: Message: GetDaylightChanges actual year: 2005,
MinValue.Year: 2006, MaxValue.Year: 9999, ErrorCode: -2147220989,
InnerException: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: GetDaylightChanges actual year: 2005,
MinValue.Year: 2006, MaxValue.Year: 9999
View the Resolution at http://support.microsoft.com/kb/948157/EN-US/


When you import customizations in Microsoft Dynamics CRM 4.0
Here one might come across an error like "Failure: bulkoperation: Invalid Argument"
This problem occurs if you import customizations from a server that has been upgraded to Microsoft Dynamics CRM 4.0 from Microsoft Dynamics CRM 3.0.
View the Resolution at  http://support.microsoft.com/kb/948588/EN-US/


Apart from the above you might also come across an error like "Failure: <relationshipname>: Invalid Argument"
This usually occurs when you try to import a customization file which was exported from a CRM server, which had some unpublished customizations

The Suggested approach would be to search for the relationship name in the customization xml file and find the 2 related entities involved in the relationship. Publish these 2 entities OR  all the entities (preferable) on the source CRM Server and Export them again. That should fix the issue.

If the issue remains consider editing the customization xml file directly. Search for the relationship name in the customization xml file. You will come across a node like the one below in this errorous relationship node.
<field name="aar_contractsignatoryid" requiredlevel="none" imemode="auto" lookupstyle="single" lookupbrowse="0">
  <displaynames />
</field>

You will notice that the ‘displaynames’ node is empty. You can try replacing this node with the one below
<displaynames>
<displayname description="Test Description" languagecode="1033" />
</displaynames>
Make sure you use the appropriate languagecode based on your CRM deployment.
Try importing this file.