De-Duplication Manual Task for Non CMDB Tables

Shrey hurana
Tera Contributor

We have a hardware table where we have made 'Serial Number' as unique so that no 2 records have same serial number.

But for old records we have multiple Hardware records which have same Serial Number. Is there any way so that users can select the Hardware records with same serial numbers and then merge them OR create a custom de-duplication task like we have for CMDB classes.

2 REPLIES 2

Community Alums
Not applicable

Hi @Shrey hurana 

 

No,  it is not possible running the background script. This script is available on the ServiceNow documentation page is only available for cmdb tables .  Please find the below link for cmdb tables. 


You will need to modify the script as per your requirement. For example, if you want run the de-duplication tasks on cmdb_ci_hardware table. Replace the table name in the script. 

add filter query as per requirement and also modify the key unique identifier as serial_number in the match field. 

 

 

https://www.servicenow.com/docs/bundle/yokohama-api-reference/page/app-store/dev_portal/API_referenc...

 

Regards, 

 

srinija

Kieran Anson
Kilo Patron

As an FYI - making serial number unique is strongly discouraged as serial numbers are ungoverned and can be used across manufacturers