[HR] hr_Utils._cancelRequestedItems API may incorrectly update records with empty parentDescriptionThe hr_Utils.canCancelRequestedItems API may incorrectly update records with an empty `parent` value due to a platform defect PRB1735834 loading a GlideRecord with null sys_id GlideElements. E.g., the above API can be triggered by the business rule "Cancel or Close Case Cleanup" which could cause a lot of the unrelated request/requested item records to be closed/updated incorrectly, if the platform issue happens.Steps to Reproduce 1. See Engineering details. A platform failure (PRB1735834) resulted in GlideRecord queries for an HR Case table returning records with null sys_id GlideElements.WorkaroundThe workaround is to update the hr_Utils._cancelRequestedItems API [sys_script_include_f65370019f22120047a2d126c42e7000] to use `grCase.getUniqueValue()` instead of `grCase.sys_id` to get the `sys_id` of the GlideRecord. Example updated API: _cancelRequestedItems : function(grCase) { if(gs.nil(grCase) || !grCase.isValidRecord()) throw new Error("Invalid input parameter"); // Handle null sys_id on grCase var caseId = grCase.getUniqueValue(); if (gs.nil(caseId)) { gs.info(this.type + ": Invalid sys_id on grCase parameter passed into _cancelRequestedItems method"); throw new Error("Invalid input parameter"); } var closeNotes = grCase.getValue("close_notes"); var grRequest = new GlideRecord('sc_request'); grRequest.addQuery('parent', caseId); grRequest.addNotNullQuery('parent'); grRequest.addActiveQuery(); grRequest.query(); while(grRequest.next()) { grRequest.setValue('request_state', 'closed_cancelled'); if (!gs.nil(closeNotes)) { grRequest.setValue('close_notes', closeNotes); var grRequestItem = new GlideRecord('sc_req_item'); grRequestItem.addQuery('request', grRequest.getUniqueValue()); grRequestItem.setValue('close_notes', closeNotes); grRequestItem.updateMultiple(); } grRequest.update(); } },Related Problem: PRB1741522