- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-26-2018 01:00 AM
Hello,
I'm new to servicenow
How can I add to the incident the caller's manger approval as a first step of approval before proceeding with incident solution, and if that could be done without the need to a create a workflow since I'm trying to keep the standard incident fulfillment process using business rules.
Many thanks
Solved! Go to Solution.
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-19-2018 06:23 AM
No with only one business rule you can achieve it.
your state is being requested in the approval table not in the incident. if manager is looking into his my approval his initial state is in requested.
Write After business rule on incident table. (make inactive the previous business rule and try with this one )
for testing: impersonate manager and check his approval that is being applying or not and check the state also
var apprvl= new GlideRecord('sysapproval_approver');
apprvl.initialize();
apprvl.approver=current.caller_id.manager;
apprvl.sysapproval=current.sys_id;
apprvl.state='requested';
gs.addInfoMessage('approval success!!');
apprvl.insert();
gs.addInfoMessage('approval success!!');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-21-2018 11:09 PM
Hi Ashvini ,
Is the below part right, and on when to run ive put 'AFTER insert'
if (current.approval=='rejected')
{
current.state='Canceled'
//gs.addInfoMessage("rejected")
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-21-2018 11:57 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-22-2018 11:15 PM
Hi yaseen,
As you are cancelling the incident then there is no need to request an approval for that. that would not the best practise. If you want to reject the incident then why would you give it to the approval.
And yes, the code you have written is write but only add these lines. After business rule on insert and update. because we need to update the state of an incident.
if (current.approval=='rejected')
{
try{
gs.SetValue('state','cancelled') //check the correct database name for cancelled state of an incident.
}catch(e)
var msg= e.getMessage();
gs.addInfoMessage(msg);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-22-2018 11:28 PM
Hi sir,
Ive posted the question again and got the below answer on the below link many thanks for your suport
https://community.servicenow.com/community?id=community_question&sys_id=691daa84db231f808e7c2926ca96195f