- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2024 02:12 AM
Hello Community,
I have a requirement where, if a user tries to access a specific catalog item, they should be redirected to another URL.
I created a client script for this "
", and it works fine in the classic view. However, it doesn't work in the Service Portal.
Has anyone implemented a similar solution or knows how to achieve this in the Service Portal? I would really appreciate any guidance or suggestions.
Thank you in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2024 03:08 AM
Hi @RachidB,
Have you checked out or leveraged the 'Page Route Maps'? This is exactly what they're for and pretty self explanatory as to how to set up...
Simply type 'Page Route Maps' into the Navigation menu and click on the link - example shown below.
To help others (and for me to gain recognition for my efforts), please mark this response correct by clicking on Accept as Solution and/or Kudos.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2024 03:26 AM
I don't like this approach. I think you instead should use a content item to redirect the user to where they should find the item.. So when they click on it they get redirected correctly...
If you reeeally want this solution you can do it like this:
function onLoad() {
location.href = '?id=ec_dashboard'; //Change to your destination
}
Link to content item documentation: Define a content item
Best regards,
Sebastian Laursen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2024 03:08 AM
Hi @RachidB,
Have you checked out or leveraged the 'Page Route Maps'? This is exactly what they're for and pretty self explanatory as to how to set up...
Simply type 'Page Route Maps' into the Navigation menu and click on the link - example shown below.
To help others (and for me to gain recognition for my efforts), please mark this response correct by clicking on Accept as Solution and/or Kudos.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2024 03:27 AM
If it was a generic re-direct then yes, this is the right (and only!) approach, but in this case it is not an option I'm afraid.
Best regards,
Sebastian Laursen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2024 03:38 AM
Thank you for your reply, I truly appreciate your assistance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2024 03:26 AM
I don't like this approach. I think you instead should use a content item to redirect the user to where they should find the item.. So when they click on it they get redirected correctly...
If you reeeally want this solution you can do it like this:
function onLoad() {
location.href = '?id=ec_dashboard'; //Change to your destination
}
Link to content item documentation: Define a content item
Best regards,
Sebastian Laursen