- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 10:45 PM
Hi All,
I have created a new catalog item that is visible on the Service Portal. In the Catalog Item, I want a clickable link to be displayed. This link shouldn't be in the description.
I created a macro first, and then included that in the macro variable. Wrote a OnLoad client script which has the header reference to the macro.
Macro:
Client Script:
document.getElementById('testMacro').href="https://www.google.com"
I replaced document with g_form but still no luck.
I'm able to see the link on the ServiceNow catalog Item view but failed to see that on the Service Portal catalog item.
Please help me make it visible on the Service Portal's Catalog item.
Thanks
Jagadish
Solved! Go to Solution.
- Labels:
-
Service Catalog
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 11:38 PM
Hello Jagadish,
You need not to use UI macro any more. Please create widget write the HTML code there. Below the screen shot.
Then include this newly created widget in your catalog item.
Now include this widget into your Catalog Item ( By creating a new variable of type macro in Item As shown in screen shot below)
After adding this variable into the catalog item, open your catalog item in service portal and check you will see this working
Please hit Like if this rings the bell in your mind and mark my response correct if this solves your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2024 06:21 AM
If I am adding only Widget , I am not seeing it(added a button image) in the catalog item form; I can only see if I add in UI Macro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2024 10:06 PM
Hi Bhavya,
Widget works on portal only. Please check your catalog item in portal you should be able to locate button when item is opened in service portal. To see that button in native UI, you will have to create UI macro for the same.
Please hit the Helpful button if this resolves your query.
Thanks,
Kamlesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 11:21 PM
I First created a UI Page, included the link in the HTML editor and saved it.
Then created a variable of type UI Page and then called that UI page I had created.
This works fine if I try it on the ServiceNow console but doesn't work If I want this link to be displayed on the Service Portal.
Thanks
Jagadish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 11:42 PM
Hi Jagadish,
You need to create a widget with the same functionality as given in UI macro. So please follow the below mentioned steps.
1. Create a new service portal widget with html as given below.
<div>
<a href="https://www.google.com"></a>
</div>
leave client and server script of widget as it is.
2. Open the macro variable and put the widget you created under default section.
3. Also do not remove macro you already created and selected under type specifications as mentioned below.
Hope this helps.
Regards
Ujjawal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2018 12:31 AM
Hi Ujjawal,
I did what you suggested, and it worked perfect for me 🙂
Thanks a Ton.
Cheers
Jagadish