cancel
Showing results for 
Search instead for 
Did you mean: 

CFL in UDO problem!

Former Member
0 Kudos

Hello every body

i am newbie in SAP BUSINESS ONE and my question is simple: how can I add choose from list in text field to choose a business partner .I can't find a clear answer please helpppp.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

To add choose from list to your form please review the following link :

http://wiki.scn.sap.com/wiki/display/B1/SAP+BusineUsing+Choose+from+List

After added the CFL to your form, do the following in item event:

Case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST

                        Dim cfl As SAPbouiCOM.ChooseFromListEvent

                        Dim dt As SAPbouiCOM.DataTable

                        cfl = pVal

                        dt = cfl.SelectedObjects

                        If Not (dt Is Nothing) Then

                               Try

                                    objform.DataSources.UserDataSources.Item("UD_2").ValueEx = dt.GetValue("CardName", 0)

                                Catch ex As Exception

                                End Try

                                objform.DataSources.UserDataSources.Item("UD_1").ValueEx = dt.GetValue("CardCode", 0)

                         End If

Note: If you are using user data source in alies, the above code should work.

Former Member
0 Kudos

Thanks a lot it works !!