Render html links in Virtual Agent Table response (scripted)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2022 08:47 AM
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?
Below is my response configuration.
I have set the glide.html.sanitize_all_fields system property to false.
- Labels:
-
Virtual Agent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2022 08:10 AM
I ended up using the Script response instead of the Table response, since I could not get links to work in Table response.
To make the table look decent visually, I added CSS to:
1. The html document <head>
2. Inline styling for the <table> itself
Script output response:
(function execute() {
.....
var html = '<html><head><style> td { margin: 15px 15px 15px 10px; padding: 10px 10px 10px 0px; text-align: left; }; th { text-align: left; margin-left: 0px; }; </style></head><body>';
....
html += '<table border=1 frame=void rules=rows style="width: 78vw;"><thead style="text-align: left; color: #406770;"><tr>';
....
html += '</table>';
....
return html;
})()
Some of the CSS would simply not work correctly in the <head> section, so I placed in inline, otherwise I would have placed all of the CSS in the <head> section.