Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Dynamic related record tables

The dynamic related records feature uses different tables to store context and definition information.

The following tables support the configuration of the dynamic related records feature. These tables extend the sys_metadata table.

Records in the Related Record Context [sn_related_record_context] table define the context in which related records appear in the Related Records tab. This includes the following information:

  • The selected table. You can create context records for source records (such as customer service cases) or playbook activities (such as adding additional members to an onboarding case).
  • Additional conditions that apply to the selected table. These conditions determine when the related record definitions for the selected table are executed.
  • The related record definitions to execute. These definitions identify the data to be retrieved, such as SLAs or emails.
FieldDescription
NameThe unique name of the context record.
Applies to tableThe table that stores the record type for the context record. To display related records for a source record, select the table that stores the source record. For example, Case \[sn\_customerservice\_case\]. To display related records for a playbook activity, select the table that stores the activities: Activity Execution \[sys\_pd\_activity\_context\].
Primary reference field

The primary field from the Applies to table that is passed to the Context Related Record Definition for evaluation. The value is used by the scripted query in the definition. The following data types are supported:

  • Sys ID
  • Doc ID
  • Reference
Secondary reference field

The secondary field from the Applies to table that is passed to the Context Related Record Definition for evaluation. The value is used by the scripted query in the definition. The following data types are supported:

  • Sys ID
  • Doc ID
  • Reference
ApplicationThe application to which the context record applies. This is a read-only field.
ActiveEnables the context record.
InheritedWhen enabled, the context record also considers tables that extend from the Applies to table.
ConditionsConditions that are applied to the records in the Applies to table.

Records in the Related Record Definition [sn_related_record_definition] table identify one type of data to be retrieved, such as active contracts, case tasks, or SLAs. A definition record includes:

  • The display label, which appears in the filter dropdown list in the Related Records tab.
  • The table to be queried from. For example, the Email [sys_email] table.
  • If needed, primary and secondary reference tables.
  • Scripted conditions that further specify which fields to query from.

You can create definition records for each type of data to include in the Related Records tab and then associate the definitions with one or more context records.

FieldDescription
Display labelThe unique name of the related record definition. This label appears in the filter list in the Related Records tab.
Primary reference tableThe primary table used in the definition script. At runtime, the script expects to get passed a record of this type. If you entered a data type in the Primary reference field in the related record context, enter the table for that data type.
Secondary reference tableThe secondary table used in the definition script. At runtime, the script expects to get passed a record of this type. If you entered a data type in the Secondary reference field in the related record context, enter the table for that data type.
ApplicationThe application to which the definition record applies. This is a read-only field.
Queries fromThe table that stores the related record data to be retrieved.
ActiveEnables the definition record. A definition must be active for the related records of that type to be displayed in the Related Records tab.
ScriptCreate a script that defines which records are retrieved based on the context.

The Context Related Record Definition [sn_m2m_context_related_record_defn] table defines the relationship between a context record and its associated definition records.

When you open a context record, you can see the associated definition records in the Context Related Record Definitions related list.

FieldDescription
Related record contextThe context record.
Related record definitionThe name of the related record definition associated with the context record. The system uses this definition to determine which records to retrieve.
ApplicationThe application to which the context record applies. This is a read-only field.
Order

The order determines where the related record type appears in the filter list in the Related Records tab. The order for this related record definition is compared with the order of the other definitions associated with the Related record context to determine the order of appearance in the filter list.

If more than one context applies to a record, the system evaluates the order for all of the related record types. If there is a duplicate related record type, the system takes the record type with the lowest order value.

ActiveEnables the Related record definition for this context record.