Changing the (cab automation) meeting notes?

Shawn Gienow
Tera Guru

By default, the auto-generated meeting notes look like the following:

(CAB Automation) - CHG00123456 - Approved - John Smith - 12:31:12 - US/Eastern

We would like to change them to something like:

(CAB Automation) - CHG0030216 - Assignment Group - Risk -  Change Short Description - Approved - Approver - 12:31:12 - US/Eastern

However, I cannot for the life of me find where this automation takes place.   Has anyone worked with this previously?

Thank you!

1 ACCEPTED SOLUTION

Shawn Gienow
Tera Guru

Naveen.. thank you for helping with this 🙂 

Here's what I ended up with, and it did exactly what I need:

updateAgendaDecisions: function(agr, prevGr) {

var decision = '';
if(agr.state == CAB.AGENDA_STATE.NO_DECISION) {
decision = agr.state.getDisplayValue();
}else if((agr.decision != prevGr.decision) && (agr.decision == CAB.AGENDA_DECISION.APPROVED || agr.decision == CAB.AGENDA_DECISION.REJECTED)) {
decision = agr.decision.getDisplayValue();
}else
return;
var session = gs.getSession();
var gdt = new GlideDateTime();
var str = gs.getMessage("(CAB Automation) - {0} - {1} - {2} - {3} - {4} - {5} - {6} - {7}", [agr.task.getDisplayValue(), agr.task.assignment_group.getDisplayValue(), agr.task.risk.getDisplayValue(), agr.task.short_description, decision, gs.getUserDisplayName(), gdt.getUserFormattedLocalTime(), session.getTimeZoneName()]); var autoText = "<p>" + str + "</p>";
this._gr.agenda_decisions_buffer = this._gr.agenda_decisions_buffer + "" + autoText;
this._gr.update();
}

View solution in original post

11 REPLIES 11

Naveen20
ServiceNow Employee
ServiceNow Employee

This looks like a customisation done on the instance. I do not see the meeting notes populated automatically on my instance.

Can you check the client scripts and business rules on the table cab_meeting

 

find_real_file.png

Shawn Gienow
Tera Guru

So I've found more information in digging....

It's not actually a customization, so much as the built-in functionality from the cab workbench/cab automation that comes with ITSM pro (ie: you have to turn it on.)

However, there is a script that runs the cab:  CABRuntimeStateSNC

This one is only editable by SN staff...   THere's a script include that we can use, that extends the above..  CABRuntimeState

Here, I am going to overwrite the updateAgendaDecisions with my own script..  Which I haven't actually gotten to yet 🙂 

But for anyone who needs to do this, hopefully that helps.

 

I got your requirement. For this you have to edit this function -> addDecisionToMeetingNotes in the script include CABAgendaItemSNC

This is read only OOTB and to customise this function you have to copy the function to the script include CABAgendaItem and make changes to the function code as per your need.

Please let me know if this solves your requirement.

Shawn Gienow
Tera Guru

Hey Naveen, it sort of does..  I need to rewrite the entire function, updateAgendaDecisions.

 

What I have so far doesn't work lol.. but I think I'm not using the right fields.

 

updateAgendaDecisions: function(agr, prevGr) {

var decision = '';
if(agr.state == CAB.AGENDA_STATE.NO_DECISION) {
decision = agr.state.getDisplayValue();
}else if((agr.decision != prevGr.decision) && (agr.decision == CAB.AGENDA_DECISION.APPROVED || agr.decision == CAB.AGENDA_DECISION.REJECTED)) {
decision = agr.decision.getDisplayValue();
}else
return;
var session = gs.getSession();
var gdt = new GlideDateTime();
var str = gs.getMessage("(CAB Automation) - {0} - {1} - {2} - {3} - {4} - {5} - {6} - {7}", [agr.task.getDisplayValue(), agr.task.assignment_group, agr.task.risk, agr.task.short_description, decision, gs.getUserDisplayName(), gdt.getUserFormattedLocalTime(), session.getTimeZoneName()]); var autoText = "<p>" + str + "</p>";
this._gr.agenda_decisions_buffer = this._gr.agenda_decisions_buffer + "" + autoText;
this._gr.update();
}