Article Details
Id:17890
Product:finPOWER Connect
Type:FIX
Version:3.04.00
Opened:17/02/2021
Closed:02/03/2021
Released:30/06/2021
Job: J025978

Account Payments; may fail with an "Unhandled Exception: Index is out of bounds." error

Account Payments, Account Withdrawals/ Refunds and Account Close wizards may fail with an "Unhandled Exception: Index is out of bounds." error.

This occurs if a script removes all transactions in the Bank Batch being committed. It is recommended any script updating Bank Transactions is carefully structured and ignores these types of processes.

For example, add the following code:

Select Case BatchBank.Source
  Case isefinTransactionSource.AccountClose, isefinTransactionSource.AccountClosePending, isefinTransactionSource.AccountPayment, isefinTransactionSource.AccountRefund, isefinTransactionSource.AccountWithdrawal, isefinTransactionSource.AccountWithdrawalDisbursed
    ' Ignore these Sources
  
  Case Else
    ' Process here
End Select  

This issue is now trapped, and the commit will fail with the error "The Payment Transaction no longer exists.".