ServiceNow : Redirecting user to a different module with UI Action

2.8k views Asked by At

TLDR; Is there a way to directly redirect to a module while running the serverside code? Taking into account the modules filter settings etc.

Hello, quite new to SN so sorry for the newbi question :)

Basically I need to redirect the user to a different module after running some serverside code. The module have some filter setting set in "Link type". Guess I could copy these and hard code them into the redirect via action.setRedirectURL(), but that wouldn't update should the modules filter change.

Help would be much appreciated, thank you :)

1

There are 1 answers

2
DreadPirateRoberts On

I've done something similar so that records could be opened in a new window. This UI action will open a knowledge article in kb portal.

function openRecordInKBPortal() {
    var url = 'kb?id=kb_article&sys_id=' + g_form.getUniqueValue();
    g_navigation.openPopup(url);
}