Accounting Apex API Developer Reference

c2g.CODAAPIPurchaseInvoice_9_0

global with sharing class CODAAPIPurchaseInvoice_9_0

The service class relating to Purchase Invoices.

Properties

Name Type Description
VERSION_STRING String The API version.
SERVICE_NAME String The name of the service.

Methods

GetAPIVersion

webservice static String GetAPIVersion()

Used to get the latest API version.

Return Value

Text

GetServiceName

webservice static String GetServiceName()

Used to get the name of the service.

Return Value

Text

CreatePurchaseInvoice

webservice static c2g.CODAAPICommon.Reference CreatePurchaseInvoice(c2g.CODAAPICommon_9_0.Context context, c2g.CODAAPIPurchaseInvoiceTypes_9_0.PurchaseInvoice value)

This service allows you to create a purchase invoice (also known as payable invoice). See "Payable Invoice Fields" and "What is a Payable Invoice" in the FinancialForce Help for more details.

Input Parameters

Name Type Description
context c2g.CODAAPICommon_9_0.Context Identifies the FinancialForce company in which the current operation executes.
value c2g.CODAAPIPurchaseInvoiceTypes_9_0.PurchaseInvoice Holds details of the purchase invoice you want to create.

Return Value

This web service returns a CODAAPICommon.Reference object.

UpdatePurchaseInvoice

webservice static c2g.CODAAPICommon.Reference UpdatePurchaseInvoice(c2g.CODAAPICommon_9_0.Context context, c2g.CODAAPIPurchaseInvoiceTypes_9_0.PurchaseInvoice value)

This service allows you to update a purchase invoice.

Input Parameters

Name Type Description
context c2g.CODAAPICommon_9_0.Context Identifies the FinancialForce company in which the current operation executes.
value c2g.CODAAPIPurchaseInvoiceTypes_9_0.PurchaseInvoice Holds details of the purchase invoice you want to update.

Return Value

This web service returns a CODAAPICommon.Reference object.

PostPurchaseInvoice

webservice static void PostPurchaseInvoice(c2g.CODAAPICommon_9_0.Context context, c2g.CODAAPICommon.Reference value)

This service allows you to post a purchase invoice.

Input Parameters

Name Type Description
context c2g.CODAAPICommon_9_0.Context Identifies the FinancialForce company in which the current operation executes. Does not need to be the current company.
value c2g.CODAAPICommon.Reference Identifies the purchase invoice you want to post.

Return Value

This web service does not return a value.

GetPurchaseInvoice

webservice static c2g.CODAAPIPurchaseInvoiceTypes_9_0.PurchaseInvoice GetPurchaseInvoice(c2g.CODAAPICommon_9_0.Context context, c2g.CODAAPICommon.Reference value)

This service allows you to retrieve a purchase invoice.

Input Parameters

Name Type Description
context c2g.CODAAPICommon_9_0.Context Identifies the FinancialForce company in which the current operation executes.
value c2g.CODAAPICommon.Reference Identifies the purchase invoice you want to retrieve.

Return Value

This web service returns a c2g.CODAAPIPurchaseInvoiceTypes_9_0.PurchaseInvoice object.

PlaceOnHold

webservice static void PlaceOnHold(c2g.CODAAPICommon_9_0.Context context, c2g.CODAAPICommon.Reference value)

ReleaseForPayment

webservice static void ReleaseForPayment(c2g.CODAAPICommon_9_0.Context context, c2g.CODAAPICommon.Reference value)

BulkCreatePurchaseInvoice

webservice static c2g.CODAAPICommon.Reference[] BulkCreatePurchaseInvoice(c2g.CODAAPICommon_9_0.Context context, c2g.CODAAPIPurchaseInvoiceTypes_9_0.PurchaseInvoice[] values)

This service allows you to create purchase invoices in bulk.

Input Parameters

Name Type Description
context c2g.CODAAPICommon_9_0.Context Identifies the FinancialForce company in which the current operation executes.
values c2g.CODAAPIPurchaseInvoiceTypes_9_0.PurchaseInvoice[] Holds details of the purchase invoices you want to create.

Return Value

This web service returns an array of CODAAPICommon.Reference objects.

BulkUpdatePurchaseInvoice

webservice static c2g.CODAAPICommon.Reference[] BulkUpdatePurchaseInvoice(c2g.CODAAPICommon_9_0.Context context, c2g.CODAAPIPurchaseInvoiceTypes_9_0.PurchaseInvoice[] values)

This service allows you to update purchase invoices in bulk. It also handles amending posted purchase invoices and their related transactions.

Input Parameters

Name Type Description
context c2g.CODAAPICommon_9_0.Context Identifies the FinancialForce company in which the current operation executes.
values c2g.CODAAPIPurchaseInvoiceTypes_9_0.PurchaseInvoice[] Holds details of the purchase invoices you want to update.

Return Value

This web service returns an array of CODAAPICommon.Reference objects.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

//In addition to making updates, BulkUpdate can be used to amend, as this example shows
//using a reference to an existing posted invoice.
c2g.CODAAPICommon.Reference postedInvRef = c2g.CODAAPICommon.getRef('a4p1I00000002YwQAI', null);
c2g.CODAAPICommon_9_0.Context context = new c2g.CODAAPICommon_9_0.Context();
c2g.CODAAPIPurchaseInvoiceTypes_9_0.PurchaseInvoice invoice = c2g.CODAAPIPurchaseInvoice_9_0.GetPurchaseInvoice(context, postedInvRef);

//detail the amendment
invoice.InvoiceDescription = 'AmendedDescription';
List<c2g.CODAAPIPurchaseInvoiceTypes_9_0.PurchaseInvoice> invoices = new List<c2g.CODAAPIPurchaseInvoiceTypes_9_0.PurchaseInvoice>();
invoices.add(invoice);

//call the API
c2g.CODAAPIPurchaseInvoice_9_0.BulkUpdatePurchaseInvoice(context, invoices);

BulkPostPurchaseInvoice

webservice static void BulkPostPurchaseInvoice(c2g.CODAAPICommon_9_0.Context context, c2g.CODAAPICommon.Reference[] values)

This service allows you to post purchase invoices in bulk.

Input Parameters

Name Type Description
context c2g.CODAAPICommon_9_0.Context Identifies the FinancialForce company in which the current operation executes. Does not need to be the current company.
values c2g.CODAAPICommon.Reference[] Identifies the purchase invoices you want to post.

Return Value

This web service does not return a value.

BulkPlaceOnHold

webservice static void BulkPlaceOnHold(c2g.CODAAPICommon_9_0.Context context, c2g.CODAAPICommon.Reference[] values)

Mass on hold activation of purchase invoices

BulkReleaseForPayment

webservice static void BulkReleaseForPayment(c2g.CODAAPICommon_9_0.Context context, c2g.CODAAPICommon.Reference[] values)

Mass release of purchase invoices for payment

© Copyright 2009–2018 FinancialForce.com, inc. All rights reserved. Various trademarks held by their respective owners.