Check Permission
erpnext.has_permission
ActionCRM & salesconnection required
Calls the ERPNext API with the connection's credentials.
Ask ERPNext whether the connection's user may read, write, submit or cancel a given document.
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
3 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
doctype The DocType to act on, spelled as ERPNext spells it (e.g. 'Sales Order'). Overrides the default DocType on the connection. | string | No | — | — | Customer |
name The document's name — its primary key in ERPNext (e.g. 'ACC-SINV-2025-00001'). | string | Yes | — | — | CUST-0001 |
perm_type Which permission to check for. | string | No | read | one of "read", "write", "create", "submit", "cancel", "report" | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"doctype": "Customer",
"name": "CUST-0001",
"perm_type": "read"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
doctype The DocType that was checked. | string | — |
name The document that was checked. | string | — |
perm_type The permission that was checked for. | string | — |
has_permission True when the user holds that permission. | boolean | — |
{
"doctype": "",
"has_permission": false,
"name": "",
"perm_type": ""
}See Check Permission 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.