"g_aw" does it work in catalog client script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2023 10:00 PM
Hi All,
Currently i have a ui action in workspace called "Open record producer". Once i click on it, it opens the record producer in a new tab.
Now i need to close the tab once the record producer is submitted.
I tried with onsubmit catalog client script by adding g_aw.closeRecord();
Still that is not working.
Is there a way i can close the tab in a workspace?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2023 10:20 PM
Hello @Prem13 ,
Did you try my solution with try writing an on submit record producer script?
Best Regards,
Nayan Dhamane
ServiceNow Community Rising Star 2023.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2023 10:27 PM
Hi @Nayan Dhamane ,
I already tried both, window.top.close() on onsubmit catalog client script gives me javascript error though the isolate script is false.
And action.setRedirectURL("URL") is not working in workspace. I tried with producer.portal_redirect that worked but its opening a window within a tab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 01:34 AM
that method will only work for workspace table and not for native form
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 01:40 AM
@Ankur Bawiskar is there a way i can close the tab in workspace or redirect to the main form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 01:45 AM
check this link
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader