
Harneet Sital
Mega Sage
Options
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
08-30-2022
07:23 AM
In this video, you will learn how to create UI action and List action for agent workspace to redirect users to a specific link.
The code used on the actions is below -
function onClick()
{
var win = top.window.open("https://yourinstance.service-now.com/sp", '_blank');
win.focus();
}
Edited
A few people have asked how to redirect to URLs on the workspace views itself, so here is how it can be done (this is a snapshot from one of the OOB code snippets)
From workspace UI actions,
function onClick(g_form) {
var blockId = g_form.getUniqueValue();
var appConfig = g_form.getValue("document_id");
var url = "now/ace-app-builder/editor/params/blockid/" + blockId + "/aceconfig/" + appConfig;
open(url);
}
If this has helped you resolve your query, please like the post. Also if there are any questions or queries, please feel free to write them down below and I would love to answer them.
Labels:
- 5,102 Views
2 Comments
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.