The guide shall aid you to locate specific code in DefaultTDL. We can quickly locate a field; using the ‘DevMode’ command line parameter with the application, thus making it easy to locate fields. When the Tally application is in DeveloperMode, we can hover the mouse pointer over the report or the field. The name of the report or the field shall appear as a tooltip on the screen.
However, the same field could have been used multiple times in different definitions. Hence even after locating the field, we need to ensure we are at the correct definition.
To learn to locate a code, let us take an example of Sales Invoice, wherein we need to add a field.
Adding field after EI Consignee Field in Sales Invoice
- Open TallyPrimeDeveloper. Press Ctrl + J to open the Jump To window.
- In the Definition Type, select ‘Field’, and in Definition Name, select ‘EI Consignee.’
- This search hyperlinks to the field where it is defined or modified. We need to navigate to definitions where the field is referred. Press Ctrl + A + D to open the ‘Definition Reference’ window. In the Definition Type, select ‘Field’, Definition Name, select ‘EI Consignee’, Search In, select ‘Default TDL Project’ and in the Type, select ‘References.’ Click on the Find button.
- All the searches would be listed, and details would be provided of all the definitions wherever the Field Definition EI Consignee is referred.
- The file names are quite suggestive that would indicate where the definition is referred to. Let us take an example of the first three searches that we have on the list.
- The search bar provides details as “<project name>:<filepath\filename>” (line number):Definition type – definition name. Hence when you read the search list, we would read the same as
- DEFTDL means Default TDL
- src means source
- Each folder and file name shall suggest where the definition has been used.
- Taking an example of the 2nd search in the list
“DEFTDL:src\voucher\vchreport\vchbasicsubforms\vchbasicsubformreport.tdl”(1267):Line – EI Consignee
This search indicates in Default TDL for the screen in voucher or voucher report. There are basic subforms in the file at line EI consignee the field definition is used. As we are looking to add a field after ‘EI consignee’ field, this line may be appropriate. Double click on the search item. It shall take you to the designated definition.
- To ensure we are at the correct line definition, modify the definition with a UI attribute that could quickly point out the interface change. Hence we shall modify the Line: EI Consignee and provide a border to the line or change the background colour of the fields at the line.
- To execute TallyPrime from this snippet of code, Press Ctrl + F5 from TallyPrime Developer. Open Company > Press enter on Vouchers and Press F8 for sales voucher. If the change is done, then we are at the correct definition. As in the screenshot below, we can see, the border is visible.
- Now to this Line, we shall add more fields as required and execute TallyPrime.
Assurance should be done by making a minor change to the definition whenever customisations are to be done.