make submit button redirect to SOW workspace for ITIL users only

Lior Kaitel
Tera Guru

hello,
i need to make the submit button redirect to SOW workspace for itil users only (and stay ootb for non itils users)
the redirect is supposed to be to:
/now/sow/record/sc_req_item/ + new RITM's sysid;
how can i do that?

1 ACCEPTED SOLUTION

Lior Kaitel
Tera Guru

i managed to solve the requirement by creating  a widget with something similar:

LiorKaitel_0-1723552642711.png

 

and inserting the widget on the requests summary via page in designer

 

 

View solution in original post

3 REPLIES 3

imajad
Tera Contributor

create a client script I believe to run off the submit button

(function executeRule(current, previous /*null when async*/) {
    // Check if the user has the 'itil' role
    if (gs.hasRole('itil')) {
        // Redirect to the SOW workspace with the new RITM's sys_id
        var sowWorkspaceUrl = '/now/sow/record/sc_req_item/' + current.sys_id;
        action.setRedirectURL(sowWorkspaceUrl);
    }
})(current, previous);

 - something like this you will need to amend it to your reqs 

Lior Kaitel
Tera Guru

i managed to solve the requirement by creating  a widget with something similar:

LiorKaitel_0-1723552642711.png

 

and inserting the widget on the requests summary via page in designer

 

 

Slava Savitsky
Giga Sage

What is the entire use case (step by step) that you are trying to implement? What is the exact problem you need help with? What have you already tried and what exactly did not work?