c2g.PostingPxServiceglobal with sharing class PostingPxService This service class provides document posting functionality. Only journals and sales 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 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. 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 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. 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. |