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.
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.
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............"
Dear Sattam Sir, The code is correct for change the date. Problem is its not fetch the value of "$VoucherDate"
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............"+