- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 09:58 PM
Hi Team,
I have UI Action in Incident Form. When I click on that it is converting to request. once I submitted that request, I need to populate a message saying Your Incident is converted to Request : REQxxxxxxx
How Can I achieve this
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 11:45 PM
@sriram7You can try below code:
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 10:10 PM
Hi, If you want to show msg at time of submit you can use an onSubmit script . Create the onSubmit script and use this code "g_form.addInfoMessage("message here").
I hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 11:20 PM
Hi,
I need to update this using Business Rule.
I have written after Insert business rule on sc_req_item table.
In this I need to populate Additional Comment message, State, Resolution Fields.
Var gr = new GlideRecord('incident');
gr.query();
if(gr.next())
{
gs.addInfoMessage('Your Incident is converted to Request : current.number');
gr.state = '3';
gr.resolution code = 'solved';
gr.update();
}
I have written this code for updating Additional Comments, state and Resolution code, But it is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 10:13 PM
HI @sriram7
If your UI Action runs on client side , please use the below sample code.
g_form.addInfoMessage('The top five fields in this form are mandatory');
If server side, please use this.
gs.addInfoMessage('start must be before end');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 11:19 PM
Hi,
I need to update this using Business Rule.
I have written after Insert business rule on sc_req_item table.
In this I need to populate Additional Comment message, State, Resolution Fields.
Var gr = new GlideRecord('incident');
gr.query();
if(gr.next())
{
gs.addInfoMessage('Your Incident is converted to Request : current.number');
gr.state = '3';
gr.resolution code = 'solved';
gr.update();
}
I have written this code for updating Additional Comments, state and Resolutin code, But it is not working