How can I exclude Hr_Case table from cloning from PROD to NON -PROD??

BhupeshG
Tera Guru

I am currently using following sample script to delete in NON -PROD which takes a long time.

 

var gr = new GlideRecord('hr_case')

gr.addQuery('state',4);; //to delete all resolved HR cases

gr.setWorkflow(false);

gr.deleteMultiple();

5 REPLIES 5

James Proske
Kilo Expert

Thanks but that is not really a good solution.  Both the dev and test environment have many good HR Cases created without sensitive data I have not found a good solution that permits those to be perserved, including all their attachments, comments, kb attachments, etc.  The loop does not appear to be much faster and as our production database grows the time will only get longer.