Request redirect to a custom page - Service Portal

Bogdan18
Tera Guru

Hi guys,

I would like to have a redirect for a specific catalog item so that after Order Now is clicked the user is being taken to a custom page I created. So, instead of being taken to the  "id=sc_request&is_new_order=true&table=sc_request&sys_id....." page I would like to be able to redirect to another page.

This is working great for record producers because you can simply put producer.portal_redirect = "<URL here>"; in the Script section of the producer but for requests I think it must be done in the SC Catalog Item widget.

I cloned the widget and played around with the Client  Controller function  handleRedirect() but nothing seems to work. Any ideas why? Or if I am at least on the right track here? I know this must be a simple change in the widget but nothing I tried so far seems to do the trick.

It must be the handleRedirect() function that is taking care of the after submission part because if I comment it out the submission doesn't work anymore.

Many thanks in advance for any ideas and replies.

Thanks,

Bogdan

 

1 ACCEPTED SOLUTION

Hi Dana,

 

Yes, you are right. I didn't clone the sc_checkout widget either.

 

In the SC Catalog widget in the function handleRedirect() function I changed the following lines.

 

1. var page = table == 'ticket' ? 'copy_of_sc_request' : 'sc_request';//copy_of_sc_request is my custom page to which the submission redirects

2. $window.location.href = spUtil.format(c.options.url, {page: 'copy_of_sc_request', table:'sc_request', sys_id: sys_id}); // same here as I have 1 record producer and 1 catalog item in my portal, so I need the redirect to go to copy_of_sc_request page in both situations.

 

Hope this helps,

Bogdan

View solution in original post

12 REPLIES 12

Awesome! Glad I could help!

 

Please mark as correct if this was the solution.

 

Best regards,

Bogdan

Awesome! Glad I could help!

 

Please mark as correct if this was the solution. This will help others find the solution.

 

Best regards,

Bogdan

anhad
Tera Contributor

Hiii Dana are you there 

I need some help from you