Getting Started with TDL in Tally Prime
Anil Kumar Sanyal
GST Expert & Founder
Tally Prime is a powerful accounting software, but did you know you can extend its capabilities? TDL (Tally Definition Language) is the proprietary language used to customize Tally. Whether you want to add a field to an invoice, create a custom report, or change the logic of entries, TDL is the key.
What is TDL?
TDL is a high-level, event-driven programming language. Unlike C++ or Java, it is specifically designed for data management and display within the Tally environment. Its syntax is based on "Definitions" – nearly everything in Tally (Menus, Reports, Forms, Lines, Fields) is a definition.
Basic Structure of TDL
The hierarchy of TDL components is as follows:
- Report: The final output (like a Balance Sheet).
- Form: The container for the content (like the page layout).
- Part: Sections of the form (Header, Body, Footer).
- Line: Rows within a part.
- Field: The actual data element (Text, number, date).
Writing Your First TDL Code
Let's write a simple "Hello World" program that adds a new menu item to the Gateway of Tally.
How to Load TDL in Tally Prime?
- Save the code above in a text file with extension
.txtor.tdl(e.g.,hello.tdl). - Open Tally Prime.
- Press F1 (Help) > TDLs & Add-ons.
- Press F4 (Manage Local TDLs).
- Set "Load selected TDL files on startup" to Yes.
- Browse and select your
hello.tdlfile. - Press Enter to save. The TDL will load, and you should see your new menu item!
Why Learn TDL?
Learning TDL opens up immense possibilities. You can build vertical solutions for specific industries (like School management, Hospital billing) right inside Tally. It enhances your value as an accountant or developer.
Download Ready-made TDLs
Not ready to code yet? No problem. Visit our TDL Library to download useful, ready-to-use TDL files for free.
Explore our TDL Collection
Go to TDL Library
