SuiteCRM contactCount Example
- Run the SQL from
fields_meta_data.sqlagainst the database to create the new custom field - Place PHP files into project, locations are noted in comment on each file. Definitions in
logic_hooks.phpwill need to be manually merged into the existing file or else move these definitions to better follow the Extension framework. - Quick Repair and Rebuild
- Run the SQL from
updateContactCountExistingRecords.sqlagainst the database to populate the new custom field. Note that if custom fields have never been created, then the tableaccounts_cstmwill be empty and this update will fail, you'll need to first populate the table i.e.INSERT INTO accounts_cstm (id_c) SELECT id FROM accounts