Dear Sir, I had written a code to alter the reference in Voucher with VoucherNumber, but its taking very long time to update the voucher. Is is possible to optimize code to execute fast
in first function 05 : Call : UpdateDetail : $$String:##VouID in 2nd function you have used Object : Voucher : ##VouID instead use 00 : New object : Voucher : ##MstID and 08 : Modify Object : (Voucher,##VouID).LedgerEntries.BillAllocations.BillType + : ($$SysName:NewRef) , Name: ##ref , Amount : ($$AsAmount:##Amt * -1) replace with 08 : Set Target 09 : Set Object : LedgerEntries[1].BillAllocations[1]. 10 : Setvalue : BillType : ($$SysName:NewRef) 11 : Setvalue : Name: ##ref 12 : Amount : ($$AsAmount:##Amt * -1) 13 : Set Target : ... 14 : Save Target