c2g.ConvertToPurchaseCreditNoteServiceglobal inherited sharing class ConvertToPurchaseCreditNoteService the service class relating to the conversion of payable invoices to payable credit notes. Methods
ConvertToPurchaseCreditNoteServiceglobal ConvertToPurchaseCreditNoteService() convertToCreditNoteglobal static ID convertToCreditNote(Id invoiceId, String accCreditNoteNumber) Converts a payable invoice to a credit note. Input Parameters
Return ValueThis 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 = ConvertToPurchaseCreditNoteService.convertToCreditNote(invoiceId, accCreditNoteNumber); |