ERPNext HRMS icon

ERPNext HRMS

Work with ERPNext/Frappe HRMS v15-v16 documents and methods

Frappe Method → Cancel

AI-generated

Summary

Cancel a submitted Frappe document in ERPNext HRMS using the specified API version and document name.

Inputs

  • API Version — Select the Frappe REST API version to use, either v1 (stable) or v2 (Frappe v16). Defaults to v1.
  • Method Name (required) — The full dotted path of a whitelisted Frappe method to call. (Note: For Cancel operation this parameter is not used.)
  • Arguments JSON — JSON object representing arguments to pass to the Frappe method. (Note: For Cancel operation this parameter is not used.)
  • Document Name (required) — The unique identifier (name) of the submitted document to cancel.

Output shape

a JSON object indicating the result message of the cancel action, typically a string or a response message from Frappe API

The operation retrieves the full document by its name, then sends a cancel action request; the output is the success message or API response message. Errors are thrown on failure unless 'Continue On Fail' is enabled.

Examples

Example 1: Cancel an Expense Claim with name EXP-0001 using API version v1

Set Resource to the relevant document (e.g. Expense Claim), Operation to Cancel, Document Name to EXP-0001, and optionally API Version to v1 (default).

Links

Discussion