modify udf Date field in voucher

Discussion in 'Requests' started by sattam, Sep 8, 2016.

         
Loading...
  1. sattam

    sattam Member


    I have Udf date field in all voucher.Now I have to Modify that date field with new date.that new date is 5 days after voucher date.
    example voucher date 01-04-2016 and new udf date field would be 06-04-2016

    Pls help me with approprite code.
     



  2. sattam

    sattam Member


    Pls anybody can help me?
     



  3. sattam

    sattam Member


    is it possible any one help me
     



  4. D Lokesh

    D Lokesh Member


    Dear Sir

    Try This

    MODIFY OBJECT : (Voucher, ##VoucherID).UDFName[1].UDFNAME : ##YourValue
     



  5. sattam

    sattam Member


    dear lokesh,
    I had Tried This.But I couldnot Understand What is the formula that udf date field changed to 5 days after voucher date.
     



  6. D Lokesh

    D Lokesh Member


    Set : VariableName : $Date + 5

    Then just allocate that variable name in modify object sir
     



  7. sattam

    sattam Member


    Here is my code sir.Now I wish to alter CrDtTm2 Udf by voucher date +5 days. pls help me sir.


    [Button : UDFAlterButton1]

    Key : F8
    Title : "Update Voucher"
    Action : Call : Voucher Update
    ;Inactive : Not ($$IsOwner or $$InCreateMode)
    Mode : Display
    Scope : Selected

    [Collection : MyVoucherCol]

    Type : Voucher

    ;;[Collection:myseletedvch]
    ;;Data Source : Day Book : selected

    [Function: Voucher Update]

    Variable: vch :String

    99 : Walk Collection : MyVoucherCol;;myseletedvch
    100 : set : vch : ""
    100a : Set:vch:"ID:"+$$String:$MasterID

    101a : Modify Object : (Voucher, ##vch).CrDtTm1[1].CrDtTm1 :" Sattam Chakraborty "
    101b : Modify Object : (Voucher, ##vch).CrDtTm2[1].CrDtTm2 :$VoucherDate
    ;101c : Modify Object : (Voucher, ##vch).CrDtTm3[1].CrDtTm3 :" 13:10 "

    106 : End Walk
    107 : Msg Box : "Status" : "Voucher Update Sucessfully Completed............"
     



  8. Bidyut Banerjee

    Bidyut Banerjee New Member



    Dear Sattam Sir,

    The code is correct for change the date.

    Problem is its not fetch the value of "$VoucherDate"
     



  9. Bidyut Banerjee

    Bidyut Banerjee New Member





    Dear Sattam Sir,

    Please find bellow correct code.


    [Button : UDFAlterButton1]

    Key : F8
    Title : "Update Voucher"
    Action : Call : Voucher Update
    ;Inactive : Not ($$IsOwner or $$InCreateMode)
    Mode : Display
    Scope : Selected

    [Collection : MyVoucherCol]

    Type : Voucher

    ;;[Collection:myseletedvch]
    ;;Data Source : Day Book : selected

    [Function: Voucher Update]

    Variable: vch :String
    Variable: vchpp :String


    99 : Walk Collection : MyVoucherCol;;myseletedvch
    100 : set : vch : ""
    100a : Set:vch:"ID:"+$$String:$MasterID

    101 : set : vchpp :"" ;;; String:$VoucherDate
    101a : Set:vchpp:$$Date:$Date+5

    102a : Modify Object : (Voucher, ##vch).CrDtTm1[1].CrDtTm1 :" Sattam Chakraborty "
    102b:Modify Object : (Voucher, ##vch).CrDtTm2[1].CrDtTm2 :##vchpp
    ;103c : Modify Object : (Voucher, ##vch).CrDtTm3[1].CrDtTm3 :" 13:10 "

    106 : End Walk
    107 : Msg Box : "Status" : "Voucher Update Sucessfully Completed............"+
     



  10. sattam

    sattam Member


    oh thanks Bidyut bhai. Its realy helpful to me to modify my report.Namaskar and Dhanyabad.
     



Share This Page