cancel
Showing results for 
Search instead for 
Did you mean: 

UI API BP property value change

former_member90891
Discoverer
0 Kudos

BP- I want check property value of Business Partner before to add into SAP its like to make qryGroup15 as mandatory.

looking for c# code.

thanks

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi manuvirk,

How the Business Partner is being added? Are you doing it manually via SAP Business One Client or via DI API?

Here is the UI API code which you may have to change as per your requirements:

if (pVal.FormTypeEx == "134" && pVal.ItemUID == "1" && pVal.EventType == BoEventTypes.et_ITEM_PRESSED)
{
    var form = _form.GetFormbyUid(FormUID);
    var matrix = (SAPbouiCOM.Matrix)form.Items.Item("136").Specific;
    SAPbouiCOM.CheckBox oChk = (SAPbouiCOM.CheckBox)matrix.Columns.Item("2").Cells.Item(15).Specific;

    if (oChk.Checked == false)
    {
        application.StatusBar.SetText("Error Message");
    }
}

Hope it helps!

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member90891
Discoverer
0 Kudos

Thanks ankit,

now how can change property value to true