Add fields or variables to the incident work notes when it is created
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello everyone,
I need your help in explaining how to add fields or variables to the incident work notes when they are created.
For example:
In this section, add a variable called "street" which was already captured in the service portal form.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi there @Alex Suarez
You can add Record Producer variables into the initial Work Notes of the Incident . You need to add logic either in the Record Producer or in a Business Rule that runs at insert. the easiest way is to add a small Business Rule (Before Insert) on the incident table. Record Producer variables are stored in RITM sc_item_option records, so you pull them using producer or via the RITM reference.
BR snippet:
if (current.request_item) {
var street = current.variables.street || '';
if (street) {
current.work_notes = "Street: " + street + "\n\n" + current.work_notes;
}
}
Kind Regards,
Mohamed Azarudeen Z
Developer @ KPMG
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi Mohamed, thank you so much for your support.
I'd like to identify the business rule that currently adds these fields to the initial work notes as "field changes" and modify it to add the "street" variable, without creating a new one.
Do you know if ServiceNow has a default business rule to add the fields to the initial work notes as shown in the "field changes" image?
I would greatly appreciate any information you can provide.
Alex