- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi everyone, please help me with your solutions for the issue below:
I have a custom UI action built on the Change request table, which when clicked by end-users should take them to a Catalog item in the ESC Portal. The UI action has the Client checkbox enabled and in the script section we are retrieving the sys_id of the catalog item from a display business rule, additionally the url is built like "esc?id=sc_cat_item&sys_id=CatalogID". The methods responsible for re-direction i.e. window.location.href = url/ window.open(url, "_blank") were used, but it seems to behave the same way without landing on the ESC Portal.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11m ago
Hi @NandithaBM,
I have implemented a similar requirement using a Client UI Action.
Instead of "window.location.href / window.open()", you can try "g_navigation.open()" with the portal URL:
function openCatalogItem() {
var catalogId = 'YOUR_CATALOG_ITEM_SYS_ID';
var url = '/esc?id=sc_cat_item&sys_id=' + catalogId;
g_navigation.open(url, '_blank');
}Make sure the Catalog Item is available in the ESC portal and that the URL is correct. I would also first test the generated URL directly in the browser.
If you need to pass values from the Change Request to the Catalog Item, you can append them as URL parameters similar to "sysparm_variables".
If this solution helps, please mark it as Helpful and Accept it as the Solution.
Regards
Dimple Shaik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
52m ago
share your complete script screenshots along with config screeshots
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11m ago
Hi @NandithaBM,
I have implemented a similar requirement using a Client UI Action.
Instead of "window.location.href / window.open()", you can try "g_navigation.open()" with the portal URL:
function openCatalogItem() {
var catalogId = 'YOUR_CATALOG_ITEM_SYS_ID';
var url = '/esc?id=sc_cat_item&sys_id=' + catalogId;
g_navigation.open(url, '_blank');
}Make sure the Catalog Item is available in the ESC portal and that the URL is correct. I would also first test the generated URL directly in the browser.
If you need to pass values from the Change Request to the Catalog Item, you can append them as URL parameters similar to "sysparm_variables".
If this solution helps, please mark it as Helpful and Accept it as the Solution.
Regards
Dimple Shaik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3m ago
Hey hi @Shaik Dimple your suggestion worked. Thanks a lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
13 seconds ago
You're welcome, @NandithaBM. Glad it worked. 😊