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

UI: Enable/Disable UDF's in Code

Hi all,

is it possible to make UDF's enabled or disabled in code? For example, in Item Master Data, I can each item

make disabled with:

Set oForm = GetFormByTyp(150, 1)

Set oItem = oForm.Items.Item("5")

oItem.Enabled = False

...

but in UDF's window, I cannot do the same:

Set oForm = GetFormByTyp(-150, 1)

Set oItem = oForm.Items.Item("udfField")

oItem.Enabled = False

...

Can anybody help?

I use SBO6.50.097 SP01 EF:07

Regards

Libor.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jul 27, 2004 at 01:32 PM

    Hi Libor,

    the form has to be open for this method to work. I had the same problem so I moved the method to a button click event instead of a form load and it works now.

    kind regards

    Jacintha Murphy

    SAP Business One Support

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 27, 2004 at 02:24 PM

    Hi Jacintha,

    thank's for your reply. But when I start my code, always comes this warning:

    "Item - this item is not a user-defined item an cannot be manipulated in such manner"

    My UDF's form -150 is always opened and each EditBox I want to make disabled is my own user-defined field. What's your opinion? Have I forgot something?

    Thanks and regards

    Libor.

    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.