Skip to content

Commit

Permalink
Price Field Form: save the fid for the postProcess hook
Browse files Browse the repository at this point in the history
  • Loading branch information
mlutfy committed Jun 16, 2020
1 parent 9130c7c commit 0582ba7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CRM/Price/Form/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,8 @@ public function postProcess() {
$priceField = CRM_Price_BAO_PriceField::create($params);

if (!is_a($priceField, 'CRM_Core_Error')) {
// Required by extensions implementing the postProcess hook (to get the ID of new entities)
$this->setEntityId($priceField->id);
CRM_Core_Session::setStatus(ts('Price Field \'%1\' has been saved.', [1 => $priceField->label]), ts('Saved'), 'success');
}
$buttonName = $this->controller->getButtonName();
Expand Down

0 comments on commit 0582ba7

Please sign in to comment.