import("Context_lib"); import("system.vars"); import("system.result"); import("Entity_lib"); var rowId = vars.get("$field.DISTRICTRESPONSIBLEID"); var currentContext = ContextUtils.getCurrentContextId(); var canDelete = new HasLinkedObjectTester() .andNoEntityRows("DistrictContact_entity", "DistrictContacts", {ObjectId_param : currentContext, RowId_param : rowId}) //District Contact .andNoEntityRows("Document_entity", "Documents", {AssignmentTable_param : "DISTRICTRESPONSIBLE", AssignmentRowId_param : rowId}) //Documents .validate(); result.string(canDelete);