Friday, September 22, 2017

TallyPrime TDL Tutorial: Learn Tally Definition Language and Basic Structure

TallyPrime TDL Tutorial: Learn Tally Definition Language and Basic Structure

Tally Definition Language (TDL) is the development language used to customize and extend TallyPrime. With TDL, developers can add menus, reports, fields, collections, validations, and workflow improvements for business requirements.

This updated tutorial explains the basic structure of a TDL program and gives a simple example that displays a custom report from the Gateway of Tally.

What is TDL?

TDL is used to define and customize the user interface and business functionality of TallyPrime. A TDL customization is built from definitions such as menus, reports, forms, parts, lines, and fields.

For official product information, refer to TallyPrime Developer documentation. TallyPrime Developer provides tools for writing, testing, debugging, and managing TDL projects.

Basic TDL structure

The following example adds an item to the Gateway of Tally and displays a simple report:

[#Menu: Gateway of Tally]
    Item: My First TDL Report : Display : My First TDL Report

[Report: My First TDL Report]
    Form: My First TDL Form

[Form: My First TDL Form]
    Part: My First TDL Part

[Part: My First TDL Part]
    Line: My First TDL Line

[Line: My First TDL Line]
    Field: My First TDL Field

[Field: My First TDL Field]
    Use: Name Field
    Set as: "My First TDL"

How the definitions are related

  • Menu: Provides an option that users can select.
  • Report: Defines the report opened by the menu item.
  • Form: Controls the layout of the report.
  • Part: Groups one or more lines.
  • Line: Arranges fields horizontally.
  • Field: Displays, accepts, or calculates information.

Testing a TDL customization

  1. Save the code as a .tdl or .txt file.
  2. Take a backup of the company data before testing.
  3. Load the file using TallyPrime's TDL configuration options or the appropriate developer workflow.
  4. Open the company and check whether the new menu item and report work as expected.
  5. Test the customization on the exact TallyPrime release used by the customer.

For developer tools such as field tooltips and developer mode, see our guide on starting Tally in Developer Mode. For loading local customizations, see how to attach a Tally customization. You can also explore our newer TallyPrime bank reconciliation guide.

Important compatibility note

TDL definitions and functions can vary between Tally.ERP 9 and TallyPrime releases. Always mention the product name, release number, dependencies, and whether the code was tested before sharing a customization publicly. Do not deploy untested code directly to a live company.

Conclusion

Understanding the relationship between menus, reports, forms, parts, lines, and fields is the foundation of TDL development. Start with a small report, test it on backup data, and then gradually add business logic and validations.

This article is for educational and customization guidance. Validate every TDL file in a test environment before using it in production.

No comments:

Post a Comment