Accounting Apex API Developer Reference

c2g.PostingPxService

global with sharing class PostingPxService

This service class provides document posting functionality. Only cash entries, journals, sales credit notes, sales invoices, payable invoices and payable credit notes are currently supported. All documents must belong to the same company.

Methods

postSync

global static Set<ID> postSync(Set<ID> sourceIds)

This service allows you to post documents synchronously. Use the CashEntryPost (Post Cash Entries) custom permission to post the cash entries. Use the JournalPost (Post Journals) custom permission to post the journals. Use the SalesCreditNotePost (Post Sales Credit Notes) custom permission to post the sales credit notes. Use the SalesInvoicePost (Post Sales Invoices) custom permission to post the sales invoices. Use the PayableInvoicePost (Post Payable Invoices) custom permission to post the payable invoices. Use the PayableCreditNotePost (Post Payable Credit Notes) custom permission to post the payable credit notes.

Input Parameters

Name Type Description
sourceIds Set<ID> Identifies the documents to post.

Return Value

The IDs of the transactions created.

post

global static Set<ID> post(Set<ID> sourceIds)

This service allows you to post documents deciding taking to account number lines limit to run Sync or Async. Use the JournalPost (Post Journals) custom permission to post the journals. Use the SalesInvoicePost (Post Sales Invoices) custom permission to post the sales invoices.

Input Parameters

Name Type Description
sourceIds Set<ID> Identifies the documents to post.

Return Value

The IDs of the transactions created.

postAsync

global static ID postAsync(Set<ID> sourceIds)

This service allows you to post documents asynchronously using an Apex Job. Use the CashEntryPost (Post Cash Entries) custom permission to post the cash entries. Use the JournalPost (Post Journals) custom permission to post the journals. Use the SalesCreditNotePost (Post Sales Credit Notes) custom permission to post the sales credit notes. Use the SalesInvoicePost (Post Sales Invoices) custom permission to post the sales invoices. Use the PayableInvoicePost (Post Payable Invoices) custom permission to post the payable invoices. Use the PayableCreditNotePost (Post Payable Credit Notes) custom permission to post the payable credit notes. When Avalara AvaTax is enabled, you must run the Background Posting Scheduler to commit the tax value to AvaTax. The postAsync method can handle larger documents than the postSync method.

Input Parameters

Name Type Description
sourceIds Set<ID> Identifies the documents to post.

Return Value

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

© Copyright 2009–2024 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.