Not applicable

@JessicaM6884345 ,

Please ask me if you have any doubt.

 

Please mark my answer correct and helpful if this works for you.

Thanks and Regards

Sarthak

hello @Community Alums 

I have attempted to create the tasks, and they were generated successfully. However, the newly created tasks were not linked to the existing RITM.

 

The use case involves a user submitting a service request with an attached Excel file.

The system parses the Excel file and creates tasks based on the number of rows in the spreadsheet. Based on the code you provided, how will it determine which RITM sys_id to target?

 

Please let us know if there is another way of achieving this.

Thank you

Jitendra Diwak1
Kilo Sage

Hi @JessicaM6884345,

 

to link the SC tasks to the existing RITM record can be achieved by below script:

var task = new GlideRecord('sc_task');
	task.addQuery('request_item', target.sys_id);//request_item is field on SC TASK which stores the sysid of RITM
	task.query();
	if(task.next()){
		source.description = task.description;
		task.update();
	}

It is just raw script rest can be modified as per your requirement. I am writing this script in onBefore transform  map .Hope this will help you.

 

Please mark my answer correct and helpful if this works for you.

 

Thanks

Jitendra

Hi @Jitendra Diwak1 

Thank you for your help.  Let me give it a try and provide feed back.  Thank you

Hi @Jitendra Diwak1 

As I mentioned to SarthakKashyap after a user submitted the service request, based on the code you provided, how will it determine which RITM sys_id to target?