Reference fields

When designing the data structure for a hotel, you may want to link a guest's record with the room they have checked in to. It won't be good for business if we don't know who has checked in where! This is exactly what a reference field does; it creates a link between two records, one pointing to another.

When we examined the URL for a particular record, it contained two parts: the table and the sys_id value of the record. These are the two items needed to reference a record. So when you create a reference field, you need to select which table it should point to. And the contents of the field will be a 32-character string. Sounds familiar? Yep, you will be storing a sys_id in that field.

Tip

Reference fields are one of the most important ...

Get Mastering ServiceNow now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.