Skip to Content
0
Former Member
Feb 17, 2009 at 11:56 AM

Updating Business Partner via B1WS web services

56 Views

Hi,

I get an error when I try to update (through the 'update' function of the BusinessPartnersService object) a BP that has already a bank account; even if I populate the BPBankAccounts property with the existing info of bank account, I get:

Bank account is in use and therefore cannot be removed or changed [(----) 705-20]

My code is:

BusinessPartnersService px = NewBPService(LoginDefault());

BusinessPartner bp = new BusinessPartner();

bp.CardCode = "CADRIAT0000";

bp.Phone1 = "041666666";

BusinessPartnerBPBankAccount[] bpba = new BusinessPartnerBPBankAccount[1];

bpba[0] = new BusinessPartnerBPBankAccount();

bpba[0].BPCode = "CADRIAT0000";

bpba[0].IBAN = "IT42L0350012500000000021179";

bpba[0].Branch = "12500";

bpba[0].BankCode = "03500";

bpba[0].AccountNo = "000000021179";

bp.BPBankAccounts = bpba;

px.Update(bp);

Does anyone know ho to update correctly a BP with an existing bank account?

Thanks,

Alessio