Get all audit recordes for a module with Sugar Query?!

Is it possible to get all audit records for a specific module, Similar to a database query to load the table. Not only the ones linked to specific record.

What is the sugar query equivalent of this MySQL call;

SELECT *

FROM accounts_audit

Best regards

Gustav Lindstrom

Parents Reply
  • I've found this, it will load audit info for one record with sugar query.

            $this->requireArgs($args,array('module', 'record'));

            $focus = BeanFactory::getBean($args['module'], $args['record']);

            if (!$focus->ACLAccess('view')) {

                throw new SugarApiExceptionNotAuthorized('no access to the bean');

            }

            $auditBean = BeanFactory::newBean('Audit');

            return array(

                'next_offset' => -1,

                'records' => $auditBean->getAuditLog($focus),

            );

Children
No Data