Defining custom relationships
Adding a Reference field on table A
that points to table B
, creates a relationship that ServiceNow can understand. This allows you to add a related list on records in table B
, that displays the records from table A
that are linked to it.
Creating a M2M table via the sys_m2m
relationship definition table also creates a relationship that ServiceNow can understand. Because of this, you can add a related list on either of the two tables linked by the relationship, to show related records from the other table.
If you want to define a more complex relationship, however, ServiceNow allows you to do that as well! Let's explore an example of defining a custom relationship for tickets generated from.
Requests have a sort of task-hierarchy. The Request[sc_request]
record is the parent of one of more Requested Items [sc_req_item]
(commonly called RITMs), which may be the parent of one or more Catalog Tasks [sc_task]
, not to be confused with the base system Task [task]
table...