Skip to Content
0
Former Member
Nov 10, 2008 at 04:50 PM

Add row in a usertable

1027 Views

Hello.

I have this code from the only example in SDK Help but it does not work:

oRegHist = oCompany.UserTables.Item(1)

oRegHist.GetByKey("RGST")

'Set default, mandatory fields

oRegHist.Code = "RGST"

oRegHist.Name = "Historico"

'Set user field

oRegHist.UserFields.Fields.Item("U_FECHA").Value = datFecha

oRegHist.UserFields.Fields.Item(intIndice + 1).Value = 1

intResult = oRegHist.Add()

but since the example does not explain anything clearly I do not understand what Item(1) is, wht exactly oRegHist.Name or Code are and I am getting an error "-1 Documente UserTable can not add row".

What am i doing wrong?

Thanks a lot