Create email notification on sysapproval_approver table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2023 09:23 AM
Hello
on the change request form, given that the change is in the authorized state
User selects the approver tab on the related list and clicks on requested then changes the state to rejected and enters comment on the mandatory comment section
I will like and email notification to be sent out to the CAB Approval
Email should say
Subject: CHGXXXXX requires more information to be approved.
Please do not respond to this email
Type: Should populate from the CR
Service: Should populate from the CR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2023 10:34 AM
Hello Lyden,
Configure After-Update Business Rule.
Setup event and notification.
Refer below pseudocode:
var change = new GlideRecord('change_request');
change.get(current.sys_id);
var subject = 'CHG' + change.number + ' requires more information to be approved.';
var type = change.type;
var service = change.u_service;
var start_date = change.start_date;
var end_date = change.end_date;
var link = 'https://your_instance.service-now.com/nav_to.do?uri=change_request.do?sys_id=' + change.sys_id;
var message = 'Type: ' + type + '<br>' +
'Service: ' + service + '<br>' +
'Planned start date: ' + start_date + '<br>' +
'Planned End date: ' + end_date + '<br>' +
'<a href="' + link + '">Click here to view the change request</a>';
gs.eventQueue('email.send', 'cab_approval@your_company.com', '', subject, message, '', '', '', '');
Regards
Prasad