cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error code -4002

Former Member
0 Likes
1,444

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?!?!?

View Entire Topic
Former Member
0 Likes

Hi Alesso,

Is the defined numbering activated for the current period?

Regards,

Rowdy

Former Member
0 Likes

Yes, Numbering is active in the period

Message was edited by: Alessio Colzi

Former Member
0 Likes

Hi Alesso,

Go to the document serie you want to edit and select the correct period in the Period column. (I don't know the exact names, I'm currently in a dutch localized database)

Hope it helps,

Rowdy

Former Member
0 Likes

Hi Alesso,

A quick search on the forum gives where you'll see that adding documents consisting of UDO can not be added through the DI-API.

Kind regards,

Rowdy