The CreatorCon Call for Content is officially open! Get started here.

Attaching KA to an incident - Add message in work notes

gnewuser
Tera Contributor

Hi 

 

When a Knowledge article is attached to an incidnet, I would like to add a message in  the work notes specifically.  How do I track that an KA has been added to an incidnet? is there a link table so I can write a business rule on that insert?

5 REPLIES 5

Hi @gnewuser ,

 

Try the below business rule, tested and worked fine in PDI

 

 

Business rule on table: [m2m_kb_task], after insert

SN_Learn_0-1720672036254.png

 

Script:

 

(function executeRule(current, previous /*null when async*/ ) {

    var updateWN = new GlideRecord('incident');
    if (updateWN.get(current.task)) {
        updateWN.work_notes = 'Attached KA: ' + current.kb_knowledge.getDisplayValue();
	    updateWN.update();
    }

})(current, previous);

 

 Output:

SN_Learn_1-1720672101753.png

 

 

Mark this as Helpful / Accept the Solution if this helps

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.