Addition of hyperlink for incident, change, knowledge article number in Todos Approval widget

st001067273
Kilo Contributor

There is out of the box widget named "todos approval".  In this widget, there is a message appears in my tasks that "Do you want to approve the following (document ID) (short description)?". In my scenario, this message create knowledge base article number with short description in text format. I need to add hyperlink to the document ID (knowledge base article number) so that it can redirect to the particular one. 

 

I have attached HTML body and server script for the reference.  Your kind help is appreciated. 

 

HTML body:- 

 

<div class="panel" id="todo-approval-panel">

<div class="panel-body" id="todo-approval-panel-heading" ng-class="approval-requested">

<h4 id="approval-message" ng-if="! data.isPosted">{{data.approvalText}}</h4>

<sp-widget widget="data.approvalActionsWidget"></sp-widget>

</div>

</div>

 

Server script:-

 

var sysApprovalRecord = new GlideRecordSecure('sysapproval_approver');

 

data.shortDescription = "";

if (sysApprovalRecord.get(sysId)) {

data.isPosted = false;

if (sysApprovalRecord.state.toString() !== REQUESTED_STATE)

data.isPosted = true;

if (!gs.nil(sysApproval Record.sysapproval) && !gs.nil(sysApproval Record.sysapproval.short_description))

data.shortDescription = sysApproval Record.sysapproval.short_description;

else if (!gs.nil (sysApprovalRecord.document_id))

data.shortDescription = !gs.nil(sysApproval Record.document_id.short_description) ? (sysApprovalRecord.document_id.number + " "+sysApproval Record.document_id.short_description): sysApprovalRecord.document_id.number;

else

data.shortDescription = !gs.nil (sysApproval Record.sysapproval) ?

sysApprovalRecord.sysapproval.number: "";

data.approvalText = gs.getMessage("Do you want to approve the following: {0}?", data.shortDescription);

 

0 REPLIES 0