- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2021 04:41 AM
Can someone explain me what current and previous in servicenow business rule with examples.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2021 05:19 AM
Hi,
As you know business rule execute when CRUD operations happen on any record.
When before and After Business rule is running it gets two copy of the record which is changed.
Previous is a copy of same GlideRecord object storing old values (Original copy)
Current is copy of GlideRecord object storing New values (Updated copy)
For Example:
When you opened any incident it was having state as new and Assigned to empty (This will be your Previous copy). Now you changed state and assigned_to fields and saved form (This is updated i.e current copy).
If you try to log below lines for above example :
gs.info(previous.state); // it will print new (i.e 1)
gs.info(previous.assigned_to); // it will print nothing (assihnedto was empty)
gs.info(current.state); // it will print In Progress (i.e 2)
gs.info(current.assigned_to); // it will print sys_id of assigned_to user
Thanks,
Anil Lande
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2022 06:55 AM
To identify the business rules and flows that run on a record when inserting, updating, deleting, displaying or querying the record the DevTools' WhatRuns button comes in handy.
As the name suggests it shows you what runs on a record (including business rules on parent tables).
DevTools contains a truckload of re-usable functions and features for developers.
Fork at will:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2023 09:49 PM
I made a 2 part video providing details, examples and possible pitfalls and fixes.