Dotwalking error: checkCompletionOfActivities ## Cannot find function isValid in object...DescriptionIt is not guaranteed that a dotwalk reference is a GlideRecord so dotwalking "this._grContext.hr_case" and invoking isValid() will not work.When evaluating it will return the following error "checkCompletionOfActivities ## Cannot find function isValid in object..."Steps to Reproduce 1. Create a lifecycle event2. Complete an activity in the lifecycle event3. This should trigger the subflow "Check activity and wait for event"4. Subflow should complete with error, "checkCompletionOfActivities ## Cannot find function isValid in object...".WorkaroundWorkaround: A workaround here is to rework the logic around dotwalking and utilizing getRefRecord() and isValidRecord(). Original: … updateCaseTodoCount: function(caseGr) { var caseId; if (!gs.nil(caseGr) && caseGr.isValid()) caseId = caseGr.getUniqueValue(); else if (!gs.nil(this._grContext.hr_case) && this._grContext.hr_case.isValid()) caseId = this._grContext.hr_case.getUniqueValue(); … New: … updateCaseTodoCount: function(caseGr) { var caseId; var hrCase = this._grContext && this._grContext.hr_case ? this._grContext.hr_case.getRefRecord() : ''; if (!gs.nil(caseGr) && caseGr.isValid() && false) caseId = caseGr.getUniqueValue(); else if (!gs.nil(hrCase) && hrCase.isValidRecord()) caseId = hrCase.getUniqueValue(); …Related Problem: PRB1976770