Free code update any udf value from day book

Discussion in 'Free Source Codes' started by ANURAG954245, Mar 3, 2023.

    
  1. ANURAG954245

    ANURAG954245 Member


    with the help from forum heres the code
    Code:
    
    [#Form    : DayBook]
        Add    : Button    : Modify Parent
    [#Report    : DayBook]
        Variable: SV Parent Name
    [Button    : Modify Parent]
        Key         : Alt+F4
        Title       : $$LocaleString:"CHANGE LR NO"
        Action List : Accept Parent Name,Save Parent
        Mode        : Display
        Scope       : Selected
        [Button    : Accept Parent Name]
            Key    : Alt+F4
            Action : Alter        : Accept Parent Name
            Mode   : Display
        [Key    :  Save Parent]
            Key    : Alt+F4
            Action    : Modify Object    : LRNODATA[1].LRNODATA:  ##SVParentName
            Mode    : Display
            Scope    : Current
    [Report    : Accept Parent Name]    ;;Auto Report
        Auto        : Yes
        Title        : $$LocaleString:"ENTER LR NO"
        Form        : Accept Parent Name
    [Form    : Accept Parent Name]
        Parts          : Accept Parent Name
        Space Bottom    : 1
        Full Width      : No
        Full Height    : No
        Horizontal Align: Centre
        Vertical Align  : Centre
        Option            : Small Size Form
        Space Top        : 1
        [Part    : Accept Parent Name]
            Line            : Accept Parent Name
            [Line    : Accept Parent Name]
                Field        : Simple Prompt
                Right Field    : Name Field
                Local        : Field : Simple Prompt        : Set as    : "ENTER LR NO:"
                Local        : Field : Name Field        : Lines        : 2
                Local        : Field : Name Field        : Max        : 600
                Local        : Field : Name Field        : SetAs        : $VoucherNumber
                Local        : Field : Name Field        : Variable    : SVParentName
                Local        : Field : Name Field        : Modifies    : SVParentName
                Local        : Field : Name Field        : Show Table: Always
                Space Top    : 1
    [Variable    : SV Parent Name]
        Type    : String
       
    
    
    
    
    [#Part: VCHTitle2Left]
           Lines       : VCH Ref1
          
    [Line:VCHREF1]
        LEFT Field:LRNOTITLE
        LEFT Field:LRNODATA
        Space Top:0.5
       
    [Field:LRNOTITLE]
        Use:NAME FIELD
        Set as:'LR NO :'
        Color:BLUE
        Skip:YES
        Width:10
       
    [Field:LRNODATA]
        Use:NAME FIELD
        Storage:LRNODATA
        Align:Left
        Color:RED
    
    [#Line: DBTitle1]
    
    Add : Field : After : DSP VchAcctTitle : LRNOT
    
    
    [Field:LRNOT]
    Set as :'LR NO'
    Width:15
    Align : center
    border : thin right left
    Border : Thin bottom
    Space Right:5
    Color:blue
    
    
    [#Line: DSP VchDyBkDetail]
    Add : Field : After : DSP VchAccount : LRNOD
    
    [Field:LRNOD]
    Use : Name Field
    Set As : $LRNODATA
    Width : 8
    Align : Center
    Space Right:1
    Width:15
    Color:blue
    
    [System:UDF]
        LRNODATA:String:10055
       
    
    
    [#Collection: Daybook Vouchers of Company]
    
    Fetch:LRNODATA
     
    Rohit Khedar likes this.


  2. Bipin Damania

    Bipin Damania Active Member


    Thanks for sharing

    Better if you share Screenshot for understanding...
     



  3. Hello Members. The above code modifies only the first of selected vouchers. How to write a function to input the same value for this udf for selected Vouchers. Pl suggest. Thanks
     


  4. tally.manish

    tally.manish Member


    Dear Muraleedharan

    Use this Code

    [#Form : DayBook]
    Add : Button : Modify Parent
    [#Report : DayBook]
    Variable: SV Parent Name
    [Button : Modify Parent]
    Key : Alt+F4
    Title : $$LocaleString:"CHANGE LR NO"
    Action List : Accept Parent Name,Save Parent
    Mode : Display
    Scope : Selected

    [Button : Accept Parent Name]
    Key : Alt+F4
    Action : Alter : Accept Parent Name
    Mode : Display

    [Key : Save Parent]
    Key : Alt+F4
    Action : Modify Object : LRNODATA[1].LRNODATA: ##SVParentName
    Mode : Display
    Scope : Selected

    [Report : Accept Parent Name] ;;Auto Report
    Auto : Yes
    Title : $$LocaleString:"ENTER LR NO"
    Form : Accept Parent Name

    [Form : Accept Parent Name]
    Parts : Accept Parent Name
    Space Bottom : 1
    Full Width : No
    Full Height : No
    Horizontal Align: Centre
    Vertical Align : Centre
    Option : Small Size Form
    Space Top : 1
    [Part : Accept Parent Name]
    Line : Accept Parent Name
    [Line : Accept Parent Name]
    Field : Simple Prompt
    Right Field : Name Field
    Local : Field : Simple Prompt : Set as : "ENTER LR NO:"
    Local : Field : Name Field : Lines : 2
    Local : Field : Name Field : Max : 600
    Local : Field : Name Field : SetAs : $VoucherNumber
    Local : Field : Name Field : Variable : SVParentName
    Local : Field : Name Field : Modifies : SVParentName
    Local : Field : Name Field : Show Table: Always
    Space Top : 1
    [Variable : SV Parent Name]
    Type : String





    [#Part: VCHTitle2Left]
    Lines : VCH Ref1

    [Line:VCHREF1]
    LEFT Field:LRNOTITLE
    LEFT Field:LRNODATA
    Space Top:0.5

    [Field:LRNOTITLE]
    Use:NAME FIELD
    Set as:'LR NO :'
    Color:BLUE
    Skip:YES
    Width:10

    [Field:LRNODATA]
    Use:NAME FIELD
    Storage:LRNODATA
    Align:Left
    Color:RED

    [#Line: DBTitle1]

    Add : Field : After : DSP VchAcctTitle : LRNOT


    [Field:LRNOT]
    Set as :'LR NO'
    Width:15
    Align : center
    border : thin right left
    Border : Thin bottom
    Space Right:5
    Color:blue


    [#Line: DSP VchDyBkDetail]
    Add : Field : After : DSP VchAccount : LRNOD

    [Field:LRNOD]
    Use : Name Field
    Set As : $LRNODATA
    Width : 8
    Align : Center
    Space Right:1
    Width:15
    Color:blue

    [System:UDF]
    LRNODATA:String:10055



    [#Collection: Daybook Vouchers of Company]

    Fetch:LRNODATA
     


  5. tally.manish

    tally.manish Member


    Dear Experts

    Only One change is

    Old Code
    [Key : Save Parent]
    Key : Alt+F4
    Action : Modify Object : LRNODATA[1].LRNODATA: ##SVParentName
    Mode : Display
    Scope : Current

    New Code

    [Key : Save Parent]
    Key : Alt+F4
    Action : Modify Object : LRNODATA[1].LRNODATA: ##SVParentName
    Mode : Display
    Scope : Selected

    for all Selected Lines
     


Share This Page