Skip to content

Commit

Permalink
Merge pull request #18808 from jvos/set-id-postProcess-mailing-Component
Browse files Browse the repository at this point in the history
Set id after save for the mailing component in the postProcess
  • Loading branch information
eileenmcnaughton authored Oct 26, 2020
2 parents 1c8707d + f7a6754 commit ee6e177
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CRM/Mailing/Form/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ public function postProcess() {
}

$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');
Expand Down

0 comments on commit ee6e177

Please sign in to comment.