cancel
Showing results for 
Search instead for 
Did you mean: 

connecting user defind fields with the controls of the form

Former Member
0 Kudos

Hi,

I am having the problem connecting User defind tables on the sql server2000 with a form.

if anybody provide me a code for this ?

thanks

regrads

Accepted Solutions (0)

Answers (2)

Answers (2)

Gianluigi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Neeraj hi -

- go to the B1 SDN home page. It is at: https://www.sdn.sap.com/irj/sdn/developerareas/businessone

- on the right under the section eLearning click on "SAP Business One Development Consultant"

- here you can find the complete list of e-learning material

It is pretty complete. You have several section:

- Basic SDK

- Basic DI API

- Basic UI API

- User Defined Object

- Add-ons and Licensing

Former Member
0 Kudos

hi,

Tnx Dear, u did not tell me your name

any way tnx again.

Regrads

Neeraj Kulshrestha

Former Member
0 Kudos

Hi Neeraj,

I use this C# code to bind a newly added combobox to a user data field of ODLN table. during the FORM_LOAD event (when ActionSuccess is true - i.e. load event is complete)



if (ItemEvent.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD && ItemEvent.ActionSuccess)
                        {

                            SAPbouiCOM.Form f = B1App.Forms.Item(ItemEvent.FormUID);

                            SAPbouiCOM.Item itm, refItm;

                            // StaticText

                            f.Items.Add("2000060050", SAPbouiCOM.BoFormItemTypes.it_STATIC);

                            itm = f.Items.Item("2000060050");

                            refItm = B1App.Forms.Item(FormUID).Items.Item("86");

                            itm.Left = refItm.Left;
                            itm.Top = refItm.Top + refItm.Height + 1;
                            itm.Width = refItm.Width;
                            itm.Height = refItm.Height;

                            SAPbouiCOM.StaticText st = (SAPbouiCOM.StaticText)itm.Specific;

                            st.Caption = "Tipo documento";

                            // ComboBox

                            f.Items.Add("2000060051", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);

                            itm = f.Items.Item("2000060051");
                            refItm = f.Items.Item("46");

                            itm.Left = refItm.Left;
                            itm.Top = refItm.Top + refItm.Height + 1;
                            itm.Width = refItm.Width;
                            itm.Height = refItm.Height;

                            SAPbouiCOM.ComboBox cb = (SAPbouiCOM.ComboBox)itm.Specific;

                            cb.DataBind.SetBound(true, "ODLN", "U_TipoDoc");
                        }
                        

Gianluigi
Product and Topic Expert
Product and Topic Expert
0 Kudos

That should be done using DB data sources. You may have a look at the e-learning available here on the B1 section of SDN.

Former Member
0 Kudos

where is it ? Plese help me

thanks and Regards

Neeraj