cancel
Showing results for 
Search instead for 
Did you mean: 

Create a submenu under Goto menu

Former Member
0 Kudos

Hi,

I try to create a submenu under the Goto menu.

I would like that this submenu is available for all forms of the application.

Unfortunately, the Goto menu is not available for some forms of the application (like Service Call) and so, i can't create the submenu.

I work with Business One 2005 A (PL10).

Could you help me ?

Accepted Solutions (1)

Accepted Solutions (1)

AdKerremans
Active Contributor
0 Kudos

Hi Arnaud,

What you are trying to do is not possible, you can only add menus under the module menu.

Regards

Ad

Former Member
0 Kudos

I succeeded to create a submenu under GotTo menu when the 'Item Master Data' form is active, so i think it's possible to do it for any forms.

But i didn't manage to do it when the 'Service call' form is active.

Former Member
0 Kudos

Hi,

I know there is a functionallity that if you edit the form XML, and add a tag somewhere (can´t remember exactly where), this menu is added under GoTo menu, and is deleted when the form is closed.

Hope helps,

Ibai Peña

PS: I think this functionallity was avaiable in 2005.

Message was edited by: Ibai Peña

Former Member
0 Kudos

Hi again,

I have look at the 2005 help files and found that appart from the XML tag, the form object has the menus property that has the AddEx method. This is the way a menu is added under GoTo menu (Using the MenuCreationParams parameter).

But I suppose you already know this as you said it works for one form but not for another. Could you post the code to see what the problem is about?

Regards,

Ibai Peñ

Former Member
0 Kudos

Thank you for you help.

Here the code :

Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent

        Try

            If ((pVal.FormTypeEx = "60110" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD) And (pVal.Before_Action = false)) Then
                Dim oMenuItem As SAPbouiCOM.MenuItem
                Dim oMenus As SAPbouiCOM.Menus
                Dim oCreationPackage As SAPbouiCOM.MenuCreationParams
                oCreationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)
                oCreationPackage.Checked = False
                oCreationPackage.Enabled = True
                oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING
                oCreationPackage.UniqueID = "MyFormMenu1"
                oCreationPackage.String = "MyFormMenu1"
                SBO_Application.Forms.Item(FormUID).Menu.AddEx(oCreationPackage)
                oCreationPackage.Checked = False
                oCreationPackage.Enabled = True
                oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING
                oCreationPackage.UniqueID = "MyFormMenu2"
                oCreationPackage.String = "MyFormMenu2"
                SBO_Application.Forms.Item(FormUID).Menu.AddEx(oCreationPackage)
            End If
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub

Former Member
0 Kudos

Hi again,

Could be that the Item Master Data form has the GoTo menu activated, but the Service Call doesn´t (Use the GUI to see the default behavior)? Perhaps if you try to activate it first could work (I´m not sure of this).

Hope helps,

Ibai Peñ

AdKerremans
Active Contributor
0 Kudos

Hi Ibai,

You are right, I was referring to adding a menuItem like in the modules menu.

Ad

Former Member
0 Kudos

Hi,

Here the final answer from SAP Marketplace about theproblem of adding a submenu in 'Goto' menu when the 'Service call' form is the active form :

For some modules of the application like 'Services', the 'Goto' menu is unactivated by the system, so it is not possible to add a menu.

A correction is not expected because SAP considers it is not an issue.

So, we are not very pleased with this response but we have no choice !!

Thank you for you help.

Arnaud

Answers (0)