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.

How to create templates with custom comment field?

Luiz8
Tera Contributor

Hi Community,

Does anyone know how to create a template looking for variables present in the current record?
For example, I would like to include the name of the caller in the template comment message as shown in the attached image.

Thank you in advance.

1 REPLY 1

SVimes
Kilo Sage

I've attempted to use templates like this before. Unfortunately, that did not work using javascript for a text field like Work Notes and Additional Comments. I ended up creating a UI Action for the form that opened a modal UI Page where I have configured a number of scripted templates that gather details from the form as you are trying to do. Our users are able to select options from a dropdown to filter to specific types of templates. Then, they select the actual template they want to apply from a second dropdown. Finally, they click OK to apply it to the record. For our use case, this was set up only for the incident table.

Sable Vimes - CSA