diff --git a/plugins/bitrix/src/sync.ts b/plugins/bitrix/src/sync.ts index 726c902412..750f048953 100644 --- a/plugins/bitrix/src/sync.ts +++ b/plugins/bitrix/src/sync.ts @@ -244,7 +244,7 @@ export async function syncDocument ( valValue.attachedTo = id } else { // Update document id, for existing document. - valValue.attachedTo = resultDoc.document._id + valValue.attachedTo = attachedTo } const existingIdx = existingByClass.findIndex((it) => { const bdoc = hierarchy.as(it, bitrix.mixin.BitrixSyncDoc)