Bulk Closure of Catalog Task

Mohammed Rahim
Giga Contributor

Hi all,

I have requirement for bulk Closure of outdated SCTASKs (Almost 12k records).

There is no particular filter I can use to filter the records and also no date range to select from. The records are scattered. The data was given by multiple teams and is now available as a consolidated excel report.

 

How can I close all the tickets using this excel data?

 

Thanks

 

1 ACCEPTED SOLUTION

@Mohammed Rahim  

since you said the file contains task number then do this

1) create data source of type excel

2) create transform map and field map for number

3) set coalesce on number field

use onBefore transform script to set the state

(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {

	// Add your code here
	target.state = 3;

})(source, map, log, target);

I shared solution for something similar 2 years ago

Bluk closure of 1200 task 

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

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@Mohammed Rahim  

you need to know which 12k records are those using their task numbers.

you can use data source and transform map and update the tasks

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

@Mohammed Rahim  

since you said the file contains task number then do this

1) create data source of type excel

2) create transform map and field map for number

3) set coalesce on number field

use onBefore transform script to set the state

(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {

	// Add your code here
	target.state = 3;

})(source, map, log, target);

I shared solution for something similar 2 years ago

Bluk closure of 1200 task 

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