📋 Document
Master ERPNext document creation, customization, and management through the user interface
Understanding Documents in ERPNext
In ERPNext, everything is a Document (also called DocType). Think of documents as digital forms that capture and store your business data:
- Sales Order = Customer purchase request
- Invoice = Bill sent to customer
- Item = Product or service you sell
- Customer = Client information
- Employee = Staff member details
🎯 Creating Your First Custom Document
Let's create a custom document step-by-step using the ERPNext interface.
Step 1: Access DocType Creation
- Click the search bar at the top (Awesome Bar)
- Type "DocType List" and press Enter
- Click the blue "+ Add DocType" button in the top right corner
Step 2: Basic Document Settings
Document Name & Identity:
- Document Type: Enter a clear name (e.g., "Equipment Request")
- Module: Choose the relevant module from dropdown
- Use "Custom" if you're unsure
- This determines where your document appears in the sidebar
Document Behavior:
- Is Submittable: ✅ Check this if the document needs approval workflow
- Is Child Table: ❌ Leave unchecked for main documents
- Track Changes: ✅ Check to track who made what changes
- Allow Import: ✅ Check if you want to bulk import data via Excel
Step 3: Adding Fields to Your Document
Click the "Fields" section to start adding fields:
Text Fields
- Click "+ Add Row" in the Fields table
- Field Type: Select "Data" for short text
- Field Label: Enter what users will see (e.g., "Employee Name")
- Field Name: Auto-generated (don't change unless necessary)
- Required: ✅ Check if field is mandatory
Number Fields
- Field Type: Select "Int" for whole numbers or "Float" for decimals
- Field Label: e.g., "Quantity Requested"
- Default Value: Set a default if needed
Date Fields
- Field Type: Select "Date" or "Datetime"
- Field Label: e.g., "Required By Date"
- Default: Can set to "Today" for current date
Dropdown Fields
- Field Type: Select "Select"
- Field Label: e.g., "Priority Level"
- Options: Enter options separated by line breaks:
Low Medium High Urgent
Link Fields (Connect to Other Documents)
- Field Type: Select "Link"
- Field Label: e.g., "Employee"
- Options: Enter the document to link to (e.g., "Employee")
Step 4: Organizing Fields with Sections
Create logical sections to make your form user-friendly:
- Add a "Section Break" field before starting a new section
- Field Label: Name your section (e.g., "Request Details")
- Add a "Column Break" to create side-by-side fields
Example Organization:
Section: Employee Information
├── Employee (Link)
├── Department (Link)
└── Column Break
├── Request Date (Date)
└── Required By (Date)
Section: Equipment Details
├── Equipment Type (Select)
├── Description (Text Editor)
└── Quantity (Int)Step 5: Setting Up Permissions
Click the "Permissions" tab:
-
Role-Based Access: Choose who can access this document
- Employee: Can create and read their own
- HR Manager: Can read and write all
- System Manager: Full access
-
Permission Levels: For each role, set:
- Read: ✅ View documents
- Write: ✅ Edit documents
- Create: ✅ Make new documents
- Submit: ✅ Finalize documents (if submittable)
- Cancel: ✅ Reverse submitted documents
Step 6: Naming Your Documents
Click the "Naming" section:
-
Auto Name: Choose how documents get numbered:
- "naming_series:" - Use a prefix (e.g., EQR-2024-)
- "field:fieldname" - Use a specific field value
- "format:" - Custom format with date/counters
-
For Naming Series, click "Options" and add:
EQR-{YYYY}-{MM}-{#####}This creates: EQR-2024-01-00001
Step 7: Save and Test
- Click "Save" to create your document type
- Test it by going to your new document:
- Use Awesome Bar to search for your document name
- Click "+ Add [Your Document]"
- Fill out a test form to ensure everything works
🔧 Customizing Existing Documents
You can also modify ERPNext's built-in documents:
Using Customize Form
- Go to: Setup → Customization → Customize Form
- Select Document Type: Choose the document to customize (e.g., "Sales Order")
- Add Custom Fields: Click "+ Add Field" to add your own fields
- Modify Existing Fields: Edit labels, make fields mandatory, hide unwanted fields
- Save your customizations
Common Customizations:
Adding Company-Specific Fields
- Add fields for internal codes, categories, or tracking numbers
- Example: Adding "Project Code" to Sales Orders
Modifying Field Properties
- Make optional fields required
- Hide fields that don't apply to your business
- Change field labels to match your terminology
Adding Validation Rules
- Set minimum/maximum values for number fields
- Create dependencies between fields
- Add custom validation messages
📋 Document Workflows
Setting Up Approval Processes
-
Go to: Setup → Workflow → Workflow
-
Create New Workflow for your document
-
Define States:
- Draft (initial state)
- Pending Approval
- Approved
- Rejected
-
Set Transitions:
- Submit: Draft → Pending Approval
- Approve: Pending Approval → Approved
- Reject: Pending Approval → Rejected
-
Assign Actions to Roles:
- Employee: Can submit
- Manager: Can approve/reject
Email Notifications
Set up automatic emails when document status changes:
- Go to: Setup → Email → Notification
- Create notification for your document type
- Trigger: Choose when to send (e.g., "On Submit")
- Recipients: Select who gets the email
- Message Template: Customize the email content
📊 Document Reports and Analytics
Creating List Views
- Go to your document list (e.g., Equipment Request List)
- Click "Customize" (if you have permissions)
- Add/Remove Columns shown in the list view
- Set Default Filters for common views
- Save your customized view
Standard Reports
ERPNext automatically creates reports for your documents:
- Document-wise reports: Show individual document details
- Summary reports: Aggregate data across multiple documents
- Trend analysis: Show patterns over time
🚨 Best Practices
Field Design
- Use clear, descriptive labels: "Customer Phone" not "Phone"
- Group related fields: Use sections and column breaks
- Make important fields required: But don't overdo it
- Set appropriate field types: Use "Currency" for money, "Link" for relationships
Naming Conventions
- Use consistent prefixes: All purchase docs start with "PO-"
- Include dates: Helps with organization and searching
- Keep it short: Long names are hard to work with
Permission Management
- Follow principle of least privilege: Give minimum access needed
- Use role hierarchy: Manager inherits Employee permissions
- Test permissions: Verify users can do what they need to
Performance Tips
- Limit fields in list view: Only show essential columns
- Use appropriate indexes: ERPNext handles this automatically
- Archive old documents: Keep active lists manageable
🔍 Finding and Managing Documents
Using Filters
- Go to any document list
- Click the "Filter" button
- Add filter conditions:
- Field name (e.g., "Status")
- Condition (equals, contains, etc.)
- Value (e.g., "Pending")
Saved Filters
Create frequently-used filter sets:
- Set up your filters
- Click "Save Filter"
- Give it a name (e.g., "My Pending Requests")
- Access it from the filter dropdown
Bulk Operations
Update multiple documents at once:
- Select documents using checkboxes
- Click "Actions" dropdown
- Choose action: Delete, assign, change status, etc.