Delete Credit Memos
The deleteCreditMemos API is used to delete multiple credit memos at once by accepting a set of credit memo IDs.
| API | Signature |
|---|---|
| deleteCreditMemos | static List deletecreditmemos(Set creditMemoIds) |
When you call the API and input a set of credit memo IDs, the API:
- Validates each credit memo in the set.
- Deletes credit memos that are eligible (e.g., in Canceled status).
- Return a list of results, one for each credit memo, indicating success or failure for each approval attempt.
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| creditMemoIds | Set | Yes | A set of credit memo IDs you want to delete. |
Response
| Field | Type | Description |
|---|---|---|
| CustomClass.CreditMemoActionResult | List | A result parameter is returned for each request parameter. |
Code Sample - Request
List<Apttus_Billing.CustomClass.CreditMemoActionResult> deletecreditmemos = Apttus_Billing.CreditMemoService.deletecreditmemos(new Set<Id>{'a5JDc000000lq9J'});
System.debug('-deletecreditmemos-'+deletecreditmemos);Code Sample - Response
deletecreditmemos-(CreditMemoActionResult:[creditMemoId=a5JDc000000lq9JMAQ, isSuccess=true, message=CreditMemo has been Deleted.])