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.

1 Answer 1

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()
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.