Accounting Apex API Developer Reference

c2g.ConvertToPurchaseCreditNoteService

global inherited sharing class ConvertToPurchaseCreditNoteService

The service class relating to the conversion of Payable Invoices to Payable Credit Notes.

Methods

ConvertToPurchaseCreditNoteService

global ConvertToPurchaseCreditNoteService()

convertToCreditNote

global static ID convertToCreditNote(Id invoiceId, String accCreditNoteNumber)

Converts a payable invoice to a credit note.

Input Parameters

Name Type Description
invoiceId Id Id of the payable invoice that you want to convert to a credit note.
accCreditNoteNumber String The vendor's credit note number.

Return Value

This service returns the ID of the generated payable credit note.

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.

Id invoiceId= ‘a1i28000000DYKZ’;
String accCreditNoteNumber = ‘CR#123’;
Id creditNoteId = ConvertToPayableCreditNotePxService.convertToCreditNote(invoiceId, accCreditNoteNumber);
© Copyright 2009–2023 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.