Skip to Content

How to add new buttons in campaign form at a fixed position in B1 SDK?


I’m currently adding new buttons for the campaign form in Business One with the SDK. There one button I added that is 300 pixels to the left. When I resize the campaign form, the button will move it placement and appear at they right corner of the form. Is there a property I can set to keep the button at a fixed position so the button does not move when I resize the form?



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jun 02, 2017 at 02:41 PM

    Hi William,

    Important is the "Link To" property. Here is the example to use it for Campaign form:

    SAPbouiCOM.Form oForm = (SAPbouiCOM.Form)SBO_Application.Forms.GetForm(pVal.FormType.ToString(), pVal.FormTypeCount);
    oNewItem = oForm.Items.Add("UserBtn", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
    oItem = oForm.Items.Item("1320000002");
    oNewItem.Left = oItem.Left + 80;
    oNewItem.Top = oItem.Top;
    oNewItem.LinkTo = "1320000002";
    SAPbouiCOM.Button oBtn = (SAPbouiCOM.Button)oNewItem.Specific;
    oBtn.Caption = "My Test";

    Kind regards,


    SAP SME Support

    Add comment
    10|10000 characters needed characters exceeded