diff --git a/application/Espo/Services/Record.php b/application/Espo/Services/Record.php index c751b7974a..acaeaf5f14 100644 --- a/application/Espo/Services/Record.php +++ b/application/Espo/Services/Record.php @@ -2550,6 +2550,10 @@ class Record implements Crud, ->getRepository('Attachment') ->getCopiedAttachment($attachment); + $attachment->set('field', $field); + + $this->getEntityManager()->saveEntity($attachment); + if ($attachment) { $idList[] = $attachment->id; $nameHash->{$attachment->id} = $attachment->get('name');