on 01-30-2007 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
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 |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.