On change request form in description field few questions should populate.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2024 05:40 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2024 05:57 PM
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#...
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2024 06:03 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2024 03:09 PM - edited ‎04-27-2024 03:09 PM
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
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2024 04:28 AM
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