Upgrading Financial Report Builder
In the Spring 2021 release of Financial Report Builder, reports and statements are created via the following tabs in the app:
- Financial Statements
- Financial Reports
In the Summer 2021 release of Financial Report Builder, only the Financial Reports tab is used to create reports.
Follow the upgrade steps if the following conditions apply:
- You have one or more statements or reports created via the Financial Statements tab in the Spring 2021 release of Financial Report Builder.
- You do not want to manually recreate these reports via the Financial Reports tab in the Summer 2021 release of Financial Report Builder.
You can perform the following steps before or after upgrading Financial Report Builder. For best results, we recommend performing these steps before you start the upgrade process.
- From Setup, navigate to Developer Console.
- In Developer Console, click Debug | Open Execute Anonymous Window.
- Delete any code displayed in the Developer Console window, and enter the following code:
List<ff_frb__Financial_Statement__c> statements = [SELECT Id,Name,ff_frb__CompanyFilterConfiguration__c,ff_frb__Description__c,ff_frb__ReportComponentConfiguration__c,ff_frb__YearFilterConfiguration__c FROM ff_frb__Financial_Statement__c]; for (ff_frb__Financial_Statement__c st : statements) { Schema.SObjectType targetType = Schema.getGlobalDescribe().get('ff_frb__Financial_Report__c'); SObject report = targetType.newSObject(); report.put('Name', st.Name);report.put('ff_frb__Description__c', st.ff_frb__Description__c); report.put('ff_frb__FilterConfiguration__c', '2'); report.put('ff_frb__FilterConfiguration1__c', st.ff_frb__CompanyFilterConfiguration__c); report.put('ff_frb__FilterConfiguration2__c', st.ff_frb__YearFilterConfiguration__c); report.put('ff_frb__TableConfiguration__c', '1'); report.put('ff_frb__TableConfiguration1__c', st.ff_frb__ReportComponentConfiguration__c); insert report; } . - Click Execute.
In order to display measure columns correctly in the Summer 2021 release of Financial Report Builder, perform the following steps:
- From Setup, navigate to Developer Console.
- In Developer Console, click Debug | Open Execute Anonymous Window.
- Delete any code displayed in the Developer Console window, and enter the following code: List<ff_frb__Financial_Report__c> reports = [SELECT Id,Name,ff_frb__TableConfiguration1__c,ff_frb__TableConfiguration2__c,ff_frb__TableConfiguration3__c FROM ff_frb__Financial_Report__c]; for (ff_frb__Financial_Report__c r : reports) { String re = '"fieldName"\\s*:\\s*"",\\s*|,\\s*"fieldName"\\s*:\\s*""'; if(r.ff_frb__TableConfiguration1__c != null) { r.ff_frb__TableConfiguration1__c = r.ff_frb__TableConfiguration1__c.replaceAll(re, ''); } if(r.ff_frb__TableConfiguration2__c != null) { r.ff_frb__TableConfiguration2__c = r.ff_frb__TableConfiguration2__c.replaceAll(re, ''); } if(r.ff_frb__TableConfiguration3__c != null) { r.ff_frb__TableConfiguration3__c = r.ff_frb__TableConfiguration3__c.replaceAll(re, ''); } } update reports; .
- Click Execute.