Beispiel #1
0
        public void Initialize()
        {
            //Initialize UI API objects
            Menus              lObjMenus           = null;
            MenuItem           lObjMenuItem        = null;
            MenuCreationParams lObjCreationPackage = null;

            //Get SAP B1 menus
            lObjMenus = UIApplication.GetMenus();

            //Get menu creation params
            lObjCreationPackage = UIApplication.GetMenuCreationParams();

            //Get modules menu of SAP B1 menu
            lObjMenuItem = UIApplication.GetMenus().Item("43520");

            //Add add-on menu
            foreach (Module lObjModule in Menu)
            {
                if (AddModule(lObjModule, lObjMenus, lObjMenuItem, lObjCreationPackage))
                {
                    foreach (Section lObjSection in lObjModule.Sections)
                    {
                        AddSection(lObjModule, lObjSection, lObjMenus, lObjMenuItem, lObjCreationPackage);
                    }
                }
            }
            //Add add-on Form: ReceptionForm Form in the Menu Inventario (3072), Operaciones de stock (43540)
            //bool result = AddForm(lObjMenus, lObjMenuItem, lObjCreationPackage);
        }