Accounting Apex API Developer Reference

c2g.DocumentCreatePxService

global with sharing class DocumentCreatePxService

This service class provides document creation functionality. Only journals, cash entries, sales credit notes, sales invoices, payable invoices and payable credit notes are currently supported.

Methods

createSync

global static Set<ID> createSync(List<c2g.DocumentCreatePxService.Document> documents)

This service allows you to create documents synchronously.

Input Parameters

Name Type Description
documents List<c2g.DocumentCreatePxService.Document> Holds the component records for each document to create.

Return Value

The IDs of the document headers created.

createAsync

global static ID createAsync(List<c2g.DocumentCreatePxService.Document> documents)

This service allows you to create documents asynchronously using an Apex Job. The createAsync method can handle larger documents than the createSync method.

Input Parameters

Name Type Description
documents List<c2g.DocumentCreatePxService.Document> Holds the component records for each document to create.

Return Value

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

c2g.DocumentCreatePxService.Document

global virtual with sharing class Document

A container for the records that make up a document.

Properties

Name Type Description
header SObject The document header.
lines List<SObject> The document lines.
expenseLines List<SObject> The document expenseLines.

Methods

Document

global Document(SObject header, List<SObject> lines)

The document constructor.

Document

global Document(SObject header, List<SObject> lines, List<SObject> expenseLines)

The document constructor with multiple line type.

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