Customizing Delete Behavior for Records Referenced by Custom Fields
List/record and multiple select type custom fields provide a list for users to select values. The list of values is populated by records of the list/record type set in the custom field definition. Because list/record and multiple select custom fields are dependent on these referenced records, deletion of these records can be problematic. For example, a custom field called Color can be dependent on a custom record type called Color List. If a value is deleted from Color List, for example Purple, any records with a Color custom field value of Purple are impacted.
For custom field definitions that have a type of List/Record or Multiple Select and have the Store Value option enabled, the Allow Delete of List/Record Values option is available. The Allow Delete option permits overrides of the default system behavior when a delete is attempted of a record referenced by values in the custom field.

Default settings for the option are based on the record type selected in the List/Record field:
-
For entity, item, event, and transaction type records: default is Allow and Set Dependent Field Values to Null.
When a delete of a referenced record sets a dependent custom field to a null value, a system note is logged on the record containing the dependent custom field value. The note specifies the user who deleted the referenced record as the Set by value, and Unset as the Type.
-
For other record types (including custom records): default is Prevent and Return Error.
When a delete of a referenced record is prevented due to dependent custom field values, the error message includes a link to a page listing the dependent records. The Dependent Records page includes the name of the referenced record at the top of the page. The list on the page includes a line for each dependent custom field, with the following details: custom field type, name of custom field, and name of record containing the custom field with a clickable link to the record.
Note the following:
-
The Allow Delete of List/Record Values setting is not available for Workflow or Workflow Action custom fields.
-
The Allow Delete of List/Record Values setting for a custom field takes precedence over whether the field is mandatory. Therefore, so a setting of Allow and Set Dependent Field Values to Null can produce nulled values even for mandatory fields. To avoid nulled values, select a setting of Prevent and Return Error for mandatory fields.
-
SuiteBundler does not respect the Allow Delete of List/Record Values setting. If a referenced record is deleted as part of a bundle operation, such as uninstall, the treatment of dependent custom field values conforms to SuiteBundler rules.