Accounting Apex API Developer Reference

c2g.WriteOffService

global with sharing class WriteOffService

Enums

CurrencyMode

Indicates whether write-off should be in the currency of the account, or the currency of the posted document.

Value Description
Document Document currency
Account Account currency

Methods

writeOff

global static Id writeOff(c2g.WriteOffService.Configuration config, List<Id> companyIds)

This service allows you to Write-Off outstanding transactions asynchronously. See "About Write-Off" in the FinancialForce Help for more details. This service starts an AsyncApexJob using Async Api Framework.

Input Parameters

Name Type Description
config c2g.WriteOffService.Configuration The configuration providing the details of how the Write-Off should be performed.
companyIds List<Id> The companyIds provides the Id of the company for which documents need to be written-off.

Return Value

This service returns the ID of a Process Run object.

doWriteOff

global static c2g.WriteOffService.WriteOffResult doWriteOff(c2g.WriteOffService.Configuration config, Id companyId)

This service allows you to Write-Off outstanding transactions synchronously. See "About Write-Off" in the FinancialForce Help for more details.

Input Parameters

Name Type Description
config c2g.WriteOffService.Configuration The configuration providing the details of how the Write-Off should be performed.
companyId Id The company for which documents need to be written-off.

Return Value

This service returns a c2g.WriteOffService.WriteOffResult object.

c2g.WriteOffService.Configuration

global class Configuration

holds parameters used by the write-off process.

Properties

Name Type Description
AccountIds Set<Id> identifies the accounts whose transactions you want to write-off. by default all accounts are considered.
WriteOffUpToDate Date the date to write-off up to. any invoices with a document date later than this date will not be write-off. current date is used by default.
WriteOffCurrency String specifies whether you are interested in one particular currency, or all currencies. The default value is All Currencies.
UseDefaultWriteOffLimit Boolean if true, write-off limit is used from currency, else from writeofflimit. default is true.
WriteOffLimit Decimal if usedefaultwriteofflimit is false then write-off limit is used for filtering the invoices.
CurrencyMode c2g.WriteOffService.CurrencyMode specifies whether write-off should be in the currency of the account, or the currency of the posted document.
DaysOverdue Integer invoices can be written-off up to a specific due date. this is calculated by deducting the specified days overdue value from the current date.
PaymentStatuses List<String> specifies whether you are interested in part paid or unpaid invoices. the default is part paid.
TransactionLineIds List<Id> contains transaction line ids which are to be written-off.
WriteOffDate Date the write-off date is used on the journal date field. current date is used by default.
PostingDate Date the posting date is used to derive the journal fiscal period. current date is used by default.
WriteOffReasonCode String the write-off reason code is used on the journal reference. blank string is used by default.
WriteOffComments String the write-off comments is used on the journal description. blank string is used by default.
UseCompanyDefaultWriteOffGLAAndDims Boolean if true, write-off gla and dimensions is used from company. default is true.
WriteOffGLA Id write-off gla is used on the journal. default is null.
WriteOffLocalGLA Id if applicable, write-off local gla is used on the journal. default is null.
WriteOffDimension1 Id write-off dimension1 is used on the journal. default is null.
WriteOffDimension2 Id write-off dimension2 is used on the journal. default is null.
WriteOffDimension3 Id write-off dimension3 is used on the journal. default is null.
WriteOffDimension4 Id write-off dimension4 is used on the journal. default is null.
UseCompanyDefaultCurrencyWriteOffGLAAndDims Boolean if true, currency write off gla and dimensions is used from company. default is true.
CurrencyWriteOffGLA Id currency write off gla is used on the journal. default is null.
CurrencyWriteOffLocalGLA Id if applicable, currency write off local gla is used on the journal. default is null.
CurrencyWriteOffDimension1 Id currency write off dimension1 is used on the journal. default is null.
CurrencyWriteOffDimension2 Id currency write off dimension2 is used on the journal. default is null.
CurrencyWriteOffDimension3 Id currency write off dimension3 is used on the journal. default is null.
CurrencyWriteOffDimension4 Id currency write off dimension4 is used on the journal. default is null.

c2g.WriteOffService.WriteOffResult

global class WriteOffResult

holds the details of the write-off.

Properties

Name Type Description
WriteOffMatchingReferences List<Id> the ids of the write-off matching references created during the write-off.
© Copyright 2009–2022 FinancialForce.com, inc. All rights reserved. Various trademarks held by their respective owners.