How to clone/copy standard change request templates?

Philip Mihaylov
Kilo Contributor

Hello,

I'm searching for a way to copy/clone standard change request templates. Use-cases are the following:

Move large number of standard change request templates from one SNOW instance to another.

Create new template based on the existing one (in our case templates differ only with 2-3 fields).

I see that there is a functionality to export template to xml, but I can't find how to import it back.

 

Thanks and Best Regards,

Philip

1 ACCEPTED SOLUTION

Philip,

That's great! Can you mark my response correct if this has resolved the issue?

Thanks,

Pushpa

View solution in original post

3 REPLIES 3

Pushpa Yadav1
Tera Guru

Try this script: 

var temp = new GlideRecord('std_change_record_producer');
temp.addEncodedQuery('name=Add network switch to datacenter cabinet');// Add Query as required
temp.query();
while(temp.next()){
temp.name = 'Clone Of-' +temp.name;// You can have any field here which you want to be updated
temp.insert();
}

Thanks,

Pushpa

Thanks Pushpa. Works!

Philip,

That's great! Can you mark my response correct if this has resolved the issue?

Thanks,

Pushpa