0

I could not find a good template for the update method for the xdevapi library and thought maybe some one could help me out with getting this to work.

acts_table
    .update()
    .set('account_status', 'new account status')
    .where('customer_number like :customer_number && original_account_number like :original_account_number')
    .bind('01234588456')
    .bind('12156464645')
    .execute()

I think its just a formatting issue, but with no real examples in the XDEVAPI Documentation for update for Javascript I'm kind of at a lost. Please help. The error I get is Cannot Read property 'toArray' of undefined.

nmsdev
  • 29
  • 6

1 Answers1

0

It was formatting, in the bind method I forgot to put the fields we were binding so the answer is this:

acts_table
    .update()
    .set('account_status', 'new account status')
    .where('customer_number like :customer_number && original_account_number like :original_account_number')
    .bind('customer_number','01234588456')
    .bind('original_account_number', '12156464645')
    .execute()
nmsdev
  • 29
  • 6