diff --git a/CRM/Note/Form/Note.php b/CRM/Note/Form/Note.php index 1bfed49b12db..33addb0e3785 100644 --- a/CRM/Note/Form/Note.php +++ b/CRM/Note/Form/Note.php @@ -25,6 +25,8 @@ */ class CRM_Note_Form_Note extends CRM_Core_Form { + use CRM_Core_Form_EntityFormTrait; + /** * The table name, used when editing/creating a note * @@ -39,13 +41,6 @@ class CRM_Note_Form_Note extends CRM_Core_Form { */ protected $_entityId; - /** - * The note id, used when editing the note - * - * @var int - */ - protected $_id; - /** * The parent note id, used when adding a comment to a note * @@ -193,6 +188,9 @@ public function postProcess() { $ids = []; $note = CRM_Core_BAO_Note::add($params, $ids); + // Required for postProcess hooks + $this->setEntityId($note->id); + CRM_Core_Session::setStatus(ts('Your Note has been saved.'), ts('Saved'), 'success'); }