How to store various types of mscrm values has always plagued me. Maybe it is because I have not studied it carefully. this is not a problem today: in the Web service provided by crm3.0, The crmdatetime type does not have the isnull and isnullspecified attributes. In this case, how can we set the field value of the crmdatetime type to null? The SDK does not address this issue. Please refer to the following section:
Assigning null values
When you update an entity instance there is a mechanic in place to differentiate the absence of a value fromNullValue. To set an attribute valueNullYou must set bothIsnulL andIsnullspecifiedToTrue. For attributes of TypeString, You must assign the valueString. Empty.
This is a text on msdn about the mscrm type, the original article here: http://technet.microsoft.com/en-us/library/aa685869.aspx. here we have basically introduced various types, but we have not mentioned how to deal with the crmdatetime type. it indicates that Ms's strength in CRM is not enough. At least the document update is not very timely. what should I do? Search results continue to flip back, patiently view, finally was found by me: http://www.crm.microsoftproducts.net/%5C/How-to-update-crmdatetime-field-to-NULL_-40404.aspx. originally, only a new crmdatetime is required. set its value attribute to null or. as follows:
Code
Task t = New Task ();
T. activityid = New Key ();
T. activityid. Value = New GUID ( " {0f85395d-ad39-db11-9372-001438b86853} " );
T. scheduledend = New Crmdatetime ();
T. scheduledend. Value = String . Empty;
Service. Update (t );
That's easy! But if you don't try, how can you think of it?
Summary: various types of values in mscrm will be saved as null if you clear them on the page (clear the text box ).CodeIf this parameter is set to null, the preceding method is used to set null values for various types.