Customized UI Page pop up on click of 'Approve' in list context menu choice list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2024 08:04 PM
Customized UI Page pop up on click of 'Approve' in list context menu choice of Approvers related tab of change form.
On change form, when change is waiting for approval. Go to 'Approvers' related tab. right click on the approval request and once you click on APPROVE. A pop-up window should appear.
Once I click on OK button, requset should be approved. But it is not working!!!!!
Script include: gf_ApprovalUtil
UI Page - gf_update_approval
HTML -
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
Do you want to Approve or Continue Reviewing request?
<table width="100%" cellpadding="0" cellspacing="0">
<tr><td align="right" nowrap="true"><br />
<g:dialog_buttons_ok_cancel ok="return validateForm()" cancel ="return OnCancel"/>
</td></tr>
</table>
</j:jelly>
Client Script -
function gf_approve() {
var dialogClass = window.GlideModal ? GlideModal : GlideDialogWindow;
changeConfirmApproveDialog = new dialogClass("gf_update_approval", false, 648, 250);
changeConfirmApproveDialog.setTitle(new GwtMessage().getMessage("Proceed"));
changeConfirmApproveDialog.setPreference('ok', 'approved');
changeConfirmApproveDialog.render();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2024 09:32 PM
so basically you want to approve all the records into related list on click of OK button in UI page?
2 things
1) your script include should be client callable without initialize function; so please correct it
2) you are not sending the current record sysId which will help you to query
It seems you are using some existing script include and trying to re-use in the Ajax
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 06:45 AM
Yes, I need to approve the records into the related list on click of OK Button in UI Page.
1. I have made script include as client callable and removed the initialize function.
Could you please help me with 2nd point?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 07:00 AM
you need to pass the record sysId to ajax function
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader