Set Field Value

erpnext.set_value
ActionCRM & salesconnection required

Calls the ERPNext API with the connection's credentials.

Write one field — or several at once — on a document, running the DocType's own validation.

Connection

Required
Yes — the node will not save without one
Auth type
API key
Providers
ERPNext
Secret shape
{"api_key": "…", "api_secret": "…"}
Config it needs
base_url, doctype
Resolved by
config.connection_id, else node.connection_id

Configuration

4 fields, 2 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
doctype
The DocType to act on, spelled as ERPNext spells it (e.g. 'Sales Order'). Overrides the default DocType on the connection.
stringNo——Customer
name
The document's name — its primary key in ERPNext (e.g. 'ACC-SINV-2025-00001').
stringYes——CUST-0001
fieldname
The field to write. To write several at once, put an object of field/value pairs here and leave value empty.
stringYes——status
value
The new value for that single field. Ignored when fieldname holds an object of several fields.
stringNo——Closed

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "doctype": "Customer",
  "fieldname": "status",
  "name": "CUST-0001",
  "value": "Closed"
}

Output

One shape.

result

FieldTypeExample
doctype
The DocType that was acted on.
string—
name
The document's name in ERPNext.
string—
document
The whole document as ERPNext stored it, child tables included.
object—
{
  "doctype": "",
  "document": {},
  "name": ""
}

See Set Field Value run in a workflow.

In a technical demo we add the ERPNext connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.