Accounting Apex API Developer Reference

c2g.StatementsEmailService

global with sharing class StatementsEmailService

The service class used to generate and email statements

Methods

getAllStatementsForCompanyAndRule

global static List<c2g.StatementsEmailService.Statement> getAllStatementsForCompanyAndRule(Id companyId, Id ruleId)

Use this method to retrieve all statements for given company, for a given statement rule.

Input Parameters

Name Type Description
companyId Id The id of company, we are fetching statements for.
ruleId Id The statement rule for which we want to get the statements.

Return Value

Returns a list of Statement wrapper.

sendEmails

global static Id sendEmails(Set<Id> accountIds, Id statementRuleId)

Method to run Statement batch process. Use the CollectionsSendStatements (Send Email Statements) custom permission to grant permissions on this method.

Input Parameters

Name Type Description
accountIds Set<Id> Ids of Account for which you want to send statements.
statementRuleId Id Id of StatementRule record.

Return Value

This service returns Id of Statement__c object.

sendEmails

global static Id sendEmails(Set<Id> accountIdsSelected, Id statementRuleId, Id statementId)

Method to run Statement batch process having some Accounts selected. Same method is used to re-run batch for excluded and errored records. Use the CollectionsSendStatements (Send Email Statements) custom permission to grant permissions on this method.

Input Parameters

Name Type Description
accountIdsSelected Set<Id> Ids of Accounts for which you want to send statements.
statementRuleId Id Id of StatementRule record.
statementId Id This parameter is used only if you are sending statements for errored Accounts. Specify Id of Statement record which was created suring first run.

Return Value

This service returns Id of Statement__c object.

getAllStatementAccountsForCompanyAndStatement

global static List<c2g.StatementsEmailService.StatementAccount> getAllStatementAccountsForCompanyAndStatement(Id companyId, Id statementId)

Use this method to retrieve all statement accounts for given company, excluding all sent in given statement.

Input Parameters

Name Type Description
companyId Id The id of company, we are fetching accounts for.
statementId Id The statement Id which was created while sending previous statements for same month for given company.

Return Value

Returns a list of Statement Account wrapper.

c2g.StatementsEmailService.Statement

global with sharing class Statement

c2g.StatementsEmailService.StatementAccount

global with sharing class StatementAccount

© Copyright 2009–2024 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.