Does any one knows why the record is not saved but the Audit shows the data has changed?

Hi All,

I have a Question that puzzles me very rarely this happen but does happen!!!

So!, the record is not updated but the audit is recording it and cannot find anything that tells was an error?

Does anyone know what is the ordering of saving data in Sugar?

thanks.

Rodrigo

  • Hi Rodrigo,

    Looks like the record is not actually saved because of an error - maybe something is going wrong with the logic hooks? Check the before_save logic hooks for this module.

    You can check how Audits/Record is saved in data/SugarBean.php

    If you notice the "save()" function, you'll see that the audits are inserted first, and then the save is triggered. And inside the save, before_save logic hooks are called before the data is inserted into the DB.

    $this->commitAuditedStateChanges(null);
    $this->saveData($isUpdate, $check_notify);