Merge pull request #23753 from eileenmcnaughton/import_validate_int
[civicrm-core.git] / CRM / Mailing / Form / Component.php
index dacb27d55c6ec672ae0eb174bda46cd3389132f0..6044fd565888a6011a84405daa3808ab4bdcfc87 100644 (file)
@@ -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');