How can I run a business rule retro-actively?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2018 07:45 AM
Hi all,
I have a new business rule that is working beautifully for mapping data from one table to another. This is working on insert/update and is currently working on new or updated records. However, I would like to apply this business rule to existing records that are already in the system. What is the best way to do this?
Thank you for your help!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2018 08:13 AM
You can almost use the same piece of the code, however in the first line itself it is mentioning the current record right which means the record on the table that business rule was running.
So you have to simply write a gliderecord query on the table to filter the desired record and do an operation.
Current wont work in scheduled job, becuase it doesnt know which table it is being referred, so do a gliderecord query and use the remaining code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2018 08:16 AM
Like this?
var gr = new GlideRecord('sys_user');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2018 07:52 AM
Hi Taylor,
For updating existing records in that table use fix script and write your code there.
Why to use fix script instead of schedule jobs:
1) you can monitor the fix script status
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader