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.

No comments:

Post a Comment