Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

Cancel Credit Memos

cancelCreditMemos API is used to to cancel a set of credit memos. It accepts a set of credit memo IDs, validates each credit memo in the set, and returns a list of results (CreditMemoActionResult), which includes details for each record.

APISignature
cancelCreditMemos static List cancelCreditMemos(Set creditMemoIds)
When you call the API and input a set of credit memo IDs as input parameters:
  • The credit memo's status changes from Approved to Canceled. All credit memo line items under that memo are also marked as canceled.
  • Any billing schedules and usage schedules associated with the credit memo are reverted to Pending Billing status.
  • The Remaining Billable Amount on the related asset line item is recalculated.

Request Parameters

FieldTypeRequiredDescription
creditMemoIdsSetYesA set of credit memo IDs you want to cancel.

Response

FieldTypeDescription
CustomClass.CreditMemoActionResultListA result parameter is returned for each request parameter.

Code Sample - Request

List<Apttus_Billing.CustomClass.CreditMemoActionResult> cancelCreditMemos = Apttus_Billing.CreditMemoService.cancelCreditMemos(new Set<Id>{'a5JDc000000lq9J'});
System.debug('-cancelCreditMemos-'+cancelCreditMemos);

Code Sample - Response

cancelCreditMemos-(CreditMemoActionResult:[creditMemoId=a5JDc000000lq9EMAQ, isSuccess=true, message=CreditMemo has been Cancelled.])