Dear Team,
With reference to below link we managed to create users_audit table automatically by creating an entry in the /custom/Extension/modules/Project/Ext/Vardefs/enableAuditing.php file. The logs are getting captured in the table however the view change log was still not showing data. Then we saw accounts record and confirmed that’s change log is not working there either which means there is an issue even in the default modules.
https://sugarclub.sugarcrm.com/dev-club/f/questions-answers/847/adding-audit-to-projects-module
In Log file we are getting below error logs.
Thu Dec 3 11:32:43 2020 [8424][1][FATAL] SugarBean::populateDefaultValues $field_defs should be an array
Thu Dec 3 11:32:43 2020 [8424][1][FATAL] SugarBean::populateDefaultValues $field_defs should be an array
Thu Dec 3 11:32:43 2020 [8424][1][FATAL] Query Failed:SELECT accounts_audit.*, IFNULL(users.user_name, N’Unknown’) AS user_name FROM accounts_audit LEFT JOIN users ON accounts_audit.created_by = users.id WHERE accounts_audit.parent_id = N’1428b655-721e-7439-17d9-5fc76eeb33d0’ order by accounts_audit.date_created desc::: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]‘IFNULL’ is not a recognized built-in function name.
Environment: Windows server 2012
Microsoft SQL Server 2016
PHP 7.3
IIS
Thanks in Advance.