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

RITM CI should be duplicate to SCTASK

NAYEEMURR
Tera Contributor

Hi ,

 

Good Day.!

Requirement is :

 

whatever the CI am selecting when submitting in RITM, that same CI should be duplicate / auto reflect to SCTASK also.

 

Screenshot can't post, sorry.

13 REPLIES 13

@NAYEEMURR 

the above BR is on which table?

it should be on sc_task table and then it will work

Is RITM having CI field populated?

Share screenshots

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

yes bro I am using sc_task table. 

yes RITM is having CI field 

 

screenshot not possible. sorry.

Bert_c1
Kilo Patron

You can use a business rule to achieve your goal. Defined on the sc_req_item table, see below.

 

Screenshot 2025-09-17 103406.png

The following script in the 'Advanced tab:

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

	var sctask = new GlideRecord('sc_task');
	sctask.addQuery('request_item', current.sys_id);
	sctask.query();
	while (sctask.next()) {
		sctask.cmdb_ci = current.cmdb_ci;
		sctask.update();
	}

})(current, previous);

Thanks for reply

not working bro

Works for me, see screen shots

Screenshot 2025-09-18 133430.pngScreenshot 2025-09-18 133454.pngScreenshot 2025-09-18 133620.pngScreenshot 2025-09-18 133646.png