cancel
Showing results for 
Search instead for 
Did you mean: 

DI / JCo: adding IContactEmployees with java wrapper

Former Member
0 Kudos

Hi

Is there anyone out there with experience of adding IContactEmployees to IBusinessPartners?

When I use cE.add() and updates the BusinessPartner it just replaces the contact in the first position.

Is this a bug or have I missed something?

regards

Taisto

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member185703
Active Contributor
0 Kudos

Hi Taisto,

I am not 100% sure, but the behaviour of IContactEmployees may be somewhat unexpectedly.

I think it's like this (please check it):

When you get the BP object it comes - like any object from 6.5 on - with one empty line for the each collection in it; here it's the contact employees collection.

The current line in this collection is then the first one: "0"

(So that SetCurrentLine will fail when you try to set it to "0" after getting the BP object... but this is a known bug.)

Therefore, if you use "Add" after you have set the properties for the object, you have change the first CP and usually you should receive an error when you try to update the BP with a CP that is empty.

If you use "Add" before you set the CP properties, it should work - at least, if the new CP is not the first one.

I hope you understand what I mean when you check out the sample code in the DI helpfile for this.

Regards,

Frank