- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 07:52 AM
Hi Everyone,
I have a requirement for to show the message when approver click on approve button
1. approval send to group manager after group manager approved another approval send to business owner
i done this
now i want show the message “have you transferred all active tickets, tasks, and applications?” Yes approved when both approvers click on approve button
how can i achieve this
I am trying through Display BR sysapproval_approver table but how can i get the cat item
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2024 02:48 AM
Hi Ankur,
The below code will effect on all catalog items
Display BR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2024 01:17 AM
you will have to update OOB Approve button which I won't recommend
what's the issue if they see the message when State is Requested?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2024 01:25 AM
if you want to update the OOB Approve UI action then do this
1) Search for OOB Approve button which is form button on sysapproval_approver table
2) Make it Client checkbox = true
3) Onclick field - showMessage()
4) Script:
function showMessage() {
var ritm = new GlideRecord('sc_req_item');
ritm.addQuery('sys_id', g_form.getValue('document_id'));
ritm.addQuery('cat_item.name', 'Your Catalog Item Name Here');
ritm.query();
if (ritm.hasNext()) {
var confirmMessage = confirm("have you transferred all active tickets, tasks, and applications?");
if (confirmMessage)
gsftSubmit(null, g_form.getFormElement(), "approve");
} else {
gsftSubmit(null, g_form.getFormElement(), "approve");
}
}
if (typeof window == 'undefined')
markApproved();
function markApproved() {
current.state = 'approved';
current.update();
new ApprovalUserFeedback().approved(current);
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2024 08:39 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2024 02:48 AM
Hi Ankur,
The below code will effect on all catalog items
Display BR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2024 08:39 PM
No
you are querying only for particular catalog item so it will work only when approval is raised for RITM belonging to that particular catalog item only
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader