Microsoft KB Archive/873313

= The default value of a record is not populated in Microsoft Dynamics CRM =

Article ID: 873313

Article Last Modified on 12/12/2006

-

APPLIES TO

 Microsoft Dynamics CRM 3.0 Microsoft CRM 1.2 Microsoft CRM Software Development Kit, when used with:  Microsoft Dynamics CRM 3.0

 Microsoft CRM 1.2 

-

<div class="symptoms_section">

SYMPTOMS
The default value of a record is not populated in Microsoft Dynamics CRM.

<div class="cause_section">

CAUSE
The value of a field is not automatically set to its default value when you create a record outside the Microsoft CRM application user interface. For example, you create a record through a platform call using the Create method and do not set the value of a field in the IncidentXML parameter.

<div class="resolution_section">

RESOLUTION
The XML string that is passed to the create method must contain any custom fields as shown by the following example:

// Set up the XML string for the new case (incident). strIncidentXml = &quot; &quot;; strIncidentXml += &quot; &quot; + &quot;Case&quot; + &quot; &quot;; strIncidentXml += &quot; &quot; + strAccountId + &quot; &quot;; strIncidentXml += &quot; &quot; + &quot;1&quot; + &quot; &quot;; // Workaround for a custom field. For a boolean, the default value must be set to &quot;0&quot;. strIncidentXml += &quot;<CFBCustomField>&quot; + &quot;0&quot; + &quot;</CFBCustomField>&quot;; strIncidentXml += &quot; &quot;;

<div class="moreinformation_section">

MORE INFORMATION
When you use the Microsoft Dynamics CRM 3.0 SDK to insert data into any of the system entities or into any of the custom entities, you can save null values. Additionally, the Microsoft CRM 3.0 SDK does not trigger any of the business rules that are defined in the customization tool. This is a known behavior of the Microsoft CRM 3.0 SDK if you use Microsoft BizTalk Server Adapter for Microsoft CRM to load data into the Microsoft CRM database. When Microsoft CRM uploads the data, the business rule validations for the fields are not triggered. This occurs because the BizTalk Server Adapter for Microsoft CRM was built by using the Microsoft CRM SDK. The Microsoft CRM SDK does not trigger business rules that are defined for fields, and the Microsoft CRM SDK does not test for null values. This is a known limitation of the Microsoft CRM SDK.

Keywords: kbmbsemail kbmbsworkflow kbmbsmigrate kbinfo KB873313

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.