cancel
Showing results for 
Search instead for 
Did you mean: 

How can I Set Find and Default Form in UDO with DI API

Former Member
0 Kudos
77

Now I can registration UDO by DI API but I need to set field for find

and set field for the default form (both head table and child table) by DI API coding.

How can I do that?

thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

You can also use B1DE tools (downloadable for free from B1 SDN page) in order to create your code, it will also automatically create a nice to use form for your UDO in xml.

Pay attention UDO default form only accepts one child table.

Regards

Trinidad.

Former Member
0 Kudos

Hi Phatt,


                oUserObjectMD.FindColumns.ColumnAlias = "Code"
                oUserObjectMD.FindColumns.ColumnDescription = "Código"
                oUserObjectMD.FindColumns.Add()
                oUserObjectMD.FindColumns.SetCurrentLine(1)
                oUserObjectMD.FindColumns.ColumnAlias = "Name"
                oUserObjectMD.FindColumns.ColumnDescription = "Descrição"
                oUserObjectMD.FindColumns.Add()
                ...

                oUserObjectMD.FormColumns.FormColumnAlias = "U_Field1"
                oUserObjectMD.FormColumns.FormColumnDescription = "Field 1 Name"
                oUserObjectMD.FormColumns.SonNumber = 1
                oUserObjectMD.FormColumns.SetCurrentLine(1)
                oUserObjectMD.FormColumns.Add()
                oUserObjectMD.FormColumns.FormColumnAlias = "U_Field2"
                oUserObjectMD.FormColumns.FormColumnDescription = "Field 2 Name"
                oUserObjectMD.FormColumns.SonNumber = 1
                ...

But I recommend you use XML files for UDO registration. It's much faster.

Regards,

Vítor Vieira

Edited by: Vitor Vieira on Jun 18, 2009 12:29 PM