How to create a standard change request record from the workflow of a request item?

Nilofer1
Giga Expert

When a catalog task is created in workflow of a request item then a standard change record also needs to be created. 

I have written a runscript as below but its not working: 

var stdchange=new GlideRecord('change_request');

stdchange.initialize();

stdchange.addTemplate('name of the standard change template');

stdchange.insert();

 

what am i missing? please help. 

 

1 REPLY 1

Anand Kumar P
Giga Patron
Giga Patron

Hi @Nilofer1 ,

var stdchange=new GlideRecord('change_request');
stdchange.initialize();
stdchange.setValue('template','name of the standard change template');
stdchange.insert();

Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand