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.

Add custom change fields in template form

dharanidd
Kilo Contributor

Hi All,

I need to add type field in change request template form. Please suggest me how to achieve this..

Attached Screenshot for your reference.

I need to have type field also here.

find_real_file.png

8 REPLIES 8

Thanks Ali.


But I need this as, If I have opened any normal change and if I give create new template, then type field value should auto populate as normal.


In case If I have opened any emergency change and if I give create new template, then type field value should auto populate as emergency.


You can create a 'Create Template' UI action on change request table with the following script, Please try and let me know if it works



var type = current.type;  


var temp = new GlideRecord('sys_template');  


temp.initialize();  


temp.table = ('change_request');  


temp.template = 'type=' + type;  


temp.insert();  


     


Thank You


Please Hit Like, Helpful or Correct depending on the impact of response


In toggle template bar in change request form. There is + icon to add template which opens the below page. I also need the type field there. Type field value should get auto populated in the below page.



find_real_file.png


find_real_file.png


I don't think you can modify the + button from oob template bar



Thank You


Please Hit Like, Helpful or Correct depending on the impact of response