GRC: Policies - need help with article templates for Policy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hello all,
I am new to IRM and the GRC modules and I was taking a look at Policies and their lifecycle. Our demo instance already has an example template of type XML that we can use for our Policies, but I found no examples of type Script or HTML. Even the official documentation seems to be poor regarding this subject. Does anyone have any examples of how these types of templates might work? I've been testing some code and I was able to figure out that we can indeed access the Policy record in a Script article template:
function renderPolicyArticle(current) {
var content = '';
content += '<h1>' + current.name + '</h1>'; //logs show that indeed it fetches the name of the current policy
return content;
})(current);
However, returning the content as seen in the above code sample is not enough to display it in the knowledge article, as nothing is displayed.
I have also tried to call this script from an HTML template like this -> ${template_script:<name_of_script_template>} but no luck. It seems that this does not trigger the Script template at all and I'm left with an empty knowledge article.
Can someone please help? Thanks in advance!