How to Create a User Defined Field (UDF) / Customized Field in Tally Software?

Tally Developer

In this post, we will learn about how to create a user-defined field (UDF) / customized field in Tally software on any screen using Tally Developer software.

So before we start you will need to install Tally.ERP9 software and Tally Developer software and configure it. To know how to do that click here.

Let’s Learn how to create a User Defined Field (UDF)/ Customized Field in Tally Software

After Installing Tally Developer software open it by double-clicking the icon on your desktop.

  1. Go to Files option in the top menu and click on New Project option. And it should open below the screen for you.
    Tally Developer

    Tally Developer new project creation screen.

     

  2.  Give any name to your project. In my case, I will be giving name My First TDL.
  3.  After Providing name click on the 3 dots in location line and give the path where you want to save this project. And your project is ready for adding files to it.
  4. Now click on Add New Files option and provide a path and give the name to your file. In my case in am giving file name a My First TDL.
  5.  You can also add existing files if you already have it by clicking Add Existing files option.
  6. Or if you want to remove any files from the project you can just select the file and click on Remove Selected.
  7. So now as you have created the project and also its file just click on save. And your Tally Developer screen should look like below.
    Tally Developer Main Screen

    Tally Developer Main Screen

     

  8. Now Select the File and Lets Start Writing the code

Free Tally Learning code for how to create UDF / Customized Field in Tally.

Before we Start we need to know how Tally data structure is? In Tally each and every screen starts with Menu-> Report->Form->Part->Line->Field

Tally Menu:—- A Menu is a place in which we have the option or we can say place through which we can navigate in our software. The menu can have sub menus

Tally Report:— Each and every screen in Tally is known as Report. And It contains the form.

Tally Form:-  A form is the each which we can see on our screen.

Tally Part:— A Part is a place in the form. Example Left Part, Right Part, Top Part, Bottom Part or Part.

Tally Line:— Line is the place where we can place our fields and it is located in Part.

Tally Field:— A Field is were we show or enter our Data.

So to Create a UDF / Customized Field first you need to know where you want your field to be located. In our case, we will just take an example of Adding field on our Sales screen right after Ledger Selection field.

Let’s Start

Step 1

So as we need to place our field just after Ledger Selection Field. We first need to know the Report Name, Form name, Which Part the Ledger Selection field is and what is the name of the Ledger Selection Field. To Find out please follow the below steps.

As we have already configured our Tally Developer Software and Tally.ERP 9 Software we can right-click on our project and click on Execute Tally.

Execute Tally from Tally Developer

Execute Tally from Tally Developer

by Clicking on it your Tally Should start in a Developer mode. Select the company and go to Sales Voucher.

Sales Voucher in Developer Mode

Sales Voucher in Developer Mode

Take your mouse over ledger selection field it should show you the Field name which Tally uses for development purpose.

Sales Voucher in Developer Mode

Sales Voucher in Developer Mode

So now we know the field name after which we want our field. Go back to Tally Developer and click in Navigate in Menu Bar.

Tally Developer Navigate Menu

Tally Developer Navigate Menu

Select Jump to Definition and it should open below Screen.

Jump to Screen

Jump to Screen

At Jump to Screen Select Form at First option And Select EIDefaultBill from the list so that Default voucher screen code gets open. We have Select this because Tally uses this a Base code for every voucher. Now Scroll down and find the line which contains the name of the Ledger Selection Field.

Tally Default Voucher Code

Tally Default Voucher Code

 

Steps 2

Now Copy the name of the Line were you found the field name. and past it into our file.

Giving Call to Default Code

Giving Call to Default Code

Add # before the word line ( # is used to call the Tally Default Field, Line, Part, Form, Report, Menu).

Then Add the below Code after it. In the second Line.

Tally Developer

Tally Developer

Add: Field: After:Name field: CustomerNamePrompt   ;;;;;;; This will add one new field at the last of that line with its name as CustomerNamePrompt. You can give it anything you want. But remember it should not be available in Tally

Now as we have added a field. Now we need to Define the field in Tally for you will need to Write the Below code.

Tally Developer

Tally Developer

[Field:CustomerNamePrompt]
Use: Name Field
Storage:CustomerNamePrompt

Here we are defining the field and informing Tally that this is just a Normal Name Field which we contain any text. You can have other different field types too like Simple Field, Simple Prompt, Medium Prompt, Logical Field Etc……

Now that we have, Define the field we need to create storage for that field so that data which is entered in that field gets saved in a tally.  For that, you need to write below code.

Tally Developer

Tally Developer

[System: UDF]
CustomerNamePrompt:String:1001

Now our code is complete and to check whether it is correct or not Execute Tally from Tally Developer as said earlier. And go to Sales voucher and check. It should look like below.

Customized Field Added

UDF Added

Now you can use this field for Entering Data.

About tallytips

He is the founder of One Touch Solution ,and is the main content writer of this blog and a passionate techie. He is a Bcom Graduate and a Tally Customization Developer. With Tally Implementation experience of more the 9 years.

Leave a Reply