global inherited sharing class PurchaseCreditNotePostAndMatchService
The service class relating to the Post and Match feature within Payable Credit Notes.
global static Id postAndMatch(Id creditNoteId)
Posts the selected payable credit note and then matches it with the corresponding payable invoice.
This service returns the Id of the payable credit note.
//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 creditNoteId = ‘a1i28000000DYKZ’ PurchaseCreditNotePostAndMatchService.postAndMatch(creditNoteId);