Redirecting one catalog item to another catalog item.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2024 05:41 AM
If we click on redirect to another item related link in catalog item then one alert should come like a 'yes' or 'no' choice then if we click on yes then it will redirect to another catalog item otherwise it should not redirect to another catalog item. How to do this in servicenow?
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2024 05:48 AM - edited ‎09-23-2024 05:49 AM
you will need a onchange Catalog client script with yes and No variable for it to trigger.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if (newValue == "Yes") {
alert("Based on your selection, we are directing you to the new catalog item");
var url = "https://.service-now.com/sp?id="; //Catalog item URL
top.window.open(url, "_self");
}
}