If detections are not confirmed then vulnerable item should be in closed state
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2023 03:49 AM
Hello Everyone,
Kindly help me out for below scenario.
As everyone knows vulnerable items contains open and closed detections, if vulnerable item detections is not confirmed and vulnerable item is in opened state then vulnerable item which contains vulnerable item detections is not confirmed should be changed to closed state.
Kindly help me out to get the above requirement.
I tried above scenario by script include scripting it is not working as expected
var detections = new GlideRecord("sn_vul_vulnerable_item");
//var detections = new GlideRecord("sn_vul_detection");
detections.addEncodedQuery("vulnerability.ref_sn_vul_third_party_entry.u_vulnerability_typeLIKEPotential Vulnerability");
detections.addQuery();
detections.next();
if (!current.confirmed){
detections.setValue("state", 3);
detections.update();
}