Understanding 'Current' and 'Previous' in ServiceNow Business Rules
- kelly.ryu
- Mar 19
- 2 min read
Updated: Mar 30

ServiceNow Business Rules are essential server-side scripts that execute during database operations like insertions, updates, deletions, and queries. To effectively manage these operations, ServiceNow developers and administrators must thoroughly understand two important objects: current and previous. These objects allow scripts to access and evaluate a record's old and new states, enabling precise control and decision-making within the ServiceNow platform.
What are current and previous Objects?
The current and previous objects are both GlideRecord objects provided automatically by ServiceNow during Business Rule execution. Here's what they represent:
Current Object:
Represents the new or updated state of the record during a business rule execution.
Contains all updated field values at runtime.
Accessible in all synchronous business rules (before, after, insert, update, delete).
Example: If an incident's state changes from 'New' to 'In Progress,' current.state will be 'In Progress.'
Previous object:
Represents the original state of the record prior to the current operation.
Only available during record updates and deletes (not insertions or asynchronous rules).
Example: If an incident was previously assigned to no one, and now assigned to a user named John, previous.assigned_to will be empty while current.assigned_to will contain John's user ID.
Practical Example in Script:
if (current.state == 'In Progress' && previous.state != 'In Progress') {
gs.eventQueue('incident.state.changed_to_in_progress', current, previous.state, current.state);
}
Troubleshooting Common Issues:
Issue: previous object being null or empty.
Cause: Typically happens during insert operations or asynchronous business rules.
Resolution: Ensure you're using previous only in contexts where it’s available (updates, synchronous rules).
Alternative Solutions:
Use current.changesTo() or similar built-in methods instead of direct comparisons for better readability and fewer errors.
Leverage business rule conditions to trigger logic selectively, avoiding unnecessary script execution.
Understanding and properly utilizing the current and previous objects in ServiceNow business rules significantly enhances your capability to implement precise logic. Remember to:
Use current for new or updated values.
Rely on previous to reference original values, particularly in update scenarios.
Avoid using previous in insert or asynchronous contexts to prevent script failures.
Prefer built-in GlideRecord methods like changesTo() to simplify and enhance your business rule scripts.
By applying these insights, you'll enhance your ServiceNow implementation's accuracy, maintainability, and efficiency.