action.setRedirectURL() not working in the customer service workspace

Gopal14
Tera Contributor

Hi,

 

action.setRedirectURL() not working in the customer service workspace

 

function onClick(g_form) {
   g_form.checkMandatory = false;
}
g_form.setValue('state', '7');
g_form.save();

 

Gopal14_0-1747296885985.png

 

I know action.setRedirectURL will not work in the workspace, which one we need to use, I have reffered community articles but no use.

 

when I click on UI action, state needs to change to 7, then it needs to redirect to all cases in workspace

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Gopal14 

there are lot of OOTB UI actions which use this in Scope app, but they are only Server side script

see below

AnkurBawiskar_0-1747297881674.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@Gopal14 

so in workspace client script you want to take the user after saving to the list?

If yes then do this

1) use GlideAjax to update the state

2) then use this to open the list

function onClick(g_form) {
    // use GlideAjax
	var url = '/tableName_list.do';
	open(url);
}

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

@Gopal14 

there are lot of OOTB UI actions which use this in Scope app, but they are only Server side script

see below

AnkurBawiskar_0-1747297881674.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Gopal14 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader