Creating Custom Objects/Masters

Discussion in 'Requests' started by Sai Vineeth, Jun 27, 2021.

    
  1. Sai Vineeth

    Sai Vineeth Active Member


    I want to create a custom object city with name and alias fields
    I seen TDL developer reference but there only static object is shown

    But I also want user to give option to create/Alter and delete that custom object

    I tried below code but got Empty report

    I made this code based on ledger and Cost Category objects and reports

    Code:
    ;City Object
    [Object: ISPL_City]
        Use                : Cost Category
        CityName        : $$Name
        OnlyAlias        : $$Alias
    
    
       
    [Object: Obj CreateAlter ISPL_City]
        Use                    : Obj Accounting Masters Template
       
        Name                : @@locGroup
        PrmyVisbl            : Yes
        IsCreate            : Yes
        IsAlter                : Yes
        IsExpandable        : $$NumGroups > 0
       
        SortPos                : 5
       
        Action               : MasterAlter   : Set               : BaseOwnerName                     :  @@locGroup
        Action                : MasterAlter    : Change Table        : CreateAndBack Actions, CA Group : Yes : NOT $$IsActionObject
        Action                : MasterCreate    : Create Collection    : List of ExtractGroups
       
        Action                 : MasterAlter    : Ignore Field        : Yes
        Action                 : MasterCreate    : Ignore Field        : Yes
       
    ;; F10 Other Masters  Action
        Action               : MasterAlterPrimTable  : Set               : vF10BaseOwnerName          : @@locGroup
        Action                : MasterAlterPrimTable    : Change Table        : F10 Back Actions, CA Group : Yes : NOT $$IsActionObject
        Action                 : MasterAlterPrimTable    : Ignore Field        : Yes   
       
    [Report:ISPL_City]
        Use            : Master Report
        Object        : ISPL_City                    : ##SISPL_City
        Option        : ISPL_CityObjInCreate        : $$InCreateMode
        Title       : $$LocaleString:"City" + @@ModeName + @@SubModeName
       
        [!Report: ISPL_CityObjInCreate]
            Object    : ISPL_City
    
    [Form: ISPL_City]
        Use            : Master Form Template
        Top Parts   : MST Basic
        Set         : Master Type   : "ISPL_City" 
        Local: Button  : Master Configure    : Delete    : Action
        Local: Button  : Master Configure   : Add       : Action      : Configuration
        Width:100
        Set:    Mode: $$InCreateMode
        Local Formula            : CreateMaster    : NOT ##IsInAlterMode
    
    [Field: SISPL_City]
    
        Use         : Name Field
        Use            : Create ISPL_City
        Table       : Create Master
        Show Table  : Always
        Key         : Create ISPL_City
        Modifies    : SISPL_City
    
    [Field: Create ISPL_City]
        Trigger                : ISPL_City, Yes            : $$IsSysNameEqual:CreateNew:$$EditData
        Skip SysNames        : Yes
        Default Table Item    : $$IsSysNameEqual:AllItems:$Name OR $$IsSysNameEqual:EndofList:$Name OR $$IsSysNameEqual:Primary:$Name
       
    
    [Key:  Create ISPL_City]
    
        Key     : Alt+C
        Action  : Create : ISPL_City
       
       
    [#Menu: Gateway Of Tally]
        Key Item    : CreateCity        : E : Display                : ISPL_City
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    You have just copy/pasted a Group creation code to make a City. This will not work.

    Also, at present it is not possible to make a custom OBJECT through TDL.......

    For cities you can make a new Report to input names and make a aggregate of that i.e. collection of Cities and use this table in your various reports.
     


  3. Sai Vineeth

    Sai Vineeth Active Member


    Not only group I bought copied code from ledger and cost category objects and reports also

    I seen that default objects like ledger, State and group and other masters are created in TDL so I thought we can create new objects also

    This field is to be added in ledger
    I created following collection

    Code:
    [Collection:CITYNAMECOLL]
    Type    : ISPL_Asoils_Led_City : Ledger
    Format  : $ISPL_Asoils_Led_City, 40
    Title   : "Cities"
    
    [Line: ISPL_Asoils_Led_City]
            Fields      : Medium Prompt, Led_City_Field
           
            Local       : Field : Medium Prompt : Set as    : $$LocaleString:"City"
            Local       : Field : Name Field    : Storage    : ISPL_Asoils_Led_City
            Local       : Field : Name Field    : Set Always: Yes
     
    [Field:Led_City_Field]
        Use:Name Field
        Table:CITYNAMECOLL,Not Applicable
        Show Table:Always
    
    [System        : UDF]
    ISPL_Asoils_Led_City                        :    String            : 42046


    Using above method I can set city in ledger but cities list is confined only to that ledger
    For ex: x ledger I added Bangalore city while creating Y ledger I am unable to see Bangalore City in cities list
    but when I checked cities list in x ledger cities table/list is showing bangalore
     
    Last edited: Jun 28, 2021


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    obviously....the way your Collection is structured, it will be as you said it happens........

    [Collection:CITYNAMECOLL]
    Type : Cityaggr
    Child Of : ##SVCurrentCompany
    Format : $ISPL_Asoils_Led_City, 40
    Title : "Cities"

    [System : UDF]
    CityAggr : aggregate :42045
    ISPL_Asoils_Led_City : String : 42046
     


  5. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    You say "default objects" and then say "created in TDL" --- as per TALLY....creation of OBJECTS through TDL is not possible nor supported. You can contact Tally solutions for further details or clarifications in this matter.
     


  6. Sai Vineeth

    Sai Vineeth Active Member


    I am very much "new to TDL" I seen Object code for Masters in Developer application and thought that they are made in TDL
     


  7. Sai Vineeth

    Sai Vineeth Active Member


    I tried This Coode but got Incorrect Object Type so I changed little bit

    Code:
    [Collection:CITYNAMECOLL]
    Type : Cityaggr:Company
    Format : $ISPL_Asoils_Led_City, 40
    Title : "Cities"
    
    [System : UDF]
    CityAggr  : aggregate :42045
    ISPL_Asoils_Led_City : String : 42046
    Error Gone But Table is Empty and I cannot create new value also
     


  8. NIRMALGHORAWATIN

    NIRMALGHORAWATIN New Member


    Try

    Code:
    [Collection:CITYNAMECOLL]
    Type : Cityaggr:Company
    Child Of : ##SVCurrentCompany
    Sort: @@Default:$ISPL_Asoils_Led_City
    Format : $ISPL_Asoils_Led_City, 40
    Title : "City List"
    
    
     


  9. Sai Vineeth

    Sai Vineeth Active Member


    I know this,
    This is UDF and stored in company's object.
    I want to create separate objects. (which is not possible as of now)
     


Share This Page