The default duration and due date are annoying in CRM, Sonoma Partners has provided some basic code to set the default duration to blank and the due to date to the current date and time stamp. This is opposed to the following image where the due date is blank and the duration is 30 minutes.

var CRM_FORM_TYPE_CREATE = 1;
var CRM_FORM_TYPE_UPDATE = 2;
switch (crmForm.FormType)
{
case CRM_FORM_TYPE_CREATE:
crmForm.all.actualdurationminutes.DataValue = null;
crmForm.all.scheduledend.DataValue = new Date();
break;
case CRM_FORM_TYPE_UPDATE:
// do nothing
break;
}

Categories
Tag Cloud
Blog RSS
Comments RSS
Last 50 Posts
Back
Void « Default
Life
Earth
Wind
Water
Fire
Light 