To specify a default value for a datetime field in your .Net code you must first make sure that the default type property is set to  Sage.DefaultTypes.DefaultValue (1). From the documentation:

"Namespaces ? Sage.CRM.Controls ? Entry ? DefaultValue

Specifies the default value given to the field when a new record is created. This property will only be used if the DefaultType property is set to Sage.DefaultTypes.DefaultValue (1)"

An example of how to do this is specified in the code below:

Entry dateTime = this.EntryGroups[0].GetEntry("equi_datetime");
dateTime.DefaultType = (int)Sage.DefaultTypes.DefaultValue;
string lDateFormat = "dd/MM/yyyy";
dateTime.DefaultValue = DateTime.Today.AddDays(1).ToString(lDateFormat);

Depending on the default value that is specified in the UI for your datetime field the DefaultType property may not be set to 1 so you need to make sure that you overwrite this value in your code so that the default value you specify in your code is used. For example, a datetime field that has a default value of Current Date/Time set in the Administration -> Customisation area of the UI will have a DefaultType of 6 so unless you overwrite this value the default value specified in your code will be ignored. 

More information:

For text fields it is not always necessary to set the default type as usually the default type for these fields will be either 0 or 1 which will mean that the default type in your code will be used.


SageCrmNet.chm Class Library Documentation included with the CRM SDK.