- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 07:15 AM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 07:58 AM
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
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 07:22 AM
Hello,
If the data is available what are the fields available is the catalog task number there in the excel if yes just apply the filter number is one of and copy paste the complete numbers from excel in one go.
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 07:36 AM
The Catalog Task number is available in the excel, what action to take to auto close all those task in ServiceNow through import.
Note - The sys ids for the tasks are not available in excel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 07:41 AM
You can do it via import set and transform map or you ca do it via fix script/background script.
If doing by transform map keep the task number as coalesce and have the state updated to close complete with a script.
In case if you want to do it via fix script/background script you can add the query which i said number is one of in the encoded query and directly close it using the script.
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 07:51 AM
Hello,
If my answer helped you can you also mark it as correct.
Thanks.