cancel
Showing results for 
Search instead for 
Did you mean: 

How can I move UDFs from the UDF form to the main form, using DI?

Former Member
0 Kudos

Hi,

I'd like to use the DI in order to move some UDFs from the UDF panel into the form, just like it's done using the menu option in the client, under "Tools" --> "Edit Form UI".

Thanks,

Ori.

Accepted Solutions (0)

Answers (1)

Answers (1)

pedro_magueija
Active Contributor

Hi Ori,

DI stands for data interface. If you want to create UI elements you have to use the UI.

There is no native MoveTo method if that is what you are looking for. But creating an EditText or ComboBox is very easy.

You can find samples on your SDK installation directory (e.g.: C:\Program Files (x86)\SAP\SAP Business One SDK\Samples) how to create controls.

The important part is the binding. You should bind the controls you add with the respective DataSource. Usually since it's a UDF the DataSource is the actual table.

oCheckBox.DataBind.SetBound( true, "TableName", "ColumnName" );
Former Member
0 Kudos

Hi Pedro,

I'm very familiar with SDK development (using both DI and UI components) and I'm looking for a short way to make the UDF textbox disappear from the UDF form and appear in the main form, just like the UI feature under "Tools" --> "Edit Form UI" allows us.

Of course I can create a new textbox, bind it to the UDF in the DB and hide the UDF textbox from the UDF form but that's a lot of work which is done through the UI very easily and I was wondering if it can be done the same through the DI API (as we do other things through the DI API like adding/updating existing data, or adding/updating UDFs, UDTs and UDOs...)

pedro_magueija
Active Contributor
0 Kudos

Hi Ori,

Now I see what you mean.

I couldn't find any "native" method to do that. The tables seem to be UICU, and then UIC1-5. Unfortunately, this might not be exposed yet in the API. For the time being, I guess we are stuck with the UI way.

Perhaps you could open a topic at SAP Idea Place for it.

Pedro Magueija
LinkedIn | Twitter | Blog