Accounting Apex API Developer Reference

c2g.DiscardPxService

global with sharing class DiscardPxService

This service class provides functionality for discarding documents. Note that only journals, sales credit notes, sales invoices, payable invoices and payable credit notes are currently supported.

Methods

discardSync

global static void discardSync(Set<ID> sourceIDs, String discardReason)

This service enables you to discard documents synchronously.
Depending on the type of document that you are discarding, you must have the appropriate custom permission assigned:

  • JournalDiscard (Discard Journals) to discard journals
  • SalesCreditNoteDiscard (Discard Sales Credit Notes) to discard sales credit notes
  • SalesInvoiceDiscard (Discard Sales Invoices) to discard sales invoices
  • PayableInvoiceDiscard (Discard Payable Invoices) to discard payable invoices
  • PayableCreditNoteDiscard (Discard Payable Credit Notes) to discard payable credit notes
  • CashEntryDiscard (Discard cash entry) to discard cash entry

Input Parameters

Name Type Description
sourceIDs Set<ID> Identifies the documents to discard. Note that all the IDs in the set must belong to records of the same object. For example, you cannot mix journals and sales credit notes.
discardReason String Reason for discarding the documents.
© Copyright 2009–2024 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.