Does anyone know how to do a redirectURL from a Workspace list action?

mike_allgire
Giga Guru

The Walk-up Appointments in the Agent Workspace layout has a global new button that opens an appointment record; however, the appointment record does not do the entire appointment process if you just submit through the default form. Does anyone know how to replace that New button with a redirect to the walkup_online_checkin page on the service portal? I can make the New list action button to replace the global New button, but I don't know the correct path forward to just open a new tab to the service portal page.

6 REPLIES 6

Harneet Sital
Mega Sage
Mega Sage

Hi @mike.allgire 

Took me a while to figure out how to do this but this works on my San Diego personal instance quite well -

On your UI action, check the client as 'true' and mark the isolate script as 'false' and then add the below code to the workspace client script 

function onClick(g_form) {
var win = top.window.open("https://yourinstance.service-now.com/sp", '_blank');
win.focus();
}

 

Once created it should look something like this - 

find_real_file.png

find_real_file.png

 

Thanks
-Harneet Sital
Request you to please mark my answer as helpful or correct based on the impact

Find all my ServiceNow articles here

I will attempt this, but this question is specific to a list action in workspace and not a UI form action. They are two separate functions as the list actions are their own UI elements associated to workspace itself.

 

@mike.allgire 

Sorry my bad, missed that. Here I tried this for the list action too and it works well 🙂

It's the same script moved to a list action with 'Implemented as' set to the client script and the script added the client script field. 

find_real_file.png

 

Thanks
-Harneet Sital
Request you to please
mark my answer as helpful or correct to close the thread

Find all my ServiceNow articles here

Hi @mike.allgire 

Does the above help? If so, I would request you to please mark the answer as helpful and correct so we can close the thread, please. 


Thanks,
Harneet