What is missing in my custom field vardef?

Hello. I need to add an integer field to currencies. I created the file custom/Extension/modules/Currencies/Ext/Vardefs/c_primary_key_c.php

It contains the following:

<?php
$dictionary['Currency']['fields']['c_primary_key_c']['name'] = 'c_primary_key_c';
$dictionary['Currency']['fields']['c_primary_key_c']['id'] = 'c_primary_key_c';
$dictionary['Currency']['fields']['c_primary_key_c']['type'] = 'Integer';
$dictionary['Currency']['fields']['c_primary_key_c']['dbType'] = 'integer';
$dictionary['Currency']['fields']['c_primary_key_c']['source'] = 'custom_fields';
$dictionary['Currency']['fields']['c_primary_key_c']['len'] = 10;
$dictionary['Currency']['fields']['c_primary_key_c']['size'] = 10;
$dictionary['Currency']['fields']['c_primary_key_c']['unified_search'] = false;

What am I missing, as this is not detected when I do Quick Repair?
Parents Reply Children
  • It is paramount to put into the _cstm table. SugarCRM itself announced us in a in-house webinar (they visited our company) that sometimes they upgrade core table structure by copy, drop table, create, copy from clone back, instead of alter table. And in general is bad practice to put custom fields into core table. One of the reasons why I am rewriting our entire codebase is to rip out the custom fields from the core table. Should I go to sugar portal and contact them?