APM: Bulk delete assessment instances and related questions
In case anyone is interested::
I came across a situation where I needed to delete all OOB APM assessments from an instance. Seems that during my development I pilled up a ton [i.e., > 500 assessment instances] and wasn't keeping an eye on it. Naturally these assessments were not ever completed so no indicator scores were being calculated. You then need to delete all assessment instance questions ... then ... delete the assessment instance. This is a pain
Attaching a script which will do just that if anyone is interested. Just copy and paste into a fix script.
---> use at your own risk.
a couple of switches:
// -------------------------------------------------------------------------- var myLogSource = '[FS:deleteExistingAssessments ]'; var createSystemLogs = false; ---> [true | false] create system logs var deleteRecord = false --> [true | false] perform file delete. if false script will not perform deleteRecord.
// ---------------------------------------------------------------------------
https://www.servicenow.com/community/developer-blog/apm-bulk-delete-assessment-instances-and-related-questions/ba-p/2268860