Possibility to save and close the tab on new records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 02:56 AM
Hello,
we have a custom workspace, where we are creating a record on a separate tab. We don't want users to save it several times, therefore we would like to close it as soon as its saved.
It seems that this script works only on saved records, but not new ones.
function onClick(g_form) {
g_form.save().then(function() {
g_aw.closeRecord();
}
}
Is it possible to use action handlers in UI actions' scripts?
I came across these Actions:
NAVIGATION_CLOSED
Or could we utilize in UI action somehow this idea: see comment about SCREEN_STATUS_CHANGED status closed. https://www.servicenow.com/community/next-experience-forum/ui-builder-close-tab-and-redirect-back-to...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 09:54 AM
I am assuming it's a configurable workspace. How are you saving the record on worspace. Is it using any UI Action or on a button you are triggering any event using client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 01:13 PM
Hello! Yes, this involves a custom workspace created with App Engine and a traditional UI action that incorporates GlideAjax in the Workspace Client script. I'm curious about how to close a new, unsaved record if g_aw.closeRecord isn't functioning as expected. Additionally, for educational purposes, I'm interested in whether it's possible to use action handlers, which are typically employed in UIB, within the Workspace Client script of a UI action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2024 02:18 AM