If value already stored in my udf then this function working perfect but if i create a voucher then error showing Code: [#Form : Sales Color] On : Form Accept : Yes : Form Accept On : Form Accept : Yes : Call : Vch Update Fun :@@CurrVoucherID [System : Formula] CurrVoucherID : $$String:"ID:"+$$String:$MasterID [Function : Vch Update Fun] Parameter : MSTID : String Variable : IsDeleteYN : Logical : No Variable : NumItems :Number Objects:Voucher :##MSTID Action:010 : Start Batch Post Action:020 : SET TARGET Action:030 : Set Object Action:050 : Walk Collection : All Inventory Entries Action:051 : SET TARGET:InventoryEntries[$$LoopIndex]. Action:052 : Walk : myudfs1 Action:053 : SET TARGET:myudfs1[$$LoopIndex]. Action:054 : Set : IsDeleteYN : if $IsRettktEnable=No Then Yes else No Action:400 : If:##IsDeleteYN=Yes Action:479 : Set : NumItems : $$NumItems:myudfs6 Action:482 : While : NOT ($$IsEmptyCollection:myudfs6) Action:483 : DELETE COLLECTION OBJECT : myudfs6 : 1 : Yes Action:485 : End While Action:490 : End If Action:511 : End Walk Action:531 : End Walk Action:630 : SET TARGET : .. Action:640 : ACCEPT ALTER Action:680 : End Batch Post
if you are creating use different function as there will be no voucher to query using masterid For create, syntax will be ... NEW OBJECT : Voucher ... refer this What are Procedural-Object/Collection Related Actions in TDL? | TallyHelp (tallysolutions.com)