Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Core ServiceNow APIs/GlideRecord/Compare_2_records/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Compare Two Records Using GlideRecord (Global Scope)
# Comparing 2 records and identify differences

This snippet compares two records from the same table in ServiceNow field-by-field using the **GlideRecord API**.
It’s useful for debugging, verifying data after imports, or checking differences between two similar records.
Expand All @@ -25,6 +25,7 @@ Run this script in a **Background Script** or **Fix Script**:
compareRecords('incident', 'sys_id_1_here', 'sys_id_2_here', false);
```
---

## Example Output
```js
short_description: "Printer not working" vs "Printer offline"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/**
* Comparing 2 records and identify differences (GlideRecord)
* Compare two records in a ServiceNow table field-by-field.
* Logs all field differences between the two records, including display values.
*
Expand Down
Loading