Showing results for 
Search instead for 
Did you mean: 

B1 DI Error: Cannot add rows to a Document type UserTable

0 Kudos

I'm migrating away from the B1WS integration an writing an application that is using the SAPbobsCOM90.dll.

We have an addon that has custom usertables and I'm trying to write to these tables in C#:

var userTable = company.UserTables.Item("TABLENAME");

userTable.Code = "123";

userTable.Name = "123";

userTable.UserFields.Fields.Item("U_cardCode").Value = "test value";

var result = userTable.Add();

When I run this I get the error: Cannot add rows to a Document type UserTable

This doesn't make sense because that table is defined as type 3 (Document), and I thought this is how you insert records into a document table.

Anyone seen this before?

Community Manager
Community Manager
0 Kudos
Thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with (if you haven't already), as it provides tips for preparing questions that draw responses from our members. For example, you can outline what steps you took to find answers (and why they weren't helpful) and share screenshots of what you've seen/done. The more details you provide, the more likely it is that members will be able to assist you. You should also make sure you're using all the appropriate tags, so the right experts can find your question.
Should you wish, you can revise your question by selecting Actions, then Edit.
Finally, if you're hoping to connect with readers, please consider adding a picture to your profile. Here's how you do it: By personalizing your profile with a photo of you, you encourage readers to respond.
Product and Topic Expert
Product and Topic Expert

Dear roger_versluis94,

Could you please help to confirm the SAP Business One Version where you are having this issue?

Also, do you have the User Defined Objected (UDO) registered for this User Defined Table?

Kind regards,


SAP Business One Support

Accepted Solutions (0)

Answers (0)