frappe_update_doc
Update specific fields of an existing document in Frappe by providing doctype, document name, and a dictionary of field-value pairs. Only specified fields are modified; others remain unchanged.
Instructions
Update specific fields of an existing document identified by its doctype and name. Only the fields provided in the data object are modified; all other fields remain unchanged. Returns the updated document with all current values. Use for changing status, updating contact information, modifying amounts, or adjusting any document field.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Dictionary of field names and their new values. Only the fields included here are modified; other fields retain their current values. Example: {'status': 'Cancelled', 'remarks': 'Cancelled per customer request'}. | |
| name | Yes | The unique document name or ID of the existing document to modify (e.g. 'SINV-00001', 'CUST-00001', 'ITEM-00001'). | |
| doctype | Yes | The DocType of the document to update (e.g. 'Sales Invoice', 'Customer', 'Item', 'Sales Order'). Must match the doctype of the existing document. |