ERP Core API Developer Reference

fferpcore.BillingDocumentService

global with sharing class BillingDocumentService

Services for Billing Documents.

Properties

Name Type Description
MESSAGE_TYPE_COMPLETION_PROCESS String Message type developer name for Completion Process request messages.
MESSAGE_TYPE_COMPLETION_RESPONSE String Message type developer name for Completion Process response messages.
MESSAGE_TYPE_COMPLETION_COMPLETE String Message type developer name for Document Complete messages.

Enums

ProcessState

State of a completion process.

Value Description
FAILED The process has failed.
PENDING The process is pending asynchronous results.
COMPLETE The process is complete.

Methods

completeDocuments

global static Map<Id, fferpcore.BillingDocumentService.ProcessResult> completeDocuments(Set<Id> billingDocumentIds)

Complete billing documents. The documents must be in draft state, have a least one line and not have a completion in progress. Applications may add further validation.

Input Parameters

Name Type Description
billingDocumentIds Set<Id> Set of IDs of billing documents to complete.

Return Value

Map of completion process results keyed on billing document Id.

fferpcore.BillingDocumentService.ProcessResult

global class ProcessResult

The result of a completion process.

Properties

Name Type Description
DocumentId Id The Billing Document Id.
State fferpcore.BillingDocumentService.ProcessState The state of the completion process.
Messages List<String> Any messages generated by the process.

Methods

ProcessResult

global ProcessResult(Id documentId, fferpcore.BillingDocumentService.ProcessState state, List<String> messages)

Constructs a ProcessResult.

Input Parameters

Name Type Description
documentId Id The blling document Id.
state fferpcore.BillingDocumentService.ProcessState The state of the process.
messages List<String> Any messages generated by the process.