This feature uses schedulers to recalculate Sugar fields containing calculated values. The modules it is applied to can be selected individually. The Calculated Fields Recalculator helps reduce the loading time when saving a record with dependent/calculated fields and keeps records up to date even when they're not saved manually.
Table of Content
2. User Guide
Before installing the product package, make sure you have the Faye licensing module installed. You can find the steps to take here.
For any questions concerning your license key please contact firstname.lastname@example.org.
1. Accessing FayeBSG Recalculations
In order to include modules in the Recalculation logic, it is necessary that the user sets up a configuration record for each module. This is achieved by navigating to FayeBSG Recalculations in the Sugar Admin section.
2. Setting configuration options
In the FayeBSG Recalculations module, the available configuration options are:
Target Module: Determines the module whose fields will be recalculated
Status (Active/Inactive): Determines if the module's fields are being recalculated or not. If Inactive is set, the module will not be included in the recalculations logic.
Batch Size: The number of records that are updated at once. Note: Please keep the batch size under 500 records at a time!
Silent Update: If set to true, the 'Date Modified' will not be updated by the recalculation.
Trigger Workflows: Defines if workflows attached to the module are triggered or not.
3. Monitor recalculations using the scheduler
During the installation process new Scheduled jobs are created: FBSG Sugar Recalculations Job and FBSG Sugar Recalculations Process Queue Job.
A. The first job (FBSG Sugar Recalculations Job) is responsible for queuing up the records in the different modules to be recalculated and is set to run once a day by default at 4 am server time. This may need to be changed if you have a lot of records needing to be recalculated.
B. The second job (FBSG Sugar Recalculations Process Queue Job) is responsible for processing the records in the queue in the order in which they were entered into the queue.
Once there are records in the queue you will be able to monitor the progress by looking at the recalculation record’s subpanels for the log and queue.
The Queue subpanel will show which records from the selected module are set to be recalculated. These records will disappear over time and new queue records will be added for each recalculation cycle.
The Log subpanel will show how many records were queued up for a given recalculation, how many records are left (if any), when the process started with the first queue record and when it finished with the last queued record for that cycle.