c2g.PostingPxServiceglobal 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
postSyncglobal 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
Return ValueThe IDs of the transactions created. postglobal 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
Return ValueThe IDs of the transactions created. postAsyncglobal 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
Return ValueThe ID of the async job. This can be monitored from the "Apex Jobs" page. |