How to delete all records which i have loaded through import sets to hardware table.

Chaitanya Redd1
Tera Guru

Hello Team,

I/'m trying to delete all the records which I have loaded using import set. i'm trying to delete manually but some how few records are still showing up when I click on that records it's showing record not found. 

Can anyone help me to delete all the records using any script.

 

Thanks,

JRY

1 ACCEPTED SOLUTION

DirkRedeker
Mega Sage
Hi It looks as if you put in a class value in your transform script that is invalid. Can you share a screenshot of ghd ghost records list including the "class" column? Can you change the value of the class field manually and delete the records afterwards? Let me know if that answered your question and mark my answer as correct and helpful BR Dirk

View solution in original post

17 REPLIES 17

Tanushree Doiph
Mega Guru

Hi Jry,

Please refer below link,

https://docs.servicenow.com/bundle/orlando-platform-administration/page/administer/import-sets/task/...

 

Please mark correct and helpful.

Thanks

Tanushree

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

sample script below; run this in background script

var gr = new GlideRecord('import_set_table');

gr.query();

gr.deleteMultiple();

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

I tried it but not working still I can see ghost records which are there in hardware asset list when I clicking on the any records it's showing record not found

Hi,

Is this for import set table?

Can you share screenshot?

Regards
Ankur

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