FinancialReporter Class

This global class allows users to do the following with Financial Reports:
1. Run reports
2. Delete reports
3. Retrieve reports

Methods

The following are the global methods for the FinancialReporter class. All methods are static.

deleteReports(Set<Id> reportIds)

Deletes financial reports.

Parameters
Type: Set<Id>

Return Value
Type: ServiceResult

Usage

Set<Id> toDelete = [SELECT ID FROM AcctSeed__Financial_Report_Result__c];
AcctSeed.ServiceResult result = AcctSeed.FinancialReporter.deleteReports(toDelete);
retrieveReports(FinancialReportOptions.FinancialReportType reportType)

Retrieves financial reports. Maximum 200 reports can be retrieved at a time.

Parameters
Type: FinancialReportOptions.FinancialReportType

Return Value
Type: List<Financial_Report_Result__c>

Usage

List<AcctSeed__Financial_Report_Result__c> result = AcctSeed.FinancialReporter.retrieveReports(AcctSeed.FinancialReportOptions.FinancialReportType.PROFIT_AND_LOSS);
runReport(FinancialReportOptions options)

Generate Financial Reports.

Parameters
Type: FinancialReportOptions.FinancialReportType

Signature

global static ServiceResult runReport(FinancialReportOptions options) 

Parameters
Type: FinancialReportOptions

Note: FinancialReportOptions is an abstract class extended by an option class for each report type. Click here to review.

Financial Report Options classes:

  1. Profit & Loss ProfitAndLossFinancialReportOptions

  2. Profit & Loss vs Budget ProfitAndLossVsBudgetFinReptOptions

  3. Balance Sheet BalanceSheetFinancialReportOptions

  4. Trial Balance TrialBalanceFinancialReportOptions

  5. Cash Flow CashFlowFinancialReportOptions

  6. Custom CustomFinancialReportOptions

Return Value
Type: ServiceResult

Usage

AcctSeed.ProfitAndLossFinancialReportOptions options = new ProfitAndLossFinancialReportOptions();
AcctSeed.ServiceResult sr = AcctSeed.FinancialReporter.runReport(options);

AcctSeed.ProfitAndLossFinancialReportOptions options = new ProfitAndLossVsBudgetFinReptOptions();
AcctSeed.ServiceResult sr = AcctSeed.FinancialReporter.runReport(options);

AcctSeed.ProfitAndLossFinancialReportOptions options = new BalanceSheetFinancialReportOptions();
AcctSeed.ServiceResult sr = AcctSeed.FinancialReporter.runReport(options);

AcctSeed.ProfitAndLossFinancialReportOptions options = new TrialBalanceFinancialReportOptions();
AcctSeed.ServiceResult sr = AcctSeed.FinancialReporter.runReport(options);

AcctSeed.ProfitAndLossFinancialReportOptions options = new CashFlowFinancialReportOptions();
AcctSeed.ServiceResult sr = AcctSeed.FinancialReporter.runReport(options);

AcctSeed.ProfitAndLossFinancialReportOptions options = new CustomFinancialReportOptions();
AcctSeed.ServiceResult sr = AcctSeed.FinancialReporter.runReport(options);