- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2017 03:03 AM
I have a requirement to send a different request approval notification only if the catalogue item is "Long term access to removable media"
So i need to be able to send the OOB Catalogue Approval Request notification for all request except "Long term access to removable media" and a new notification only for
So first things first, i want to stop the OOB firing for the removable media item...
OOB Notification: https://INSTANCE.service-now.com/nav_to.do?uri=/sysevent_email_action.do%3Fsys_id%3Df1fae7b6c0a8011b...
This notification is fired by the event request.approval.inserted, I have tried adding a condition below but the notification still fires.
Secondly i created a copy of this notification and switched the conditions round. This notification does not fire at all.
I'm sure i have used event and condition based notifications together before but can't understand why this is not triggering.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2017 10:47 PM
Hi Richard,
You can use the Notification email script to achieve this scenario.
Example:
(function runMailScript(current, template, email, email_action, event) {
template.print('<p><font size="3" color="#999999" face="helvetica"><strong>');
template.print(gs.getMessage('Additional Details') + ':');
template.print('</strong></font></p>');
template.print('<font size="3" color="#999999" face="helvetica">');
template.print('<p>' + gs.getMessage('Requested by') + ': ${sysapproval.opened_by}</p>');
if(current.sysapproval.sys_class_name == 'sc_request') {
template.print('<p>' + gs.getMessage('Requested for') + ': ${sysapproval.requested_for}</p>');
}
else if(current.sysapproval.sys_class_name == 'sc_req_item') {
template.print('<p>' + gs.getMessage('Requested for') + ': ${sysapproval.request.requested_for}</p>');
}
template.print('<p>' + gs.getMessage('Approver') + ': ${approver}</p>');
if(current.sysapproval.cat_item != '') {
if(current.sysapproval.cat_item.getDisplayValue() == 'Item NAME') {
template.print('<p>' + gs.getMessage('Requested Role') }</p>');
}
}
Please mark correct or helpful.
Regards,
Parvinder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2017 08:30 AM
Hi Richard,
Couple of things you could check, not sure if you have already tried.
1) Try placing this item restriction in the condition filter on the notification instead of using it on the event.
2) I can see that there are 2 OOB Catalog Approval Request notifications, i.e. with the same name, though triggered on different events. Make sure you are trying to update the one with the event request.approval.inserted.
Let me know if you have success.
PS: Mark this answer as Correct if it solved your query or hit Like/Helpful depending upon the usefulness of the response.
Regards
Supriya Bisht
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2017 01:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2017 10:47 PM
Hi Richard,
You can use the Notification email script to achieve this scenario.
Example:
(function runMailScript(current, template, email, email_action, event) {
template.print('<p><font size="3" color="#999999" face="helvetica"><strong>');
template.print(gs.getMessage('Additional Details') + ':');
template.print('</strong></font></p>');
template.print('<font size="3" color="#999999" face="helvetica">');
template.print('<p>' + gs.getMessage('Requested by') + ': ${sysapproval.opened_by}</p>');
if(current.sysapproval.sys_class_name == 'sc_request') {
template.print('<p>' + gs.getMessage('Requested for') + ': ${sysapproval.requested_for}</p>');
}
else if(current.sysapproval.sys_class_name == 'sc_req_item') {
template.print('<p>' + gs.getMessage('Requested for') + ': ${sysapproval.request.requested_for}</p>');
}
template.print('<p>' + gs.getMessage('Approver') + ': ${approver}</p>');
if(current.sysapproval.cat_item != '') {
if(current.sysapproval.cat_item.getDisplayValue() == 'Item NAME') {
template.print('<p>' + gs.getMessage('Requested Role') }</p>');
}
}
Please mark correct or helpful.
Regards,
Parvinder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2017 07:00 AM
Hi Parvinder, thanks we went down mail script route for this