cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Fields to Business Partner with User Defined Fields

Former Member
0 Kudos

Upon adding some fields to the "User Defined Fields" for the Business Partner. We find that if any changes are done to the user defined fields the following error appears. OCRD Another User modified table ‘BP’ ODBC-2039

1. Is this error because we have modified the fields improperly or should not have done it with this method?

2. Are we missing something?

Thanks for the help. I am a new user to SAP Business One and we are working through some STUFF.

Dan Melhorn

Omega Group

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Daniel, did you ever get a fix to this ?

I am having the same problem, and cant figure it out.

Michael

Former Member
0 Kudos

Hi again,

Can you give me a specific scenario that I can follow to get this error?

This issue is open for a while now - and I just can't see it.

Regards,

Yaniv G.

Former Member
0 Kudos

I have a PB form that I have two user defined fields created.

In addition I've added two Comboboxes, that has a list of items that I'm using to populate the user fields.

Because, of this, I'm not populating the user fields in a standard way (Through the UDF Window). What I'm actually doing is, after I update my selection in the Combobox and press the update button, I capture the item press event for the button, then I check to see if the event has been handled by the system. If it has, I proceed and create a Business Partner object, then I get the record the system just updated and update its user defined fields with the data selected in the Combobox (Which is temporarly stored in a class variable).

This is when I get the error, but I only get the error if the user defined field is currently null. If there is a value in the field then I don't get the error.

Hope this help you to duplicate.

Former Member
0 Kudos

One other note I forgot to mention. Is that even though I'm getting this error the data is still being stored in the user fields.

Former Member
0 Kudos

Ok I found out what is the problem. whats happening is my update event is executing before the System update event is completed. As a result I'm changing the user field data which is resulting the the system form record becoming out of sync with the database, and the transaction is failing because the system record is now older that the record in the database and as a result we get the ODBC error -2039.

Solution, wait for the form mode to change form fm_Form_Update to fm_Form_Ok and then perform my DI update.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I'm not sure what exactly you do that you get this error.

I was able to do so via the application as well as via the DI API.

Here is a sample of a code:

<i> Set oBP = oComp.GetBusinessObject(oBusinessPartners)

If oBP.GetByKey("YYY") Then

oBP.UserFields.Fields.Item("U_XXX").Value = "123465"

End If

lErr = oBP.Update

If lErr <> 0 Then

oComp.GetLastError lErr, sErr

MsgBox lErr & " " & sErr

End If</i>

Regards,

Yaniv G.

SDK Consultant,

SAP Manage Israel.

Former Member
0 Kudos

I'm have the same isssue and my code is as you have specified.

I'm using SAP Business One version 6.5 EF:07.

I noticed that I only get the error message if the user field I'm updated is null.