Get one record by sys_id
servicenow_get_recordFetch a single record by its 32-character sys_id from a specified table. Returns a clear 'no such record' message if the ID does not match any entry.
Instructions
Fetch a single record by its 32-character sys_id. Use this after a query has given you an id, or when the user supplies one. Returns a clear 'no such record' message rather than an error if nothing matches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | System name of the table, not its UI label: 'sys_user' rather than 'User', 'incident' rather than 'Incidents'. Use servicenow_list_tables to find it. | |
| fields | No | Columns to return. Naming the few you need is markedly cheaper than the default of every column, and keeps results readable. Omit for all columns. | |
| sys_id | Yes | The record's 32-character hexadecimal sys_id. | |
| display_value | No | 'true' (the default here) resolves references to human-readable names, so assigned_to reads 'Alice Smith'. 'false' returns raw sys_ids, which you want when feeding a value into another query. 'all' returns both. |