How do I add a knowledge base document link in the customer portal?

Tony98
Mega Expert

If a customer answers NO in a customer portal question, I need to show or link to a specific knowledge base document that the customers (store) needs to read/perform before creating a ticket.

How do I do this?

Any examples?

thanks

Tony

find_real_file.png

I have tried using all available options . . . even the HTML

find_real_file.png

1 ACCEPTED SOLUTION

1.Create a label type of variable for this catalog item.


2.The Question of the label variable would be like



<a href="/kb_view.do?sysparm_article=KB0027143" target="blank"><font color="black">Click here to see the knowledge article</font></a>



(modify according to your need.)


find_real_file.png



3.Create an UI policy so that this label variable is visible when customer answers NO in the customer portal question.


View solution in original post

13 REPLIES 13

Matthew Glenn
Kilo Sage

EDIT: Mihir's answer is much better. I was not aware that functionality existed




Create a UI Macro and place this in the xml, adjusting the text/hyperlink as necessary:



<?xml version="1.0" encoding="utf-8" ?>


<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">


      In order for you to submit a work order to PriceBook, you must have performed a little troubleshooting yourself. Click <a title="here" href="https://google.com" target="_blank" rel="nofollow">here</a> to view the article


</j:jelly>



Next, create a variable on your catalog item with the type of Macro. Then, on the catalog item's Type Specifications tab, select the macro you just created.



Finally, create yourself a Catalog UI Policy that will hide/display this macro field when necessary.




Your results should be similar to the following images:


find_real_file.png


find_real_file.png




There are a few other ways to accomplish this, but this is the cleanest in my opinion.


As I'm new'ish to ServiceNow, I am trying yours. However I get this in the macro.


find_real_file.png


With this in the portal:


find_real_file.png



Any ideas?


I see you're working in a scoped application. This is a wild guess, as I haven't worked with them all that much myself, but could this be due to some access/privilege issue with the scoped app?


might be - i will look into it


thanks