Customizing Delete Behavior for Records Referenced by Custom Fields
List/record and multiple select type custom fields let users select from a list of values. The list is populated by records of the list/record type set in the custom field definition. Deleting referenced records can cause issues because list/record and multiple select fields depend on them. 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 lets you override the default system behavior when a delete is attempted of a record referenced by values in the custom field.

Default settings for the option depend 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 isn't available for Workflow or Workflow Action custom fields.
-
The Allow Delete of List/Record Values setting for a custom field overrides 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 ignores 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.