on 06-16-2008 11:41 AM
Hi,
I have created one UDF in the marketing documents(Type combo box and i set the default value to "-","-") and i am try to assign the new value to the UDF through DI API . I am getting the following error,
" 3 is not a valid values for property "U_BPProj". The valid values are "-","-"
Here 3 is my value.
my Coding
oSalesQuotation.Lines.UserFields.Fields.Item("U_BPProj").Value = strBPProject
oSalesQuotation.update
I am using 2007A patch Level 30.
Thanks and regards
Senthil.
Hi senthilkumar,
I must to add the value 3 in the ValidValue of the combobox before update.
oCombobox.ValidValues.Add("3", "3");
and then you can update your form.
Hope i help you
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
Find the below scenario.
1. I have crated one UDF in Marketing document Lines (U_BPProj) and assign one valid value ('-','-') at the time
of creation.
2. I am opening the Sales Order, During the Form Load i have filled the U_BPProj combo box column with 10 number of values.
No issues on this, I can able to select the new values from the UDF and i have update the Sales Order manually , then the values are stored in the RDR1 table.
The problem is ; I have tried to update U_BPProj UDF with new values for existing Sales order lines using DIAPI, I have faced the mentioned error message.
Could you please give me your suggestions.
Actually This was working fine in Patch Level 15 but not in Patch 35 and 37.
Regards
Senthil.
Senthil,
as I wrote you already, when the value isnt inside valid values for user fieůd, you will be not able to store them. Maybe in lower patch it worked, but it was bug.
Before adding the new value you must exceed the valid values list for user field as
oUserFieldsMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
oUserFieldsMD.TableName = "table"
oUserFieldsMD.Name = "name"
oUserFieldsMD.ValidValues.Add(values)
oUserFieldsMD.Add()
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
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.