In opportunity product form, we always pick “Each” as unit. There there is a
way to populate the unit field with “Each”??
I tried with this function on onchange() event in product field. Meaning I
can prepopulate the unit field with “Each” when ever the user picks the
product. But I have issues while saving the opportunity product. It complains
that the record is not exist.
Here is the function:
var CRM_FORM_TYPE_CREATE = 1;
if (crmForm.FormType == CRM_FORM_TYPE_CREATE)
{
var CRM_UOM = 1055;
var oField = crmForm.all.uomid;
var aoItems = new Array();
aoItems[0] = new LookupControlItem("{8FC4B5CC-024D-DC11-89AA-005056A8523E}",
CRM_UOM, "EA");
oField.DataValue = aoItems;
}
Do you have any advice?.
Thanks again,
Uma