- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2020 03:03 AM
Hi Team,
How to add manual approvals in change request form for normal type of change requests and sent out an email after approval task is manually added
Thanks
Raj
Solved! Go to Solution.
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2020 03:23 AM
Hi Raj,
I believe out of the box New button is disabled on "sysapproval_approver" table so you cannot create it from front end.
you can use script to create manual approval for change request as below
Sample script
var gr = new GlideRecord('sysapproval_approver');
gr.initialize();
gr.state = 'requested';
gr.approver = gs.getUserID(); //Replace with user sys_id you want here
gr.sysapproval = 'change request sys id';
gr.insert();
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2020 03:23 AM
Hi Raj,
I believe out of the box New button is disabled on "sysapproval_approver" table so you cannot create it from front end.
you can use script to create manual approval for change request as below
Sample script
var gr = new GlideRecord('sysapproval_approver');
gr.initialize();
gr.state = 'requested';
gr.approver = gs.getUserID(); //Replace with user sys_id you want here
gr.sysapproval = 'change request sys id';
gr.insert();
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2020 03:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2020 03:41 AM
Hi,
1. create business rule on change request table and specify insert/ update according to your requirement and give condition type is normal in condition builder.
2. write above code in script section of business rule.
3. to send notification immediately after approval,you can use
gs.eventQueue('event_name',current,parm1,parm2);
// create notification and event to use above method.
Kindly mark helpful and correct if it is useful.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2020 03:34 AM
Hope you are doing good.
Let me know if that answered your question.
if you think there is any response that helps you please mark that helpful or accepted so that this thread can be closed.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader