Tuesday, January 11, 2011

CRM: Making fields required without being "required"

I ran into a set of requirements recently that called for a CRM field to be required for data entry, but not expressly required for workflow. Here's a Javascript quickie that sets the field requirement level -- just drop in the associated entities Form.Onload ScriptBlock. Not sure what makes something business recommended (the blue askerisk)... but this is a good start

crmForm.SetFieldReqLevel("statecode", 1);

1 = Required
0 = Not Required
2? = Recommended

No comments: