update_document
Updates an existing ERPNext document by DocType, document ID, and changed fields. Use smart mode for validation and clearer error handling during record modifications.
Instructions
Update an existing document in ERPNext
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>",
"data": "<data>"
},
"name": "update_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Document data to update | |
| mode | No | Update mode: 'smart' (default) or 'standard' (legacy). Smart mode performs validation & enhanced error handling. | smart |
| name | Yes | Document name/ID | |
| doctype | Yes | ERPNext DocType (e.g., Customer, Item) |