on 05-31-2004 12:19 PM
i will generate a userfield with values
but the program does not running,
because i get a error - 5002 when i use
ValidValuesMD.
what is wrong on my source code?
best regards
ingo
Public Function generate_userfields()
Dim UFld As SAPbobsCOM.UserFieldsMD
Dim VVFld As SAPbobsCOM.ValidValuesMD
Dim RetVal As Long
Dim ErrCode As Long
Dim ErrMsg As String
Set UFld = vCompany.GetBusinessObject(oUserFields)
UFld.TableName = OITM
UFld.Name = "test"
UFld.Description = "test
UFld.Type = db_Alpha
UFld.Size = 10
RetVal = UFld.Add
The result was 0 in the error routine
Set VVFld = UFld.ValidValues
VVFld.Description = "test"
VVFld.Value = 1
VVFld.Add
The result was 5002 in the error routine
End Function
The description for error -5002 is "Default value is not valid for this field."
If you are setting a list of valid values, you must specify a default value. Add the following to your code:-
UFld.DefaultValue = 1
Regards,
John.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
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.