- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2024 05:09 AM
I think I already know the answer, but want to be certain. If we take the [task] and [incident] tables for example, I am aware the [incident] table extends the [task] table. When looking at API Explorer, I can see the [incident] inherits the fields from [task] + has its own unique fields. I can also trace the sys_id of the incident and locate it in the [task] table.
My questions:
- If a task and incident have a field in common, for example opened_at, then does this field actually exist in the incident table at all, or is it just observing the field stored in the [task] table?
- Will the value of the opened_at field always match between the [incident] and [task] table for the same sys_id, or can it ever be different?
I get why inheritance is used, it avoids field duplication and a base class like [task] serves many different ticket types, but what I am unfamiliar with is the instances of the fields. For example, if I look at the [incident] table using API Explorer I can see that all the fields from [task] + [incident] are listed, but do the [task] fields actually exist in the [incident] table or is this just the illusion given to the end-user where the fields shown are just reflecting what is actually found in the [task] table?
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2024 08:01 AM
Hi @SB87
Below might help you :-
The field opened_at does not exist as a separate physical field in the [incident] table. It's a reference to the opened_at field in the [task] table. When you access the opened_at field on an incident record, ServiceNow follows the reference to the [task] table and retrieves the value from there.
Yes, the value of opened_at will always match between the [incident] and [task] table for the same sys_id. Since the [incident] table references the [task] table's field, any changes to the opened_at field in the [task] table will be reflected in the [incident] table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2024 08:01 AM
Hi @SB87
Below might help you :-
The field opened_at does not exist as a separate physical field in the [incident] table. It's a reference to the opened_at field in the [task] table. When you access the opened_at field on an incident record, ServiceNow follows the reference to the [task] table and retrieves the value from there.
Yes, the value of opened_at will always match between the [incident] and [task] table for the same sys_id. Since the [incident] table references the [task] table's field, any changes to the opened_at field in the [task] table will be reflected in the [incident] table.