Accounting Apex API Developer Reference

c2g.AmendPxService

global with sharing class AmendPxService

this service class provides document reversal functionality. only journals, sales credit notes, and sales invoices are currently supported.

Methods

amendSync

global static void amendSync(List<c2g.AmendPxService.Document> changes)

This service allows you to amend documents synchronously.

Input Parameters

Name Type Description
changes List<c2g.AmendPxService.Document> A list of changes to be applied to posted documents.

amendAsync

global static ID amendAsync(List<c2g.AmendPxService.Document> changes)

This service allows you to amend documents asynchronously using an Apex Job. The amendAsync method can handle larger documents than the amendSync method.

Input Parameters

Name Type Description
changes List<c2g.AmendPxService.Document> A list of changes to be applied to posted documents.

Return Value

The ID of the async job. This can be monitored from the "Apex Jobs" page.

c2g.AmendPxService.Document

global abstract class Document

a container for the changes to apply to a document.

Properties

Name Type Description
documentId ID the id of the document to amend.
description String the required description of the document.
amendDescription Boolean set to 'true' if the description is to be amended.
subAnalysis Map<String, Object> a map of custom document field values to be amended (keyed by the field name).

c2g.AmendPxService.Journal

global class Journal extends Document

a specialised document for the changes to apply to a journal.

This class extends c2g.AmendPxService.Document

Properties

Name Type Description
reference String the required reference of the journal.
amendReference Boolean set to 'true' if the reference is to be amended.
lineItems List<c2g.AmendPxService.JournalLine> a list of the journal lines to amend.

c2g.AmendPxService.Line

global abstract class Line

a container for the changes to apply to a document line.

Properties

Name Type Description
lineId ID the id of the document line to amend.
lineDescription String the required description of the line.
amendLineDescription Boolean set to 'true' if the description is to be amended.
subAnalysis Map<String, Object> a map of custom line field values to be amended (keyed by the field name).

c2g.AmendPxService.JournalLine

global class JournalLine extends Line

This class extends c2g.AmendPxService.Line

Properties

Name Type Description
dimension1 ID the required dimension 1 id of the line.
amendDimension1 Boolean set to 'true' if dimension 1 is to be amended.
dimension2 ID the required dimension 2 id of the line.
amendDimension2 Boolean set to 'true' if dimension 2 is to be amended.
dimension3 ID the required dimension 3 id of the line.
amendDimension3 Boolean set to 'true' if dimension 3 is to be amended.
dimension4 ID the required dimension 4 id of the line.
amendDimension4 Boolean set to 'true' if dimension 4 is to be amended.

c2g.AmendPxService.SalesCreditNote

global class SalesCreditNote extends Document

a specialised document for the changes to apply to a sales credit note.

This class extends c2g.AmendPxService.Document

Properties

Name Type Description
customerReference String the required reference of the sales credit note.
amendReference Boolean set to 'true' if the reference is to be amended.
DueDate Date the required due date of the sales credit note.
amendDueDate Boolean set to 'true' if the due date is to be amended.
creditNoteReason String the required reason of the sales credit note.
amendCreditNoteReason Boolean set to 'true' if the credit note reason is to be amended.
Dimension1 Id the required dimension 1 of the sales credit note.
amendDimension1 Boolean set to 'true' if the dimension 1 is to be amended.
Dimension2 Id the required dimension 2 of the sales credit note.
amendDimension2 Boolean set to 'true' if the dimension 2 is to be amended.
Dimension3 Id the required dimension 3 of the sales credit note.
amendDimension3 Boolean set to 'true' if the dimension 3 is to be amended.
Dimension4 Id the required dimension 4 of the sales credit note.
amendDimension4 Boolean set to 'true' if the dimension 4 is to be amended.
PrintStatus String the required print status of the sales credit note.
amendPrintStatus Boolean set to 'true' if the print status is to be amended.
lineItems List<c2g.AmendPxService.SalesCreditNoteLine> a list of the sales credit note lines to amend.

c2g.AmendPxService.SalesCreditNoteLine

global class SalesCreditNoteLine extends Line

This class extends c2g.AmendPxService.Line

Properties

Name Type Description
dimension1 ID the required dimension 1 id of the line.
amendDimension1 Boolean set to 'true' if dimension 1 is to be amended.
dimension2 ID the required dimension 2 id of the line.
amendDimension2 Boolean set to 'true' if dimension 2 is to be amended.
dimension3 ID the required dimension 3 id of the line.
amendDimension3 Boolean set to 'true' if dimension 3 is to be amended.
dimension4 ID the required dimension 4 id of the line.
amendDimension4 Boolean set to 'true' if dimension 4 is to be amended.

c2g.AmendPxService.SalesInvoice

global class SalesInvoice extends Document

a specialised document for the changes to apply to a sales invoice.

This class extends c2g.AmendPxService.Document

Properties

Name Type Description
customerReference String customer reference such as a customer order number.
amendReference Boolean set to 'true' if the reference is to be amended.
DueDate Date the document's due date.
amendDueDate Boolean set to 'true' if the due date is to be amended.
PaymentScheduleDueDates List<Date> the list of payment due dates if a payment schedule is attached to the sales invoice.
amendPaymentScheduleDueDates Boolean set to 'true' if the payment schedule due date is to be amended.
Dimension1 Id the document's dimension 1 value.
amendDimension1 Boolean set to 'true' if the dimension 1 is to be amended.
Dimension2 Id the document's dimension 2 value.
amendDimension2 Boolean set to 'true' if the dimension 2 is to be amended.
Dimension3 Id the document's dimension 3 value.
amendDimension3 Boolean set to 'true' if the dimension 3 is to be amended.
Dimension4 Id the document's dimension 4 value.
amendDimension4 Boolean set to 'true' if the dimension 4 is to be amended.
PrintStatus String the document's print status value.
amendPrintStatus Boolean set to 'true' if the print status is to be amended.
lineItems List<c2g.AmendPxService.SalesInvoiceLine> a list of the sales invoice lines to amend.

c2g.AmendPxService.SalesInvoiceLine

global class SalesInvoiceLine extends Line

This class extends c2g.AmendPxService.Line

Properties

Name Type Description
dimension1 ID the document's dimension 1 value.
amendDimension1 Boolean set to 'true' if dimension 1 is to be amended.
dimension2 ID the document's dimension 2 value.
amendDimension2 Boolean set to 'true' if dimension 2 is to be amended.
dimension3 ID the document's dimension 3 value.
amendDimension3 Boolean set to 'true' if dimension 3 is to be amended.
dimension4 ID the document's dimension 4 value.
amendDimension4 Boolean set to 'true' if dimension 4 is to be amended.
© Copyright 2009–2022 FinancialForce.com, inc. All rights reserved. Various trademarks held by their respective owners.