TDL Byte #17: Function Action – 'Delete Target'

Discussion in 'Tally.Developer 9 Release 6.0: Videos & TDL Bytes' started by admin, Dec 3, 2015.

         
  1. admin

    admin Administrator Staff Member


    [​IMG]
    [​IMG]
    Function Action – 'Delete Target'
    TDLByte #17
    [​IMG]
    Dear Developers,
    You might have faced situations, where you wanted the functionality of deleting vouchers/ledgers/any primary object. Since the functionality was not available prior to the product release, you would have spent time looking for an alternative work-around to achieve the same.
    Release 5.0, introduces the function action 'Delete Target' with which, we can easily delete the primary objects.
    'Masters can be deleted only if it is not used. For example, if there is a Master under which, no transaction has been passed, then it can be deleted. If a transaction has been passed for the same Master, then it cannot be deleted.'
    To illustrate the same, take a case where all the unused ledgers with zero opening balance needs to be deleted. Here, 'Delete Target' can easily remove the ledgers with the code snippet as shown below.
    [​IMG]

    You can access the complete code is attached. In our next TDLByte, we will introduce you to another TDL enhancement that will ease and simplify your programming activities.
    Stay tuned!
     

    Attached Files:



Share This Page