This guide explains what a DocType is, its structure, and how to create and configure DocTypes in ERPNext.
A DocType is the core data model in ERPNext. It defines the structure, behavior, and storage of records in the system. Every form in ERPNext is based on a DocType.
-
Go to DocType list in ERPNext (search in AwesomeBar).
-
Click New.
-
Fill in the basic details:
- Name β Internal name of the DocType.
- Module β The app/module where it belongs.
- Custom β Check this if you are creating a custom DocType.
-
Add fields under the Fields table.
-
Save and reload the page.
| Property | Description |
|---|---|
| Name | Internal identifier for the DocType |
| Module | The module in which it is stored |
| Is Submittable | Allows records to be submitted after save |
| Is Child Table | Marks the DocType as a table for use in parent forms |
| Permissions | Controls which roles can Read, Write, Create, Submit, etc. |
Some common field types you can use:
| Field Type | Purpose |
|---|---|
| Data | Single-line text |
| Text | Multi-line text |
| Date/Datetime | Stores date or date & time |
| Int/Float/Currency | Numeric values |
| Check | Checkbox (Yes/No) |
| Select | Dropdown options |
| Link | Link to another DocType |
| Table | Add a child table |
| Label | Fieldname | Fieldtype | Options |
|---|---|---|---|
| Customer | customer | Link | Customer |
| Start Date | start_date | Date | |
| Description | description | Text | |
| Amount | amount | Currency | |
| Is Active | is_active | Check |
Permissions define which roles can read, write, create, delete, submit, etc.
| Role | Read | Write | Create | Delete | Submit |
|---|---|---|---|---|---|
| Sales User | β | β | β | ||
| Accounts User | β | ||||
| System Manager | β | β | β | β | β |
β
Use naming series if you need auto-generated IDs (e.g., CUST-.YYYY.-).
β
Keep fieldnames lowercase and without spaces (use underscores).
β
Use Child Tables for line items or repeating records.
β
Define permissions carefully to control access.
π References: