Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Creating standard change template from workflow

shivaprasad3
Kilo Contributor

Hi All,

I wanted to create the standard change template from workflow.

The workflow is triggering for one of the catalog item where all the required information are captured.

I have created the below script to create standard change template and template is getting created but i am not able to pull the values to fields like Implementation plan,backout plan , justifications,category and subcategory fields as these fields are from 'Change request values'  section.

 

var a = new GlideRecord("std_change_proposal");
a.initialize();
a.opened_by= current.variables.RequestedBy;

a.business_justification = current.variables.justification;//which is not working as expected

a.std_change_producer = current.variables.short_description;//which is not working as expected

a.short_description = current.variables.description;//working as expected as this field is available in std_chg_propasal
a.category = current.variables.category;//which is not working as expected


a.description = current.variable.description;
a.implementation_plan = current.variables.implementation_plan;


a.insert();

 

 

 

Please let me know how to pass the values to "implemention plan,backout plan,justification,category and subcategory" which are available in the standard change template.please find the screenshot for same.

find_real_file.png

10 REPLIES 10

Did this solution work? Please mark my responses as helpful and/or correct if applicable.

Thanks.