Skip to Content
author's profile photo Former Member
Former Member

Removing combobox values.

Hi all,

SBO/SDK: SBO2004 Patch 21.

I have setup a header UDF with one default value on the Sales Order form. I need to be able to add and remove validvalues from this combobox depending on certain scenarios. Adding values is fine but I'm getting an error message when trying to remove them:

Error: -7006

Item - The item is not a user defined item

The code I am using is as follows:

Set oItem = oUDFForm.Items("U_Test")

Set oComboBox = oItem.Specific

Do While oComboBox.ValidValues.Count > 0

oComboBox.ValidValues.Remove 0, psk_Index

Loop

Does anyone have a solution to this or am I doing something wrong? Thanks.

Regards,

Andrew.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 15, 2005 at 12:09 PM

    Hi,

    Did a bit more testing and the validvalues.remove code above works fine on a non-system form. So why does the SDK allow me to Add values to a combobox on a system form but not remove them?

    Regards,

    Andrew.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.