Service Portal - Form UI Action - Redirect

alexcharleswort
Tera Expert

Hi all,

I have an issue where I am putting together a super simple public portal page. The only thing I have on it is a "Data Table from Instance Definition". It shows me a table of all the open tickets for me. Looks pretty alright.

When I click on a ticket from that table, it opens in the portal and then I have a single UI Action that lives on the form that changes the state to closed and is supposed to redirect them back to the portal page of the table of tickets assigned to me.

The state changes just fine, but I can't get the redirect back to the portal page to work. I know the typical setRedirectURL does not work in the portal and there are ways around it but this UI Action lives on the form and not the portal page... so I'm not sure how to script that...

 

Any help would be greatly appreciated.

 

Thanks!

3 REPLIES 3

quintenvandenb1
Giga Expert

If I understood, you are looking for a way to redirect to a certain page from the portal? Can't you functionality for that?

In javascript you can use the following:

window.location.href = 'http://www.google.com';

 You can use the following to retrieve the URL are on

var url = window.location;

Community Alums
Not applicable

Hello,

I think what you need is desribed on this post 6 ways to set up your Service Portal for redirection SUCCESS!

Meantime, if you try to go UI Page and search for the string *redirect you can find a lot of pages using redirection methods.

Example:

HTML

<div class="button">
<input type="button" onclick="redirectToCatalogHomePage()" value="Back to Help Centre" />
</div>



Client

function redirectToCatalogHomePage() {
	window.location = ($("current_instance_url").getValue() + "\\catalog_home.do?sysparm_view=catalog_default");
}

 

Thanks,
RMC

alexcharleswort
Tera Expert

This button lives on the form. Not technically the portal. But when i click into the record from the table on the portal it shows me the form in the portal with my form buttons. the form buttons don't work the same way on the portal... namely the redirect. 

 

There is no HTML field to edit on a form UI Action. At least not that I see.