Automation of the "Run All" button on the CMDB Workspace > De-duplication templates

andymcdonald
Kilo Guru

I have been asked to implement some automation to run all the de-duplication templates.  Is there any way to do this as some sort of scheduled job or script execution?

1 ACCEPTED SOLUTION

yes! I figured this out and you have confirmed.  Appreciate it!!

 

View solution in original post

5 REPLIES 5

Kieran Anson
Kilo Patron

Hi Andy,

The script to use is 

sn_cmdb.DuplicateTemplate.runTemplate(templateId);

thanks Kieran, but that begs the question: how can I get the list of templateIds that need to be run?  Also, it seems that sn_cmdb.DuplicateTemplate is invisible to me, true?

 

Your templateIds are the sys_ids of de-duplication templates you wish to run. You can GlideRecord query the cmdb de-duplication template table and then loop through them. 

 

In terms of invisible, not all scripts are script includes. This being an example. This lives in the java layer and isn't accessible to us to view the code 

yes! I figured this out and you have confirmed.  Appreciate it!!