c2g.AmendPxService
global with sharing class AmendPxService
This service class provides document reversal functionality. Only journals, sales credit notes, sales invoices, payable invoices and payable credit notes are currently supported.
Methods
amendSync
global static void amendSync(List<c2g.AmendPxService.Document> changes)
This service allows you to amend documents synchronously.
Input Parameters
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
Return Value
The ID of the async job. This can be monitored from the "Apex Jobs" page.
c2g.AmendPxService.Document
global with sharing abstract class Document
A container for the changes to apply to a document.
Properties
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 with sharing class Journal extends Document
A specialised document for the changes to apply to a journal.
Properties
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 with sharing abstract class Line
A container for the changes to apply to a document line.
Properties
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 with sharing class JournalLine extends Line
Properties
accountReference |
String |
The required Account Reference ID of the line.
|
amendAccountReference |
Boolean |
Set to 'true' if Account Reference is to be amended.
|
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 with sharing class SalesCreditNote extends Document
A specialised document for the changes to apply to a sales credit note.
Properties
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 with sharing class SalesCreditNoteLine extends Line
Properties
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 with sharing class SalesInvoice extends Document
A specialised document for the changes to apply to a sales invoice.
Properties
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 with sharing class SalesInvoiceLine extends Line
Properties
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.
|
c2g.AmendPxService.PayableInvoice
global with sharing class PayableInvoice extends Document
A specialised document for the changes to apply to a Payable Invoice.
Properties
documentReference1 |
String |
The required reference of the Payable Invoice.
|
amendDocumentReference1 |
Boolean |
Set to 'true' if the reference is to be amended.
|
documentReference2 |
String |
The required reference of the Payable Invoice.
|
amendDocumentReference2 |
Boolean |
Set to 'true' if the reference is to be amended.
|
dueDate |
Date |
The required due Date of the Payable Invoice.
|
amendDueDate |
Boolean |
Set to 'true' if the due Date is to be amended.
|
incomeTaxType |
String |
The required Income Tax Type of the Payable Invoice.
|
amendIncomeTaxType |
Boolean |
Set to 'true' if the Income Tax Type is to be amended.
|
dimension1 |
Id |
The required Account Dimension 1 of the Payable Invoice.
|
amendDimension1 |
Boolean |
Set to 'true' if the Account Dimension 1 is to be amended.
|
dimension2 |
Id |
The required Account Dimension 2 of the Payable Invoice.
|
amendDimension2 |
Boolean |
Set to 'true' if the Account Dimension 2 is to be amended.
|
dimension3 |
Id |
The required Account Dimension 3 of the Payable Invoice.
|
amendDimension3 |
Boolean |
Set to 'true' if the Account Dimension 3 is to be amended.
|
dimension4 |
Id |
The required Account Dimension 4 of the Payable Invoice.
|
amendDimension4 |
Boolean |
Set to 'true' if the Account Dimension 4 is to be amended.
|
lineItems |
List<c2g.AmendPxService.PayableInvoiceLine> |
A list of the Payable Invoice lines to amend.
|
expenseLineItems |
List<c2g.AmendPxService.PayableInvoiceExpenseLine> |
A list of the Payable Invoice expense lines to amend.
|
c2g.AmendPxService.PayableInvoiceLine
global with sharing class PayableInvoiceLine extends Line
Properties
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.
|
c2g.AmendPxService.PayableInvoiceExpenseLine
global with sharing class PayableInvoiceExpenseLine extends Line
Properties
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.
|
c2g.AmendPxService.PayableCreditNote
global with sharing class PayableCreditNote extends Document
A specialised document for the changes to apply to a Payable Credit Note.
Properties
documentReference1 |
String |
The required reference of the Payable Credit Note.
|
amendDocumentReference1 |
Boolean |
Set to 'true' if the reference is to be amended.
|
documentReference2 |
String |
The required reference of the Payable Credit Note.
|
amendDocumentReference2 |
Boolean |
Set to 'true' if the reference is to be amended.
|
dueDate |
Date |
The required due Date of the Payable Credit Note.
|
amendDueDate |
Boolean |
Set to 'true' if the due Date is to be amended.
|
creditNoteReason |
String |
The required reason of the Payable Credit Note.
|
amendCreditNoteReason |
Boolean |
Set to 'true' if the Credit note reason is to be amended.
|
accountInvoiceNumber |
String |
The required Account Invoice Number of the Payable Credit Note.
|
amendAccountInvoiceNumber |
Boolean |
Set to 'true' if the Account Invoice Number is to be amended.
|
incomeTaxType |
String |
The required Income Tax Type of the Payable Credit Note.
|
amendIncomeTaxType |
Boolean |
Set to 'true' if the Income Tax Type is to be amended.
|
dimension1 |
Id |
The required Account Dimension 1 of the Payable Credit Note.
|
amendDimension1 |
Boolean |
Set to 'true' if the Account Dimension 1 is to be amended.
|
dimension2 |
Id |
The required Account Dimension 2 of the Payable Credit Note.
|
amendDimension2 |
Boolean |
Set to 'true' if the Account Dimension 2 is to be amended.
|
dimension3 |
Id |
The required Account Dimension 3 of the Payable Credit Note.
|
amendDimension3 |
Boolean |
Set to 'true' if the Account Dimension 3 is to be amended.
|
dimension4 |
Id |
The required Account Dimension 4 of the Payable Credit Note.
|
amendDimension4 |
Boolean |
Set to 'true' if the Account Dimension 4 is to be amended.
|
lineItems |
List<c2g.AmendPxService.PayableCreditNoteLine> |
A list of the Payable Credit Note lines to amend.
|
expenseLineItems |
List<c2g.AmendPxService.PayableCreditNoteExpenseLine> |
A list of the Payable Credit Note expense lines to amend.
|
c2g.AmendPxService.PayableCreditNoteLine
global with sharing class PayableCreditNoteLine extends Line
Properties
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.
|
c2g.AmendPxService.PayableCreditNoteExpenseLine
global with sharing class PayableCreditNoteExpenseLine extends Line
Properties
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.
|
|