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 Certinia 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 Certinia 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 with sharing 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.
CurrencyWriteOffLossGLA Id If applicable, Currency Write Off Loss 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.
CurrencyWriteOffLossLocalGLA Id If applicable, Currency Write Off Loss 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 with sharing 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–2023 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.