Accounting Apex API Developer Reference

c2g.DiscardPxService

global with sharing class DiscardPxService

This service class provides functionality for discarding documents. Note that only journals and sales 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

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–2022 FinancialForce.com, inc. All rights reserved. Various trademarks held by their respective owners.