In Purchase voucher to Sales voucher export as per our needs and we create our own Voucher Number now the problem is when we transfer this purchase, we make same voucher number in duplicate so i require a TDL to check that the voucher number entered exist then delete that voucher else create new voucher in same company. Can anyone guide me how to go about or if anyone has tdl plz share
You may have a TDL function to get input of the voucher number and check that in the "Vouchers of company" collection., like below Code: [Function:checkVchNum] Parameter: pInputVchNum :String Variable: vVchnum :String 00:Set:pInputVchNum:$$Collectionfieldbykey:$Vouchernumber:##pInputVchNum:VouchersofCompany 10:Do If:##pInputVchNum = ##vVchnum: Return: Yes 20:Return:No if the function returns yes, then you voucher is already existed