- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2022 11:20 AM
For a Custom scoped application, inside agent workspace via a UI action, i display a g_modal.showframe
function onClick(g_form) {
var premiseId = g_form.getUniqueValue();
var rpId = 'rpid';
g_modal.showFrame({
url: 'sp?id=sc_cat_item&sys_id=' + rpId + '&referrer=' + premiseId,
title: 'Validate Premise Location',
size: 'fw',
height: 600
});
}
Opened Record producer is able to do needful. At OnSubmit() just want to close this modal window. How to achieve it, i have tried window.close(), top.window.close(), destroy etc. no luck yet.
Solved! Go to Solution.
- Labels:
-
Agent Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2022 11:34 AM
Found the nifty solution --
Followed this post -
https://blog.jackthomas.io/2019/09/07/servicenow-how-to-close-record-producer-after-submission/
Essentially created a UI page in my App scope as helper for all such requirements with only window.close(); in client script.
Called in in producer script as producer.portal_redirect = "ui page end point";
This works everywhere, be standalone record producer or RP displayed inside g_modal.showframe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
It should work, although i dont have access to old customer instance but window.close() has to work.
