Not applicable

If you don't want to modify the Shazzam probe, you can also put an "after" business rule on the 'discovery_device_history' table. It holds the CI in a reference field and you can dot-walk to the Discovery Schedule table. Of course that doesn't prevent the location form being written to the location field on the CI record, but I know a lot of clients have been hesitant to modify the OOB probes/sensors. You can set the location record to NULL and erase that value if you want though (or write another BR to reject any update to the location field).



conditions: !current.cmdb_ci.nil() && current.cmdb_ci.changs()



addLoc();



addLoc(){



var sysID = current.cmdb_ci;



var newLoc = new GlideRecord('cmdb_ci_hardware');


newLoc.addQuery('sys_id',sysID);


newLoc.query();



if(newLoc.next()){


        //gs.log("Location name is: " + current.status.dscheduler.location);


        newLoc.u_discovered_location = current.status.dscheduler.location;


        //newLoc.location = NULL;


        newLoc.update();


}



View solution in original post