Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Render html links in Virtual Agent Table response (scripted)

Joseph Warner
Tera Guru

When I include a link, e.g., <a href="path/to/my/uri">Hello</a>, in the Virtual Agent Table response script, the link is displayed as plain text. How to allow Virtual Agent to render the link?

find_real_file.png

Below is my response configuration.

find_real_file.png

 

I have set the glide.html.sanitize_all_fields system property to false.

find_real_file.png

5 REPLIES 5

sachin_namjoshi
Kilo Patron
Kilo Patron

You can use OOB HTML bot response and configure scripted condition for this BOT response.

https://docs.servicenow.com/bundle/rome-now-intelligence/page/administer/virtual-agent/reference/va-bot-responses.html#va-html-output

 

Regards,

Sachin

The table is populated via script. Static html would not work.

In your scripted response, are you populating hyperlinks in HTML objects?

 

Regards,

Sachin

Yes, I am populating hyperlinks in the scripted response, e.g.

(function execute() {

  .....

  html = '<p><a href="/some/uri/">Hello</a></p>';

  return html;

})();