Deletion of Bulk HR Profiles

Nitesh Alashe1
Giga Expert

I want to remove bulk HR users profile.
how this can be achieved.

For creation, we have Generate HR Profiles so is there any way to Delete those Generated HR Profiles.

2 REPLIES 2

Rohit Kaintura
Mega Guru

Make a scheduled job and delete those records.

Otherwise, if you will do this by background script then system will not take that much load and can't able to delete those records instantly as number of records is very high.

So, go with scheduled job.

 

Please mark my answer correct and helpful if my answer helped u. Thank you.

giuseppem
Kilo Sage

Just a sample

 

//Set query and uncomment gr.deleteMultiple()

var gr = new GlideRecord('sn_hr_core_profile');
gr.addQuery('sys_created_on', '>', "13-05-2018" );

gr.query();
gs.info("Returned Record" + gr.getRowCount());

// gr.deleteMultiple();

 

Regards