```for (let i = 0; i < clientAccounts.length; i...
# suitescript
f
Copy code
for (let i = 0; i < clientAccounts.length; i++) {
                            log.debug({title: 'Trying to Match', details: {
                                    hasNetsuiteAccount: clientAccounts[i].netsuiteAccount,
                                    accountIdOne: clientAccounts[i].netsuiteAccount.id,
                                    accountIdTwo: accountId,
                                    match: clientAccounts[i].netsuiteAccount.id === accountId,
                                }});
                            if (clientAccounts[i].netsuiteAccount && clientAccounts[i].netsuiteAccount.id === accountId) {
                                matchingAccount = true;
                                break;
                            }
                        }
for some reason it always reads the first value of the array rather then iterating thru it