Interceptor on Vendor Management Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 10:02 PM
Hi Community,
I’m working with an interceptor, and I’m able to open it from Workspace using a Declarative Related List UI Action. However, the interceptor opens outside the Workspace in a new tab or classic UI, which breaks the user experience.
My requirement:
Open the interceptor within the Workspace UI.
Based on the selected option in the interceptor, navigate to a Workspace-compatible page/view.
I'm using a custom Declarative Action to trigger the interceptor.
Has anyone been able to launch an interceptor or wizard inside Workspace, or redirect back into Workspace based on interceptor input?
👉 I'm attaching my code and screenshots for reference.
@Ankur Bawiskar – tagging you for input if you've worked with this pattern before.
Any guidance is appreciated!
Declarative UI action client script
function onClick(){
var ga = new GlideAjax('sn_vrm_ws.getUrlSio');
ga.addParam('sysparm_name', 'getURL');
ga.addParam('sysparm_sysId', g_form.getUniqueValue());
ga.addParam("sysparm_table",'sn_vdr_risk_asmt_vendor_engagement');
ga.getXML(_callBack);
function _callBack(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
//alert(answer);
var win = top.window.open(answer,"_self");
win.focus();
}
}
Script Include:
getURL: function(){
var interceptorSysId = 'cc4c6ada53dea6905c2a1ab0a0490efc';
var parentTable = this.getParameter('sysparm_table');
var parentSysId = this.getParameter('sysparm_sysId');
var id = gs.getProperty("glide.servlet.uri");
//Query
var query = 'parentTable='+parentTable+'^parentSysId=' + parentSysId + '^applies_to=engagement';
var encodedQuery = encodeURIComponent(query);
// URL
var url = id + 'wizard_view.do' +
'?sys_target=' +
'&sysparm_wizardAction=sysverb_new' +
'&sysparm_parent=' + interceptorSysId +
'&sysparm_query=' + encodedQuery;
return url;
},
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 11:11 PM
I doubt this will open in same workspace tab reason being the interceptor I believe is rendered using UI macro and that won't work in 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-02-2025 11:32 PM
Thank you so much for your prompt response.
Is there any alternate solution or workaround to achieve this behavior within Workspace?
Appreciate your help.
Thank you!
Regards,
Keshav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 11:35 PM
not very sure on that part.
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