diff --git a/CRM/Core/BAO/CustomField.php b/CRM/Core/BAO/CustomField.php index f62d22773c6f..44166294a058 100644 --- a/CRM/Core/BAO/CustomField.php +++ b/CRM/Core/BAO/CustomField.php @@ -154,7 +154,7 @@ public static function writeRecords(array $records) { $tableName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomGroup', $customField->custom_group_id, 'table_name'); $sql[$tableName][] = $fieldSQL; - $addedColumns[$tableName][] = $customField->name; + $addedColumns[$tableName][] = $customField->column_name; $customFields[$index] = $customField; }