How to Add Table (Line Items) in a Custom Module in Vtiger 7 Open Source

Introduction

If you are working with Vtiger 7 Open Source, sooner or later you’ll face this requirement:

“I need a table (line items) inside my custom module, similar to Products or Services.”

This guide explains the correct and scalable ways to add table-style data inside a custom module — without breaking upgrades or performance.

Why Vtiger Custom Modules Don’t Have Tables by Default

In Vtiger Open Source:

  • Only Inventory modules (Quotes, Sales Orders, Invoices) support native line items
  • Normal custom modules are single-record based
  • Adding a table requires designing a one-to-many structure

Trying to force a table directly into a module usually causes:

  • Upgrade issues
  • Data inconsistency
  • UI bugs

That’s why Vtiger recommends structured approaches.

Recommended Approach: Use a Related (Child) Module (Best Practice)

This is the most stable and upgrade-safe method.

Concept
  • Parent module → main record
  • Child module → table rows (multiple records)
  • Relationship → One-to-Many

This behaves exactly like a table.

Example Use Cases
  • Expense module → Expense Items
  • Installation module → Installed Components
  • Project module → Project Tasks
  • Asset module → Asset History

 

Step-by-Step: Create Table Using Related Module

Step 1: Create the Parent Custom Module

Create your main module using Module Manager or Module Builder.

Example:

  • Module name: Installations

Create another module that will act as table rows.

Example:

  • Module name: Installation Items

  • Fields:

    • Item Name (Text)

    • Quantity (Number)

    • Description (Text Area)

Each record = one row in the table.

Step 2: Create the Child Module (Table Rows)

Create another module that will act as table rows.

Example:

  • Module name: Installation Items
  • Fields:
    • Item Name (Text)
    • Quantity (Number)
    • Description (Text Area)

Each record = one row in the table.

Step 3: Create One-to-Many Relationship

Go to:

Settings → Module Management → Module Manager → Layouts & Fields → Related Lists

  • Parent Module: Installations
  • Related Module: Installation Items
  • Relation Type: One to Many

This automatically:

  • Displays child records in a table
  • Adds Add/Edit/Delete actions

Step 4: Display as a Table (UI Optimization)

To make it look like a proper table:

  • Enable List View columns
  • Reorder fields logically
  • Disable unnecessary fields

Result: Clean table-style layout inside Detail View.

Alternative Approach: Custom Table + UI Customization

This method should be used only in rare cases.

When It Makes Sense
  • Fixed number of rows

  • Read‑only data

  • Data generated externally

  • Reporting‑only modules

Why It’s Risky
  • Requires overriding Vtiger templates

  • Breaks easily during upgrades

  • No native permissions or audit tracking

  • Higher maintenance cost

Technical Overview (Advanced Users Only)

This approach involves:

  • Creating a custom DB table

  • Linking it via record ID

  • Overriding:

    • DetailView.tpl

    • EditView.tpl

  • Writing custom save logic

Use this only when related modules are not feasible.

Need This Implemented in Your Vtiger CRM?

At Joobilant, we specialize in:

If you need this implemented properly — without breaking your CRM — we can help.

👉 Contact us for Vtiger Open Source custom development.

Final Thoughts

If you want a table inside a custom module in Vtiger 7 Open Source, the related module approach is the right solution.

It’s scalable, clean, searchable, and future-proof — exactly what Vtiger expects.

 

This guide is based on real-world Vtiger Open Source implementations and best practices.

Recommended Plugin

Vtiger Module builder + Relationship builder

Create custom modules, fields, and relationships in Vtiger without writing complex code. Ideal for building parent–child modules used for table-style data.

Table of Contents

Explore More Vtiger CRM Guides!

Facing Challenges in Vtiger CRM ?

Fix problems and enhance your CRM with the right extensions.

Shopping Cart
Scroll to Top

Lets talk about your Vtiger Needs!

Let's have a chat

We respect your privacy — your details will only be used to respond to your inquiry.

Get in Touch with Our CRM Experts!

Let's have a chat

Lets talk about your Vtiger Needs!

Let's have a chat