How can I run a business rule retro-actively?

taylor11
Giga Contributor

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! 

7 REPLIES 7

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

Like this?

var gr = new GlideRecord('sys_user');

Ankur Bawiskar
Tera Patron
Tera Patron

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

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader