On change request form in description field few questions should populate.

Tulasiram1
Kilo Guru

On change request form in description field few questions should populate. Whenever user click on create change request then in description field below questions template should populate. So that users can easily fill those question instead of typing below questions.

Hostname:
IP Address:
Impact:No impact
Reason for Change:
Technical Artifacts:
Business Justification:
Server Reboot required: Yes / No: 
Downtime required: Yes/ No (If Yes, Mention duration)- minutes

4 REPLIES 4

Murthy Ch
Giga Sage

Hi @Tulasiram1 

It's not a best practice to display the template for every user when creating a new change request.

I would recommend to apply the template based on some conditions.

So, for applying the template you can make use of the below API:
https://developer.servicenow.com/dev.do#!/reference/api/washingtondc/server_legacy/c_GlideRecordAPI#... 

Thanks,
Murthy

Hello Murthy,

 

Right now All the users are filling it manually. So that is why raised this question. is there any other way to display the questions in description field?

 

Hey @Tulasiram1 

Sorry for the late reply. You can actually make use of the above API which mentioned.

Create a template first on the sys_template table on change request with necessary field information. 

Below is the sample code that you can run during onload in your change request table:

 

function onLoad() {
    if (g_form.isNewRecord()) { //updated the condition as per your requirement
        applyTemplate('be052a46477542106c633833e16d4312'); //replace with your sys_id of your tempalte
    }
}

 

(=tested)

Please post here if you stuck anywhere else

 

Thanks,
Murthy

Ramz
Mega Sage

Hi @Tulasiram1 

Is create change request a UI action ?

If so you can set the description to populate whenever user clicks that UI action

 

Mark my answer helpful/correct if it resolved your query