Skip to content

Commit

Permalink
dev/core#766 fix loss of custom fields when creating an event from te…
Browse files Browse the repository at this point in the history
…mplate
  • Loading branch information
eileenmcnaughton committed Mar 4, 2019
1 parent 26dfced commit f213a79
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CRM/Core/DAO.php
Original file line number Diff line number Diff line change
Expand Up @@ -1669,6 +1669,9 @@ public static function &copyGeneric($daoName, $criteria, $newData = NULL, $field
}
}
$newObject->save();
if (!empty($newData['custom'])) {
CRM_Core_BAO_CustomValueTable::store($newData['custom'], $newObject::getTableName(), $newObject->id);
}
CRM_Utils_Hook::post('create', CRM_Core_DAO_AllCoreTables::getBriefName($daoName), $newObject->id, $newObject);
}

Expand Down

0 comments on commit f213a79

Please sign in to comment.