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

How to make UDF-Form mandatory?


Please have a look at the following situation:

In new orders i keep track of the Weight - Column. I sum it up and save the result in a UDF. Since this has to work when entering each orderline (new ones that aren't saved too) SQL - Queries are a no go.

So i defined a UDF and use appropriate events of the orderform to update the UDF on the UDF-Form.

This works BUT:

- I don't know how to make the User Field Form (The one that gets added when activating View/User defined Fields)

mandatory. I always can be opened/closed by the mentioned menu option.

I tried to ".enabled=false" the menu in the form_activate event but it shows strange behaviour and generates exceptions from time to time.

At least i managed to disable the close-Button (cross) on the UDF-Form so it can't get closed from there.

Does somebody know hot to make this UDF-Form Mandatory?



Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2005 at 04:51 PM

    You can do this using the SDK by following this process:

    After the order form has activated, check the forms collection to see if there is a form with a type value of 'order form type * -1'. If such a form is there, then your user defined field form is there.

    If there is no form of such type, then there is no UDF form displayed. You can display the UDF form by forcing a menu click using the ID that the UI executes when the 'Display User Defined Fields' menu item is clicked.

    Note that the UDF form detection logic described above only works 100% reliably when there is only one order form displayed. Depending on your needs, you may need to account for this.

    I use this process in my projects to ensure that the UDF form is loaded when the form loads. I also use it when saving, if I need to validate the state of a user field before saving.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2005 at 09:05 PM

    Hi Demetree

    Thats quite similar like i implemented it. (I use a try catch block instead checking the collection for the existence of the *-1 form)

    I would like an more reliable solution from SBO itself.



    Add a comment
    10|10000 characters needed characters exceeded

    • Hi,

      SBO doesn´t give any standar way to make a UDF mandatory. The property "mandatory" that is set when a UDF is created can´t be used if non default value is set.

      I have spoken to Avi Lupu from SAP in a training and said they wild keep this issue in mind. I hope he will read this post, and see that are more people interested on this.

      Untill it, we will had to work with the kind of solution you both talk about.


      Ibai Peñ

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.