We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How to redirect to another table using UI Action

Not applicable

Hi Team,

 

I have created an UI Action, I just want to route the user to another form once i click on it:

action.setRedirectURL('sn_customerservice_bulkupdatecontactrelationship.do?sys_id=-1');
 
But nothing is happening once I click on the same.

 

1 ACCEPTED SOLUTION

Anand Kumar P
Tera Patron

Hi @Community Alums ,

 

var url = "https://MYINSTANCE.service-now.com/sn_customerservice_bulkupdatecontactrelationship.do?sys_id=-1";
  action.setRedirectURL(url);

Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand

View solution in original post

2 REPLIES 2

Valmik Patil1
Kilo Sage

Hello @Community Alums ,
Try below ,

current.update(); // save the current record (from table 1)

 

action.setRedirectURL(url_to_table_2_record);

If above does not works then try below.

 

action.setRedirectURL('u_table_2.do?sys_id=' + current.u_reference_field_to_table2);

 

for creating new record try below

 

action.setRedirectURL('u_table2.do?sys_id=-1');

 

Please try any one of the above way

Thanks,

Valmik Patil

Anand Kumar P
Tera Patron

Hi @Community Alums ,

 

var url = "https://MYINSTANCE.service-now.com/sn_customerservice_bulkupdatecontactrelationship.do?sys_id=-1";
  action.setRedirectURL(url);

Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand