on ‎2007 Jan 30 1:16 PM
I've tried to update an user field, but sometimes it returns the error code -1013, with the message: Found error, code=-1013,msg=Invalid valid value 'A' in Enum 'BoYesNoEnum'
the code is the following:
Dim lRetCode As Integer
Dim lErrCode As Long
Dim RstStatus As SAPbobsCOM.Documents
Dim nErr As Long
Dim errMsg As String
Set RstStatus = oCompany.GetBusinessObject(oInvoices)
If RstStatus.GetByKey("15") = True Then
RstStatus.UserFields.Fields.Item(0).Value = "1"
lRetCode = RstStatus.Update
If lRetCode <> 0 Then
Call oCompany.GetLastError(nErr, errMsg)
If (nErr <> 0) Then
MsgBox ("Found error, code=" + Str(nErr) + ",msg=" + errMsg)
End If
End If
End If
tks!
Luciano
Request clarification before answering.
Try
RstStatus.UserFields.Fields.Item("U_MYUDF").Value = "1"
HTH
Juha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 27 | |
| 14 | |
| 7 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.