Tally ERP 9 | Tally 9 | Tally 8.1 | Tally 7.2 | Tally 6.3 | Learn Tally TDL

Tuesday, August 14, 2007

Example 39: Accessing fields of Company Object

This post illustrates how to access fields (i.e. Internal methods) of "Company" object.

Download TDL39


;; PRODUCT: TDL39.TXT
;; PRODUCT-ID: de535cfa-1r7f-3h7a-31h3-a5r55a984e6e
;; AUTHOR: Shweta Computers

;;Objective:-
;;Accessing fields of Company Object
;;======================================================================

;;Add a new menu-item to the Gateway of Tally
[#Menu: Gateway of Tally]

;;The ACTION used here is DISPLAY
Item: Example 39: Display: My Report

[Report: My Report]
Form : My Form

[Form: My Form]
Part: My Part

[Part: My Part]
Line: My Line1,My Line2

;;Shows border
Common Border: Yes

[Line: My Line1]
Left Fields: Short Prompt,Myfld1
Local: Field: Short Prompt : Set as : "Company Number"

[Line: My Line2]
Left Fields: Short Prompt,Myfld2
Local: Field: Short Prompt : Set as : "Owner Name"

[Field: Myfld1]
Use : Short Name Field
Set as : $CompanyNumber:Company:##SVCurrentCompany

[Field: Myfld2]
Use : Short Name Field
Set as : $OwnerName:Company:##SVCurrentCompany

NOTES:

1) Accessing fields of Company Object
Syntax:-
: Company :

Example:-
$BooksFrom : Company : ##SVCurrentCompany

Explanation:
a) $BooksFrom is a field of Object Company. It is also called Internal Method
b) The 2nd parameter is the Company Object
c) The 3rd parameter is the Company Name (##SVCurrentCompany) whose field
value is to be retrieved.

2) Short Prompt is a pre-defined field. Herein, we are using LOCAL attribute
to modify the definition of the field Short Prompt which is effective only
in this Report.

Tally; Tally Developer and Tally Definition Language are trademarks or registered trademarks of "Tally Solutions FZ LLC", Bangalore.