Skip to Content
0
Feb 07, 2021 at 10:54 AM

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

151 Views

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?