I need to close the record and redirect to the CWS Home page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2025 06:22 AM
Hello every,
I am creating one client script to bolck the SIR form in CWS workspace, i have create one client script it's working fine but the record number is on next tab, i want to close the record and redirect to the home page , any one help on this, just want to add the one condition like the closed the record and redirect to the home page,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2025 06:28 AM
share some screenshots.
Your requirement is not clear.
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
07-29-2025 06:37 AM
Hi @Ankur Bawiskar ,
Please find the above screen shot, actually the issue is I need to block the SIR record in other workspace, so i have write the client script to block the from, now it's blocking and redirect to the home but you can see the that record tab is not closed after the home page, now i want the solution is need to close the record tab and redirect to the home page,
Thanks,
Deepika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2025 07:02 AM
image is not visible.
Security Incident should be opened only in particular workspace and not allowed in native and in any other workspace?
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
07-29-2025 07:13 AM
this worked for me for workspaces.
I used g_aw.closeRecord(); to close the tab in workspace.
When I opened INC in CSM/FSM workspace, it gave me alert, closed the record and redirected to the CSM/FSM workspace base URL
Output:
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