- 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:53 AM
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
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: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