Archiving High Volume data

Lalith Reddy
Tera Contributor

Hi 

We got a requirement to archive data from Audit Result Table which consists of High Volume records and this archiving should be done only on weekends so that it will not effect slowness or any issue with the instance.

Currently if we use the archive rule it is taking 10,000 records for every run and we can't achieve it in 1 month.

1.If I tried to run fix script with same Archive rule script by setting up limit it is not working.

2.If I tried to run fix script with below code it is not working

"var oldTable = 'OLD TABLE NAME'
var newTable = 'TARGET TABLE NAME'

var oldTasks = new GlideRecord(oldTable);
oldTasks.get('SYS ID OF ONE RECORD');
oldTasks.query();
oldTasks.autoSysFields(false);
oldTasks.setWorkflow(false);
oldTasks.sys_class_name=newTable;
oldTasks.update();"

 

If there is any work around for this Please suggest.

TIA

0 REPLIES 0