Mitch Milam's Dynamics CRM Discussions
Knowledge found and lost while working with Microsoft Dynamics CRM
-
Dynamics CRM 3.0 Client-side Programming: DefaultValue
I was experimenting with the form control property .DefaultValue last night and found, much to my surprise, that it doesn't work.
From the CRM 3.0 SDK:
{Field}.DefaultValue
Get/set property.
Specifies the default value for the field.
Ideally, you would put the following code into the Form OnLoad event:
/* if the form type is Create */
if(crmForm.FormType == 1)
crmForm.all.new_myfield.DefaultValue ='Purple';
But, as I mentioned .DefaultValue doesn't work, so use the following:
/* if the form type is Create */
if(crmForm.FormType == 1)
crmForm.all.new_myfield.DataValue ='Purple';
Customization, Dynamics CRM 1,001 viewsLeave a reply



