Skip to Content
0

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

Oct 19, 2016 at 12:32 PM

270

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Oct 19, 2016 at 02:19 PM
2

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" );
Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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...)

0
Former Member
Former Member

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

0