Scripting prior Archiving

snowuser111
Kilo Guru

Hello Experts,

 

Please guide and help regarding approach.

I want to archive certain data for that yes there are Archive Rules in servicenow, but i have to modify the data and anonymise prior to that archival. But there is no script available in archive rules form . How should it be acheived then?

 

Many Thanks

 

 

1 ACCEPTED SOLUTION

Anurag Tripathi
Mega Patron
Mega Patron

Id suggest, have a flag (ready for archive) and run a script in the background that will anonymity your record and set the flag, and modify the archive job filter to pick only the records with the flag set to true.

 

 

-Anurag

View solution in original post

3 REPLIES 3

Nia McCash
Mega Sage
Mega Sage

Can you use a 'before' Business Rule that modifies the data before it's written to the archive table?  But, remember that when you do this, you may not be able to restore these records easily.

Anurag Tripathi
Mega Patron
Mega Patron

Id suggest, have a flag (ready for archive) and run a script in the background that will anonymity your record and set the flag, and modify the archive job filter to pick only the records with the flag set to true.

 

 

-Anurag

snowuser111
Kilo Guru

I did like that script in scheduled job and running it daily and mark flag TRUE once anonymised. Archive rules to pick such flagged records.

 

Thanks