72 $documentService = \CBPRuntime::GetRuntime(
true)->getDocumentService();
73 $documentFields = $documentService->getDocumentFields($documentType);
74 $lazyList = $documentService->GetDocument($documentId);
78 $changedFields[] =
'DATE_MODIFY';
81 if (in_array(
'ASSIGNED_BY_ID', $changedFields))
83 $changedFields[] =
'ASSIGNED_BY_EMAIL';
84 $changedFields[] =
'ASSIGNED_BY_WORK_PHONE';
85 $changedFields[] =
'ASSIGNED_BY_PERSONAL_MOBILE';
88 foreach ($changedFields as $fieldId)
90 $property = $documentFields[$fieldId] ??
null;
97 $fieldType = $documentService->getFieldTypeObject($documentType, $property);
104 $fieldType->setDocumentId($documentId);
106 $rawValues[$fieldId] = $lazyList[$fieldId];
107 $values[$fieldId] = $fieldType->formatValue($rawValues[$fieldId]);
114 'rawValues' => $rawValues,