Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Add Condition to not populate Cab date after 'refresh agenda items' , unless Pre Cab approved.

mattmm
Kilo Sage

Hi,

The organisation I work for have decided to have a Pre CAB and therefore have an extra Approval step for 'Pre CAB', as well as a separate 'Pre CAB' Cab Definition. So the workflow for a Normal Change is New > Assess (Pre CAB Approval) >Authorize (CAB Approval) > Schedule > Implement > Review > Close.

 

I need to ensure that after 'Refresh Agenda Items' is done in both the 'Pre CAB' and 'CAB' Meetings, that it will only populate the cab_date field on change_request table, if it is at the authorize state.

 

Currently it will populate at any state, I need it to wait for Authorize state.  Would this be done via the OOb 'Refresh Agenda Items' UI Action, and in it's condition field?

 

Current Onclick:

sendEmailsOnRefreshAI()

 

Current Condition is :

var cm = new sn_change_cab.CABMeeting(current); cm.canAutoAddChanges() && cm.canAddAgendaItem() && !current.change_condition.nil() && cm.isInSelectedDomain()

 

Current script is:

 

function sendEmailsOnRefreshAI() {
	var dialog = new GlideModal('sn_change_cab_send_attendee_notifications');
	dialog.setTitle(new GwtMessage().getMessage('Agenda items refreshed'));
    dialog.setPreference('refreshAgendaItems',  refreshAgendaItems.bind(this, dialog));
    dialog.setPreference('refreshAgendaItemsAndEmail',  refreshAgendaItemsAndEmail.bind(this, dialog));
	dialog.render();	
}

function refreshAgendaItems(dialog) {
	dialog.destroy();
	gsftSubmit(null, g_form.getFormElement(), 'sn_change_cab_refresh_ai');
}

function refreshAgendaItemsAndEmail(dialog) {
	dialog.destroy();
	gsftSubmit(null, g_form.getFormElement(), 'sn_change_cab_refresh_ai_and_email');
}

 

 

1 REPLY 1

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @mattmm 

 

Interesting use case but it will not on assess, as there is only 1 field to capture date and that update when refresh agenda click irrespective of any change in any state. 

 

Either create a new field or use like this only.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************