Skip to content

EspoCRM – Open Source CRM Application

Ref

Yurii6cbd86430273
diff --git a/application/Espo/Classes/RecordHooks/Note/BeforeCreate.php b/application/Espo/Classes/RecordHooks/Note/BeforeCreate.php
index 72d52e1da8..195a6738a9 100644
--- a/application/Espo/Classes/RecordHooks/Note/BeforeCreate.php
+++ b/application/Espo/Classes/RecordHooks/Note/BeforeCreate.php
@@ -61,7 +61,7 @@ class BeforeCreate implements SaveHook
}
if ($this->user->isPortal()) {
- $entity->set('isInternal', false);
+ $entity->setIsInternal(false);
}
if ($entity->isPost()) {
@@ -70,7 +70,7 @@ class BeforeCreate implements SaveHook
$targetType = $entity->getTargetType();
- $entity->clear('isPinned');
+ $entity->clear(Note::FIELD_IS_PINNED);
$entity->clear('isGlobal');
switch ($targetType) {
diff --git a/application/Espo/Entities/Note.php b/application/Espo/Entities/Note.php
index e63c87b7fe..3eec3a697c 100644
--- a/application/Espo/Entities/Note.php
+++ b/application/Espo/Entities/Note.php
@@ -83,6 +83,7 @@ class Note extends Entity
public const string FIELD_NUMBER = 'number';
public const string FIELD_POST = 'post';
public const string FIELD_IS_INTERNAL = 'isInternal';
+ public const string FIELD_IS_PINNED = 'isPinned';
private bool $aclIsProcessed = false;