Making a catalog item redirect user to a specific page

Mohammad8
Kilo Expert

Hi All,

I have a catalog item/record producer that I don't want it to have any fields. I simply want to redirect the user to a specific page. In other words, when the user opens this (catalog item/record producer), it should redirect the user to a specific page. Is this possible?

1 ACCEPTED SOLUTION

Harsh Vardhan
Giga Patron

why don't you use content items here.

 

you can define it as an catalog item and whenever user will click on that it will redirect to other page or same window 

select Content type as external content.

 

adding doc link here. 

 

https://docs.servicenow.com/bundle/london-it-service-management/page/product/service-catalog-managem...

 

Procedure

  1. Navigate to Service Catalog > Catalog Definition > Content Items.
  2. Click New.
  3. Fill in the form to define the item.
    Content Item form
    FieldDescription
    Name, Category, Icon, Roles, Active,As for standard catalog items.
    Content typeThe type of information to display when a user selects the item.
    • KB Article: a ServiceNow knowledge article available to users with the specified roles.
    • Catalog Content: a static block of text, formatted with HTML.
    • External Content: documents or web pages stored outside the base system instance.
    TargetLocation where the content appears.
    • Within Catalog: displays the content within the catalog iframe window (which may not render some external websites properly).
    • New Window/Tab: displays the content in a new browser window or tab. Choose this option if the content does not display properly within the catalog.
    URLThe full URL (including the prefix http:// or https://) for external content to display when a user selects the item. This field is available only if the Content type is External Content.
    Note: Since base system instances are accessed via HTTPS, links to HTTP sites could result in a mixed mode content error or warning, depending on browser security settings.

 

 

View solution in original post

10 REPLIES 10

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Mohammad,

Since you don't want to have the variables etc you can use onload client script and redirect using below

function onLoad(){

window.open(url); // give your url here

}

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

Thanks for your answer. Actually, Harshvardhan's answer worked for me but I'm still interested to understand your solution. I added a client script onLoad but it never gets executed. Do you have any idea?

Hi Mohammad,

Did you check by adding alert in onLoad before redirecting? Can you share your code here?

Regards

Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Yes I tried. Please see my code below.

 

function onLoad() {
//Type appropriate comment here, and begin script below

alert('hi');
}