Understanding DocTypes - The Building Blocks of iVendNext

Understanding DocTypes - The Building Blocks of iVendNext

Overview

DocTypes are the backbone of iVendNext workflows. They define how data is stored, organized, and shown—whether it's Sales Invoices, Inventory, or Projects.



This comprehensive guide will help you:
✔ Understand what DocTypes are and why they matter
✔ Learn how to create and customize DocTypes
✔ Discover advanced features for complex business needs




1. What Are DocTypes?

The DNA of Your Business Data

DocTypes are iVendNext's equivalent of database tables, but with powerful built-in features:


  • Data Modeling: Define what fields are stored (e.g., Customer Name, Date, Amount)

  • Business Logic: Control how records behave (validation, calculations, workflows)

  • User Interface: Determine how data is displayed and interacted with


Common Examples:


  • Transactions: Sales Orders, Purchase Invoices

  • Masters: Customers, Items, Suppliers

  • Setup: Company, Fiscal Year




2. Core Components of a DocType

Fields: Your Data Building Blocks

Every DocType consists of fields that define your data structure:


Field Type

Purpose

Example

Data

Basic information

Date, Amount

Link

Connect to other DocTypes

Customer, Item

Table

Child records

Order Items, Tasks

Action

Buttons/Triggers

Submit, Cancel


Key Properties

  • Naming Series: Auto-generate IDs (SO-0001, INV-2023-001)

  • Permissions: Control who can create/edit/view

  • Workflow: Define submission/approval processes




3. Creating a New DocType

Step-by-Step Setup

  1. Navigate to:


Setup > Customize > DocType > New  


  1. Configure basics:


  • Name: Logical name (e.g., "Project Task")

  • Module: Where it appears (e.g., "Projects")

  • Is Submittable: Requires formal submission


  1. Add fields:


  • Click "Add Field" for each data element

  • Set types, labels, and validation rules


  1. Set advanced options:


  • Is Tree: For hierarchical data (e.g., Organizations)

  • Track Changes: Maintain version history





4. Advanced DocType Features

a) Child Tables

Create related records within a parent document:


  • Sales Order → Order Items

  • Project → Tasks


Pro Tip: Use Editable Grids for faster data entry in child tables.


b) Custom Scripts

Add business logic with JavaScript:


// Auto-calculate total when quantity changes  

cur_frm.cscript.qty = function(doc) {  

  doc.amount = doc.qty * doc.rate;  

  refresh_field('amount');  

};  


c) Web Integration

Enable DocTypes for customer portals:


  1. Check "Allow in Website"

  2. Configure portal views




5. Best Practices for DocType Design

  1. Plan Before Building


  • Map all required fields and relationships

  • Consider reporting needs


  1. Naming Conventions


  • Use consistent prefixes (e.g., "CUST_" for customer fields)

  • Avoid spaces in fieldnames


  1. Security First


  • Set granular permissions early

  • Use Role Profiles for standardization


  1. Performance Considerations


  • Limit mandatory fields in high-volume DocTypes

  • Index frequently searched fields




6. Common Use Cases

a) Custom Project Management

Create DocTypes for:


  • Projects (parent)

  • Tasks (child table)

  • Time Logs (linked)


b) Enhanced Inventory Tracking

Add custom fields to Item DocType:


  • Storage Locations

  • Supplier Codes

  • Custom Attributes


c) Tailored CRM

Extend Customer DocType with:


  • Interaction History

  • Credit Limits

  • Preferred Communication Methods




Troubleshooting Guide

Here’s a quick look at some common issues you might run into.


Issue

Solution

Missing DocType

Check module assignments and permissions

Field not saving

Verify mandatory settings and data types

Performance lags

Optimize child tables and indexing

Permission errors

Review role permissions and sharing settings




    • Related Articles

    • Managing Permissions and Web Views for DocTypes

      Overview Effective permission management and web view configuration are critical for maintaining data security while enabling collaboration in iVendNext. This article provides a comprehensive approach to controlling access to your DocTypes and making ...
    • Understanding Brands

      Overview A Brand is a name under which products are sold. This guide will walk you through everything you need to know about Brands in iVendNext. What is a Brand in iVendNext? A Brand in iVendNext is a label or name that identifies a group of items. ...
    • Getting Started with iVendNext: A Beginner’s Guide

      Overview iVendNext helps businesses manage sales and inventory efficiently. This beginner’s guide covers the key steps to get started and make the most of the platform. 1. Introduction to iVendNext iVendNext is a comprehensive solution that ...
    • Understanding POS Commands in iVendNext: A Beginner’s Guide

      1. What is a Point of Sale (POS)? A Point of Sale (POS) system refers to the combination of hardware and software that facilitates retail transactions. In iVendNext, the POS is where: Sales are recorded Payments are processed Inventory is displayed ...
    • Tax and Accounting in iVendNext

      Overview This article will guide you through the key aspects of tax and accounting in iVendNext. 1. Understanding Tax Management in iVendNext 1.1 Tax Withholding Tax withholding is a mechanism where a portion of the payment to a supplier is deducted ...