Developer
Updated 2 days ago
If you have built your own app and wanted to use the advance payment functionality, you can now use the Advance Payment global class.
There are two available global classes that you can use depending on your input parameter.
When you want to apply multiple advance payments to a single invoice.
fw1.Invoice.applyAdvancePayment(fw1__Invoice__c invoice, List<fw1__Payment__c> paymentList);When you want to apply a single advance payment to multiple invoices.
fw1.Invoice.applyAdvancePayment(List<fw1__Invoice__c> invoiceList, fw1__Payment__c payment);List of arguments:
invoice - Salesforce Id of your invoice record
payment - Salesforce Id of your payment record
invoiceList - list of invoice records
paymentList - list of payment records