How can i create a Custom preview from the ui Action Button
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2025 12:56 AM
Use Case: I have an action button to create an article from the response of an api. before creating the article the article i need to preview it to user for approval is there any way to do this
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2025 11:38 AM
<j:jelly xmlns:j="jelly:core" xmlns:g="glide">
<j:set var="kbSysId" value="${param.sys_id}" />
<g:evaluate var="kbGR" expression="new GlideRecord('kb_knowledge')" />
<g:evaluate var="found" expression="kbGR.get(kbSysId)" />
<h1>KB Article Preview Test</h1>
<p>sys_id: ${kbSysId}</p>
<p>Record found: ${found}</p>
<j:if test="${found}">
<g:evaluate var="shortDesc" expression="kbGR.getValue('short_description')" />
<g:evaluate var="articleText" expression="kbGR.getValue('text')" />
<h2>${shortDesc}</h2>
<div>${articleText}</div>
</j:if>
<j:if test="${!found}">
<p style="color:red;">Article not found.</p>
</j:if>
</j:jelly>
This is not working fine i am trying to preview the created kb article by passing the sys_id and using it to render but not working
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2025 05:48 PM
As I mentioned earlier don't try to recreate the UI Page please leverage on OOB UI Page "kb_view_legacy_popup" or "kb_view" that suits your purpose.