redirect URL

Shabbir1
Tera Contributor

HI Team,

 

I have created a Ui action button i need to redirect to the URL if user clicks on the UI action button. Can anyone help me in the script i have used below script but it is not working sharing screen shot for reference

 

Shabbir1_0-1719205277255.pngShabbir1_1-1719205292989.png

 

1 ACCEPTED SOLUTION

sunilsargam
Tera Guru

Hello @Shabbir1 ,

 

You can use below script. 

action.setRedirectURL('testURL.com');

View solution in original post

6 REPLIES 6

Unique45
Mega Sage

Hello @Shabbir1 ,

Add function in the onclick field and add following code : 

Unique45_0-1719206974351.png

 

function redirect(){
top.window.location = "/problem.do?sys_id=-1"; // add your link here
}

 

Please mark correct/helpful if this helps you!

swathisarang98
Giga Sage
Giga Sage

Hi @Shabbir1 ,

 

You can use action.setRedirectURL('URL'); in the ui Script, 

 

Or 

 

You can write something like below, 

Note : select client and fill onClick as function name ,

swathisarang98_0-1719207009371.png

 

 

function openUrl() {
    var redirect = 'url';
    top.location = redirect;
}

 

 

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang