diff --git a/application/Espo/Modules/Crm/Entities/Document.php b/application/Espo/Modules/Crm/Entities/Document.php index ea54ab25eb..f6654fecd6 100644 --- a/application/Espo/Modules/Crm/Entities/Document.php +++ b/application/Espo/Modules/Crm/Entities/Document.php @@ -47,6 +47,13 @@ class Document extends Entity return $this->get('name'); } + public function setFile(?Attachment $file): self + { + $this->relations->set('file', $file); + + return $this; + } + public function getFileId(): ?string { return $this->get('fileId');