3.1.4.11 ValidateCustomField

The ValidateCustomField event captures the common validation rules for the CustomField data. The rest of the section assumes the CustomField to be validated is passed as a parameter with the name customField.

The following validations MUST pass for customField to be valid:

  1. The customField.customFieldName MUST NOT be NULL.

  2. The values of customField.customFieldOrigin and customField.customFieldType MUST NOT be 0.

  3. If the value of customField.customFieldType field is equal to CustomFieldType.Freeform, then the number of entries in the collection customField.CustomFieldValues MUST be 0.

  4. If the record identifier of the customField object, meaning that customField.customFieldId is not NULL, then validate the following.

    • For each entry customFieldValue in the collection customField.CustomFieldValues, the customFieldValue.ParentCustomFieldId MUST either be NULL, or its value MUST be equal to customField.customFieldId.