AnsweredAssumed Answered

SugarCRM CE Calculated fields: Days difference between today's date and the creation date

Question asked by Liliana Carballo on Jul 1, 2015
Latest reply on Jul 6, 2015 by arturo.hernandez

We're trying to get the total days old of a record getting the difference between 2 dates, we know that in order to create a calculated field on this edition we need the logic_hooks_class but it's not working.

    $hook_array = Array();      $hook_array['before_save'] = Array();
    $hook_array['before_save'][] = Array(
        //Processing index. For sorting the array.
        //Label. A string value to identify the hook.
        //The PHP file where your class is located.
        //The class the method is in.
        //The method to call.
    );  ?>

This is just the first of plenty calculated fields that we need to create, how can we do this?

Thank you.