GoldFinch uses GL Summary records to generate financial reports in real time.
Salesforce allows an Apex query to retrieve up to 50,000 records in a single transaction. For most companies, this limit is sufficient. However, companies with a large number of GL Summary records may exceed this limit when running reports such as the Balance Sheet or Trial Balance.
One way to reduce the number of GL Summary records is to reduce the number of Accounting Variables included in historical summaries.
Custom Setting
Use the following custom setting:
CustomGLSummaryCompression
Example value:
2022/12/Yes/No/No/No
The format is:
YYYY/MM/Variable 1/Variable 2/Variable 3/Variable 4
YYYY— cutoff yearMM— cutoff month- Accounting Variable 1 —
YesorNo - Accounting Variable 2 —
YesorNo - Accounting Variable 3 —
YesorNo - Accounting Variable 4 —
YesorNo
For GL Entries dated on or before the cutoff year and month, the setting determines which Accounting Variables are retained when GL Summary records are recreated.
For example:
2022/12/Yes/No/No/No
means that for GL Entries dated on or before December 2022:
- Accounting Variable 1 will be retained.
- Accounting Variables 2, 3, and 4 will not be included in the GL Summary.
Removing unnecessary Accounting Variables allows multiple historical GL Summary records to be consolidated into fewer records.
Procedure
1. Configure CustomGLSummaryCompression
Configure the CustomGLSummaryCompression custom setting by specifying:
- The cutoff year and month.
- Which Accounting Variables (1–4) should be retained for GL Entries on or before the cutoff date.
2. Delete Historical GL Summary Records
Delete all GL Summary records dated on or before the cutoff date.
When a large number of GL Summary records are deleted, Salesforce may take some time (24 hours, 48 hours, or even longer) to automatically clear the GL Summary lookup field on the related GL Entry records.
3. Clear the GL Summary Lookup (Optional)
If you do not want to wait for Salesforce to automatically clear the lookup fields, create and deploy a batch routine to clear orphaned lookup references.
The batch routine should update only GL Entry records that meet both of the following conditions:
- The GL Summary lookup field is populated.
- The referenced GL Summary record no longer exists (the lookup points to a deleted record).
For those records, set the GL Summary lookup field to blank.
4. Recreate the GL Summary Records
Run either Daily Adjust Cost or BatchGLPost to recreate the GL Summary records.
The new GL Summary records will be generated according to the CustomGLSummaryCompression settings, reducing the total number of GL Summary records while preserving the selected Accounting Variables.
Important Considerations
Before running this process:
- Back up or export the affected GL Summary records.
- Test the process in a sandbox first.
- Do not delete GL Entries. Only the GL Summary records should be deleted and recreated.
- Allow the summarization routine to finish before running financial reports.
- Compare the Balance Sheet, Income Statement, and Trial Balance totals before and after compression.
The compression process should reduce the number of GL Summary records without changing the total debit, credit, or net amounts.
Comments
0 comments
Please sign in to leave a comment.