Checkbox variable is not showing in the task and can't close out task since it's mandatory

John Vo1
Tera Guru

I'm unable to close out task since the checkbox variable is not visible and it's mandatory..  How can I close it out?

 

JohnVo1_0-1732109277210.png

 

8 REPLIES 8

You can update the value of the Catalog Item variable on an RITM via script like this:

var mtom = new GlideRecord('sc_item_option_mtom');
mtom.addQuery('request_item', 'ritm_sys_id'); //your RITM to update sys_id
mtom.addQuery('sc_item_option.item_option_new', '099729ffdb78ccd00249dffa5e9619ec'); //sys_id of the checkbox variable
mtom.query();
if (mtom.next()) {
	var item = new GlideRecord('sc_item_option');
	item.addQuery('sys_id', mtom.sc_item_option.toString());
	item.query();
	if(item.next()){		
		item.value = true;
		item.update();	
	}
}

Brad Bowman
Kilo Patron
Kilo Patron

If you can see and update it on the RITM record, it will also reflect that value in the Catalog Task.  Otherwise, someone who has write access to the task / this variable will have to do so.

You can't cause it's grey out and can't be edited in RITM and TASK.

PrashantLearnIT
Giga Sage

Hi @John Vo1 

 

Are you creating task using flow then you have to add all variables for this catalog task.

********************************************************************************************************
Please appreciate the efforts of community contributors by marking the appropriate response as the correct answer and helpful. This may help other community users to follow the correct solution in the future.

********************************************************************************************************
Cheers,
Prashant Kumar
ServiceNow Technical Architect


Community Profile LinkedIn YouTube Medium TopMate
********************************************************************************************************