How to include a clickable link on the catalog item that's accessed on the Service Portal ?

Jagadish10
Mega Expert

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:

find_real_file.png

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.

find_real_file.png

 

Please help me make it visible on the Service Portal's Catalog item.

Thanks

Jagadish

1 ACCEPTED SOLUTION

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.

 

find_real_file.png

 

 

 

 

 

 

find_real_file.png

Now include this widget into your Catalog Item ( By creating a new variable of type macro in Item As shown in screen shot below)

 find_real_file.png

 

After adding this variable into the catalog item, open your catalog item in service portal and check you will see this working 

 

find_real_file.png

 

 

 

 

 

Please hit Like if this rings the bell in your mind and mark my response correct if this solves your issue.

View solution in original post

19 REPLIES 19

SanjivMeher
Kilo Patron
Kilo Patron

Jelly doesn't work on Service Portal. You can try a UI page instead where you need Client script also. You can directly put the link in the HTML script of UI page.


Please mark this response as correct or helpful if it assisted you with your question.

Hello Sanjiv,

Thanks for letting me know that Jelly doesn't work on SP. Without knowing this, i might not have moved forward.

Can you please elaborate your solution ?

I tried including the following link in the HTML script but still no luck.

<a href= "https://www.google.com">Google Link</a>

Please help.

Thanks

Jagadish

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.

 

find_real_file.png

 

 

 

 

 

 

find_real_file.png

Now include this widget into your Catalog Item ( By creating a new variable of type macro in Item As shown in screen shot below)

 find_real_file.png

 

After adding this variable into the catalog item, open your catalog item in service portal and check you will see this working 

 

find_real_file.png

 

 

 

 

 

Please hit Like if this rings the bell in your mind and mark my response correct if this solves your issue.

Hi Kamlesh,

I did what you suggested, and it worked perfect for me 🙂
Thanks a Ton.

Cheers

Jagadish