2010/05/17

Making a field required based on picklist value

if (crmForm.all."PickListAttributeName".SelectedText == "Other")
//or use to .SelectedIndex or .DataValue
{
crmForm.SetFieldReqLevel("theOtherField".id, 1);
//set it to required
}
else
{
crmForm.SetFieldReqLevel("theOtherField".id, 0);
//set it to not required
}