I have a UserTable related to a UserObject (DOCUMENT TYPE).
The UDO has manageSeries = tYes and i am able to see the correct document numbering in "Administration->System Init->Document Numbering".
When i try this code:
uTable = company.UserTables.Item("tblName")
uFields = uTable.UserFields.Fields
fields.Item("myMandatoryField1") = "XXX"
fields.Item("myMandatoryField2") = "YYY"
err = uTable.Add()
err is -4002 "To generate this document, first define the numbering series in the Administration module"
Why?!?!?