frappe_create_doc
Create a new document in Frappe by specifying the DocType and field values. Returns the system-assigned document with all field values.
Instructions
Create a new document of the specified DocType with the provided field values. The data object should contain field names as keys and their respective values. Frappe auto-generates document names (via naming series) for new records. Returns the created document including its system-assigned name and all field values.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Key-value pairs of document field values to set. Keys are field names (e.g. 'customer_name', 'email_id', 'status', 'items'), values are the field values. For child table fields, provide a list of dicts. Must include at least all mandatory fields required by the target DocType. | |
| doctype | Yes | The target DocType name for the new document (e.g. 'Customer', 'Sales Invoice', 'Item', 'ToDo', 'Contact', 'Address'). Must be a valid DocType that exists on the target Frappe site. |