Delete Collection Object

Discussion in 'Free Source Codes' started by AMIT JALAN, Mar 15, 2024.

    
  1. AMIT JALAN

    AMIT JALAN Member


    I am getting below error while running the function. Please suggest what's wrong in my code.
    Code:
    [Button: AJModify]
        Title    : Delete Bill
        Action: Call: ModifyVouchers
        Key: Ctrl + T
    
    [#Form: Daybook]
        Button    : AJModify, RefreshTDL
        Local : Button    : Refresh TDL    : Key    : Ctrl + S
    
    
    [Collection: SelectedVoucher]
        Data Source : Report    : Selected
        Keep Source    : Yes
    
    
    
    [Function: ModifyVouchers]
        Variable    : VCHID    : String
       
        100    : Walk Collection    : SelectedVoucher
            1000: Set    : VCHID    : "ID:" + $$String:$MasterId
            1010: Call    : ModifyVoucher    : ##VCHID
        110: End Walk
    
    
    [Function: ModifyVoucher]
        Parameter    : VCHID    : String
        Variable    : VNumCount    : Number
       
        Object    : Voucher    : ##VCHID
    
        090    : Set Target
        100    : Walk Collection    : All Ledger Entries
        110    : Set Target
            1100    : Set    : vNumCount    :$$NumItems:BillAllocations
            1110    : While    : ##vNumCount > 0
                2110    : Delete Collection Object    : BillAllocations    :    1    :    Yes
                2120    : Decrement    : vNumCount
            1120    : End While
        120    : Set Target    : ..
        130    : End Walk
        140    : Set Target    : ..
        150    : Accept Alter
       
        
     


  2. balajimg

    balajimg Active Member


    there should be atleast one bill allocation ...
     


  3. AMIT JALAN

    AMIT JALAN Member


    Yes, There are. Still I'm getting error.
     


Share This Page