Hi,
I'm using Visual Basic 6 and Business One 2005 B PL:03
I have a code, that I record a value in a field in the data base, but when I try to record some value in a "User-defined field", it returns the number: -2017
the code is the following:
Dim lRetCode As Integer
Dim RstStatus As SAPbobsCOM.Documents
Set RstStatus = oCompany.GetBusinessObject(oInvoices)
If RstStatus.GetByKey("50") = True Then
RstStatus.UserFields.Fields.Item(0).Value = "1"
lRetCode = RstStatus.Update
-> after this, lRetCode receives the value -2017
End If
Anybody can help me?
tks,
Luciano Firpo