diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index 3f0d19b886a3..16a2b31d0c07 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -1669,6 +1669,9 @@ public static function ©Generic($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); }