HELP NEEDED - HOW TO ADD / USE CITY UDF IN DESTINATION FIELD IN DESPATCH DETAIL'S

Discussion in 'Free Source Codes' started by tejeet, Mar 19, 2020.

    
  1. tejeet

    tejeet Member


    Code:
    [System : UDF]
    udfLedCity : String : 20001 ;; Ledger City
    
    ; City Master
    
    [#Menu : Accounts Info.]
    Add : Key Item : After : @@locLedgers : "City" : Y : Menu : VIT City Menu
    
    [Menu : VIT City Menu]
    Title : $$LocaleString:"City Master"
    Indent : "Single City"
    Item : BLANK
    Key Item : @@locCreate : C : Create Collection : List of ExtractCostCategories : @Allowed AND $$Allow:Create:AccountsMasters
    Key Item : @@locDisplay : D : Display Collection : List of ExtractCostCategories : @Allowed AND $$NumCostCategories > 0 AND $$Allow:Display:AccountsMasters
    Key Item : @@locAlter : A : Alter Collection : List of ExtractCostCategories : @Allowed AND $$NumCostCategories > 0 AND $$Allow:Alter:AccountsMasters
    Item : BLANK
    ;Indent : "Multiple City"
    ;Item : BLANK
    ;Key Item : @@locCreate : R : Create : Multi Cost Category : @Allowed AND $$Allow:Create:AccountsMasters
    ;Key Item : @@locDisplay : I : Display Collection : Multi Cost Category : @Allowed AND $$NumCostCategories > 0 AND $$Allow:Display:AccountsMasters
    ;Key Item : @@locAlter : T : Alter Collection : Multi Cost Category : @Allowed AND $$NumCostCategories > 0 AND $$Allow:Alter:AccountsMasters
    ;Item : BLANK
    Key Item : @@locQuit : Q
    Allowed : $$IsAccountingOn:$$CurrentSimpleCompany
    
    [#Collection : List of ExtractCostCategories]
    Title : $$LocaleString:"List of Cities"
    Filter : NoPrimary
    
    [#Collection : Cost Category]
    Title : $$LocaleString:"List of Cities"
    Filter : NoPrimary
    
    [System : Formula]
    NoPrimary : $Name <> $$PrimaryCostCategory
    
    [#Report : SCostCategory]
    Title : $$LocaleString:"Select City"
    Local : Field: MV Title : Info : $$LocaleString:"Name of City"
    
    [System : Formula]
    MultCostCatCreateModeFormat : $$LocaleString:"Multi City %s %s"
    
    [#Report : Cost Category]
    Title : $$LocaleString:"City" + @@ModeName + @@SubModeName
    
    [#Form : Cost Category]
    Delete : Top Parts : CSTCAT Behaviour
    
    [#Form : Multi Cost Category]
    Width : 100% Screen
    
    [#Part : MCSTCAT Body]
    Delete : Lines : MCSTCAT Secondary Titles
    
    [#Line : MCSTCAT Main Titles]
    Delete : Right Fields : MCSTCAT Allocation Title
    
    [#Field : MCSTCAT Name Title]
    Info : $$LocaleString:"Name of City"
    
    [#Line : MCSTCAT Body]
    Delete : Right Fields : CSTCAT ForRevenue, CSTCAT ForNonRevenue
    
    [Collection : MyCity]
    Type : Cost Category
    Fetch : *
    IsOdbcTable : Yes
    
    ; Ledger
    
    [#Part : LED Mailing Address]
    Add : Bottom Line : Before : LEDState : lnCityUDF
    
    [#Field : LED Mailing Address]
    Set Always : Yes
    
    [Line : lnCityUDF]
    Field : Medium Prompt,fldCityUDF
    Local : Field : Medium Prompt : Set as : "City"
    Local : Field : Medium Prompt : Inactive : NOT @@IsDebtorCreditor
    
    [Field : fldCityUDF]
    Use : Name Field
    Storage : udfLedCity
    Max : 40
    Table : Cost Category,Not Applicable
    Show Table : Always
    Key : Create Cost Category
    Style : Small Bold
    Inactive : NOT @@IsDebtorCreditor
    Help needed - how to add or use city udf in destination field in despatch details part in sales invoice entry , I have city udf - udfLedCity in ledger creation , i want to use this city udf for destination field, so please provide me codes , so that when i come to destination field in sales invoice list of city table should pop up & i have select city from the table available.

    please provide / develop code for destination field, i am attaching my city udf code for your reference for developing above code for me.
     


  2. Sanjeev S

    Sanjeev S Active Member


    I hope this will provide you desired result....

    Code:
    [#Field    :    EI PORT Destination]
        Set as    :    $UDFLedCity:Ledger:#EIConsignee
        Set Always    :    Yes
       
    [System    :    UDF]
        UDFLedCity        :    String        :    21101
     


  3. tejeet

    tejeet Member


    dear sir,
    your suggested code is not working , still in destination field is not showing city list , we have to input the destination name.
     


  4. Sanjeev S

    Sanjeev S Active Member


    It has to work.

    Defined UDF or Not?
     


  5. tejeet

    tejeet Member


    dear sir,

    i have added your code to my existing city codes as given above, but no result, i am not coder , so what i have - "Defined UDF or Not?" or just help me & guide me where we have write your codes , i even tried as new tdl still not working
     


  6. tejeet

    tejeet Member


    i have already 50 names if my city udf
     


  7. Sanjeev S

    Sanjeev S Active Member


    Code:
    [System : UDF]
    udfLedCity : String : 20001 ;; Ledger City
    
    ; City Master
    
    [#Menu : Accounts Info.]
    Add : Key Item : After : @@locLedgers : "City" : Y : Menu : VIT City Menu
    
    [Menu : VIT City Menu]
    Title : $$LocaleString:"City Master"
    Indent : "Single City"
    Item : BLANK
    Key Item : @@locCreate : C : Create Collection : List of ExtractCostCategories : @Allowed AND $$Allow:Create:AccountsMasters
    Key Item : @@locDisplay : D : Display Collection : List of ExtractCostCategories : @Allowed AND $$NumCostCategories > 0 AND $$Allow:Display:AccountsMasters
    Key Item : @@locAlter : A : Alter Collection : List of ExtractCostCategories : @Allowed AND $$NumCostCategories > 0 AND $$Allow:Alter:AccountsMasters
    Item : BLANK
    Key Item : @@locQuit : Q
    Allowed : $$IsAccountingOn:$$CurrentSimpleCompany
    
    [#Collection : List of ExtractCostCategories]
    Title : $$LocaleString:"List of Cities"
    Filter : NoPrimary
    
    [#Collection : Cost Category]
    Title : $$LocaleString:"List of Cities"
    Filter : NoPrimary
    
    [System : Formula]
    NoPrimary : $Name <> $$PrimaryCostCategory
    
    [#Report : SCostCategory]
    Title : $$LocaleString:"Select City"
    Local : Field: MV Title : Info : $$LocaleString:"Name of City"
    
    [System : Formula]
    MultCostCatCreateModeFormat : $$LocaleString:"Multi City %s %s"
    
    [#Report : Cost Category]
    Title : $$LocaleString:"City" + @@ModeName + @@SubModeName
    
    [#Form : Cost Category]
    Delete : Top Parts : CSTCAT Behaviour
    
    [#Form : Multi Cost Category]
    Width : 100% Screen
    
    [#Part : MCSTCAT Body]
    Delete : Lines : MCSTCAT Secondary Titles
    
    [#Line : MCSTCAT Main Titles]
    Delete : Right Fields : MCSTCAT Allocation Title
    
    [#Field : MCSTCAT Name Title]
    Info : $$LocaleString:"Name of City"
    
    [#Line : MCSTCAT Body]
    Delete : Right Fields : CSTCAT ForRevenue, CSTCAT ForNonRevenue
    
    [Collection : MyCity]
    Type : Cost Category
    Fetch : *
    IsOdbcTable : Yes
    
    ; Ledger
    
    [#Part : LED Mailing Address]
    Add : Bottom Line : Before : LEDState : lnCityUDF
    
    [#Field : LED Mailing Address]
    Set Always : Yes
    
    [Line : lnCityUDF]
    Field : Medium Prompt,fldCityUDF
    Local : Field : Medium Prompt : Set as : "City"
    Local : Field : Medium Prompt : Inactive : NOT @@IsDebtorCreditor
    
    [Field : fldCityUDF]
    Use : Name Field
    Storage : udfLedCity
    Max : 40
    Table : Cost Category,Not Applicable
    Show Table : Always
    Key : Create Cost Category
    Style : Small Bold
    Inactive : NOT @@IsDebtorCreditor
    
    ;;;;-------------Addition Code
    [#Field    :    EI PORT Destination]
        Set as    :    $UDFLedCity:Ledger:#EIConsignee
        Set Always    :    Yes
    ;;;;----------------End of Additional code    
    
    
     


  8. tejeet

    tejeet Member


    dear sir,
    still not working , please check the codes , 1 am attaching screen shot for your reference , you can check when we come to despatch through - list of despatch through pop up & we have to select from pop up list
    similar codes we require for destination - presently we have to make manual entry, but i need codes as per above despatch to, so when we come to destination - list of city should pop up & we have to select from pop up list of city, i have already 50 names in list of city ( codes for list of city is already attached in my previous emails
    upload_2020-3-22_10-39-41.png

    upload_2020-3-22_10-40-22.png
     


  9. tejeet

    tejeet Member


    dear sir,

    i have modify your above codes with your guidance & it is now working perfectly it now show list of city in destination field & we can select city from pop up list.

    ;;;;-------------Addition Code
    [#Field : EI PORT Destination]
    Use : Name Field
    Storage : udfLedCity
    Width: 30
    Table : Cost Category,End of List
    Show Table : Always
    Key : Create Cost Category
    Style : Small Bold
    Set Always : Yes
    ;;;;----------------End of Additional code
     


  10. tejeet

    tejeet Member


    dear sir,

    can you develop code for me for mode / terms of payment in order details in invoice , just like above city tdl, when we come to field of mode / terms of payment - table of terms of payment should pop up & we have select any one from the pop up table collection , just like above city tdl , we should able to add / display / alter table contain eg table of collection should have following 1) strictly 100% advance 2) strictly within 30 days etc
     


  11. Sanjeev S

    Sanjeev S Active Member


    Dear Tejeet,

    How many threads you are opening?

    Please ask question once.
     


Share This Page