From f7a675415c19a20f9102ceb852ddf88e4589f8f6 Mon Sep 17 00:00:00 2001 From: Dev Date: Tue, 20 Oct 2020 10:00:31 +0200 Subject: [PATCH] Set id after save for the mailing component in the postProcess Added comment and removed whitespace Removed empty line. --- CRM/Mailing/Form/Component.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Mailing/Form/Component.php b/CRM/Mailing/Form/Component.php index dacb27d55c..6044fd5658 100644 --- a/CRM/Mailing/Form/Component.php +++ b/CRM/Mailing/Form/Component.php @@ -116,6 +116,10 @@ class CRM_Mailing_Form_Component extends CRM_Core_Form { } $component = CRM_Mailing_BAO_MailingComponent::add($params); + + // set the id after save, so it can be used in a extension using the postProcess hook + $this->_id = $component->id; + CRM_Core_Session::setStatus(ts('The mailing component \'%1\' has been saved.', [ 1 => $component->name, ]), ts('Saved'), 'success'); -- 2.25.1