cancel_document
Cancel a submitted ERPNext document by setting its docstatus to 2, then use the amend workflow to create a corrected copy because cancelled documents cannot be modified.
Instructions
Cancel a submitted document (set docstatus to 2). Cancelled documents cannot be modified — use amend workflow to create a corrected copy.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"doctype": "<doctype>",
"name": "<name>"
},
"name": "cancel_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Document name/ID | |
| doctype | Yes | ERPNext DocType |