Harneet Sital
Mega Sage
Mega Sage

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);
}​
HarneetSital_0-1715781227439.png

 

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. 

2 Comments