cancel
Showing results for 
Search instead for 
Did you mean: 

Can’t Make 4th Button To Appear In BP Campaign

former_member272979
Participant
0 Kudos

Hi,

I’m currently adding new buttons to BP Campaign form to add new functionality. For some reason, the forth button won’t appear on the form even though there is room to fit it. Below is a screenshot of the form of the buttons that appears and the code I used to make the buttons appear. Would you know based with the code why the fourth button does not appear?

Dim oCampForm As SAPbouiCOM.Form
                    oCampForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
                    Dim oitmref, Item As SAPbouiCOM.Item


                    oitmref = oCampForm.Items.Item("1320000002")


                    'Campaign based On BP
                    oCampForm.Items.Add("btnBP", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
                    Item = oCampForm.Items.Item("btnBP")
                    Item.Top = oitmref.Top
                    Item.Height = oitmref.Height
                    Item.Width = oitmref.Width + 60
                    Item.Left = oitmref.Left + oitmref.Width + 5
                    Item.LinkTo = "1320000002"


                    Dim oButton As SAPbouiCOM.Button
                    oButton = oCampForm.Items.Item("btnBP").Specific
                    oButton.Caption = "Campaign based On BP"


                    'Campaign Based on Items
                    oitmref = oCampForm.Items.Item("btnBP")
                    oCampForm.Items.Add("btnItem", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
                    Item = oCampForm.Items.Item("btnItem")
                    Item.Top = oitmref.Top
                    Item.Height = oitmref.Height
                    Item.Width = oitmref.Width
                    Item.Left = oitmref.Left + oitmref.Width + 5
                    Item.LinkTo = "1320000002"


                    Dim oButton1 As SAPbouiCOM.Button
                    oButton1 = oCampForm.Items.Item("btnItem").Specific
                    oButton1.Caption = "Campaign Based on Items"


                    ' Campaign Based on Group
                    oitmref = oCampForm.Items.Item("btnItem")
                    oCampForm.Items.Add("btnGroup", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
                    Item = oCampForm.Items.Item("btnGroup")
                    Item.Top = oitmref.Top
                    Item.Height = oitmref.Height
                    Item.Width = oitmref.Width
                    Item.Left = oitmref.Left + oitmref.Width + 5
                    Item.LinkTo = "1320000002"


                    Dim oButton2 As SAPbouiCOM.Button
                    oButton2 = oCampForm.Items.Item("btnGroup").Specific
                    oButton2.Caption = "Campaign Based on Group"


                    'Send Mailing List
                    oitmref = oCampForm.Items.Item("btnGroup")
                    oCampForm.Items.Add("btnMailList", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
                    Item = oCampForm.Items.Item("btnMailList")
                    Item.Top = oitmref.Top
                    Item.Height = oitmref.Height
                    Item.Width = oitmref.Width
                    Item.Left = oitmref.Left + oitmref.Width + 5
                    Item.LinkTo = "1320000002"


                    Dim oButton3 As SAPbouiCOM.Button
                    oButton3 = oCampForm.Items.Item("btnMailList").Specific
                    oButton3.Caption = "Send Mail List"

Accepted Solutions (1)

Accepted Solutions (1)

former_member233854
Active Contributor
0 Kudos

Hi,

The item id length can`t be higher than 10 chars

oCampForm.Items.Add("btnMailList", SAPbouiCOM.BoFormItemTypes.it_BUTTON)

Your btnMailList has 11

former_member272979
Participant
0 Kudos

Thanks for the advice. This issue been driving me crazy for a while.

Answers (0)