avatar image
Former Member

How to get ComboBox selected value text from SAP B1 form

How do I get a combobox selected value ?

In the attached screen shot , Payment Terms drop down list i have chosen "30 Days EOM" value .

Using c# code, how can get ComboBox(dropdown) selected value.

This is my sample code for getting text box values, same way how to get drop down selected text.


SAPbouiCOM.EditText oEdit = null;
 SAPbouiCOM.Item oItem = null;
oItem = oForm.Items.Item("234000013");
                oEdit = ((SAPbouiCOM.EditText)(oItem.Specific));
                primaryPartyCode = (oEdit.String);

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jun 23, 2017 at 01:22 PM

    Hi Werner,

    Use something like this:

    SAPbouiCOM.ComboBox cbx = (SAPbouiCOM.ComboBox)oForm.Items.Item("your id").Specific;
    if (cbx.Selected != null)
        string descrition = cbx.Selected.Description;
        string value = cbx.Selected.Value;

    Hope it helps.

    Kind Regards,

    Diego Lother

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Dears Dlego Lother.

      I added a UDF COMBOX control in the standard SO LINE MATRIX UI. I want to assign value to UDF COMBOX control, but the COMBOX of VALUE in SDK is read-only. What should I do? thanks.

Skip to Content