In a previous blog, we explored how GUMU™ simplifies log management. In this blog, we dive deeper into the enhanced features of automating deletion of log records, exploring practical implementation strategies, and providing insights on maximizing its benefits for the organization. This new functionality will provide users with the ability to delete Import_Jobs__c and Integration_Statistics__c records, similar to the existing ability to delete Logs__c records and automating deletion of log.
During several client implementations, we encountered issues exceeding Salesforce storage limits due to the accumulation of GUMU__Import_Jobs__c and GUMU__Integration_Statistics__c records. These objects and GUMU__Logs__c contributed significantly to storage usage, leading to performance issues.
Automating Deletion of Logs streamlined Log Management with Custom Settings
At the heart of GUMU’s log management functionality are few key input fields in the standard settings:
- Keep Integration Stats Days
- Keep Import Jobs Days
These fields allow users to specify the number of days they want to retain logs. By simply inputting a number, users can dictate how long logs should remain in the system before they are eligible for deletion and automating deletion of log. This flexibility ensures that organizations can tailor their log retention policies to meet specific operational and compliance needs.
Default Retention Periods
To further facilitate effective log management, GUMU™ sets default retention periods for each log type. If a user does not specify a value in the input fields, the following defaults are applied:
- Keep Integration Stats Days: 30 days
- Keep Import Jobs Days: 7 days
These defaults help organizations maintain a baseline level of log management without requiring constant oversight, ensuring that outdated logs do not accumulate unnecessarily and automating deletion of log.
Understanding the Deletion Criteria
A critical aspect of GUMU’s automated log management is how logs are selected for deletion. The system uses a straightforward but effective criterion: it evaluates the CreatedDate of each log entry against a calculated cutoff date. Specifically, logs with a CreatedDate that is less than or equal to DateTime.now() – daysRange will be flagged for deletion.
This means that if, for example, the retention period is set to 30 days, any log created more than 30 days ago will be eligible for deletion during the scheduled clean-up. This approach not only helps in efficiently managing storage but also ensures that the logs are routinely purged, keeping the system uncluttered by automating deletion of log.
Scheduled Deletion Process
When the scheduled job runs, GUMU™ checks these input fields for valid numbers. If the fields contain numbers, the system calculates a cutoff date by subtracting the specified number of days from today’s date. Logs with a ‘CreatedDate’ older than this cutoff are flagged for deletion. This automated process not only reduces manual intervention but also ensures that only relevant data is retained, enhancing overall system performance.
By following the above blog instructions, you will be able to learn “Optimizing Log Management: Automating Deletion of Logs, Import Job and Integration Statistics”. If you still have queries or any related problems, don’t hesitate to contact us at salesforce@greytrix.com. More details about the Product are available on our website and Salesforce AppExchange.
We hope you find this blog resourceful and helpful. However, if you still have concerns and need more help, please get in touch with us at salesforce@greytrix.com
Related Post