cancel
Showing results for 
Search instead for 
Did you mean: 

u0093This entry already exists in the following tables......."

Former Member
0 Kudos

Hi,

I’m using code to call up a form containing a user-defined document object. The object has both a header and lines. I use the find method to get the data from the database into the form. I am then updating the matrix with code. This changes the form to the Update mode and the user is then able to update the database consistent with the new data. As long as I don’t add a row to the matrix, the things work as expected. If I have to add a row to the matrix because the new data has an additional line, Business One will not save the updated form. It gives an error message, “This entry already exists in the following tables(MYTABLENAME) (ODBC-2035)”. I have not yet tried removing a row but will. Does anyone know a way around this so that the user can update the database?

Thanks,

Mike

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Mike are u creating a from without the use of udo's?? I think one way of going about it is addin a dbdatasrc in ur xml o thru the code when your form loads and use the setdatabind method to bind the rows to the specific columns from which the data is comin if sum columns are computed columns then u can use a userdatasource,which allows you to set the values after computation..

Regards

Aris

Former Member
0 Kudos

Aristotle,

We are using a document UDO, which is bound to both a header and line table.

Are you saying that we need to also create a DBDataSource and bind all of the line fields to it? Do we then save the DBDataSource to the database instead of updating the database with the Update service when the user clicks the Update button. Is this the way to get around the fact that SAP does not allow UDOs to use the Add service?

Thanks,

Mike

Former Member
0 Kudos

Mike

Try to find out which are the required primary keys in the tables (header and Lines) of your document. The important thing is to provide a new value for such fields like Code.

Answers (0)