Redirecting obsolete catalog item to new URL?

vinnie2
Kilo Contributor

We've superceded a catalog item (record producer) with a newer version.  As we have the older URL embedded in various documentation, is there any way to redirect the older URL directly to the newer one, without the user having to stop on the older page?

1 ACCEPTED SOLUTION

Willem
Giga Sage
Giga Sage

Hi Vinnie,

You can change the content type of the old Catalog Item to External Content and set it to the URL of the new Item:

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
    Field Description
    Name, Category, Icon, Roles, Active, As for standard catalog items.
    Content type The 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.
    Target Location 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.
    URL The 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.

 

 

Alternatively you can create an onLoad Catalog Client script on the old Catalog item.

In there you can redirect the user, using the following code:

Replace google.com with your own URL.

function onLoad() {
	top.window.location ='http://google.com';
}

View solution in original post

2 REPLIES 2

Willem
Giga Sage
Giga Sage

Hi Vinnie,

You can change the content type of the old Catalog Item to External Content and set it to the URL of the new Item:

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
    Field Description
    Name, Category, Icon, Roles, Active, As for standard catalog items.
    Content type The 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.
    Target Location 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.
    URL The 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.

 

 

Alternatively you can create an onLoad Catalog Client script on the old Catalog item.

In there you can redirect the user, using the following code:

Replace google.com with your own URL.

function onLoad() {
	top.window.location ='http://google.com';
}

vinnie2
Kilo Contributor

Hi Willem

The onLoad option works nice and simply for this scenario.  I'll investigate Content Types as well as another future option.

Thanks, Vinnie.