To understand how to structure the code that adds menu items for your integration, it is useful to know how menus are implemented. Microsoft Dynamics GP stores a default set of menus in the syMenuMstr (SY07110) table. If a user customizes the menus, their customized menu set is saved in the syMenuMstr table.
The menu structure displayed for a user is built each time that user logs into Microsoft Dynamics GP. If the user has made customizations to the menus, the user’s customized set of menu items is used. Otherwise the default set of menus is used.
Every integrating dictionary that will have menu items must contain sanScript code that defines the default menu items for that application. Each time a user logs into Microsoft Dynamics GP, this code to define the default menus will be run, ensuring that the default menu structure is always up-to-date.
Once the default menu structure has been updated, Microsoft Dynamics GP is ready to load the appropriate set of menus for the current user. Either the default set or the user’s customized set will be used, depending on whether the user has made menu customizations.
Menus built from sanScript code that is run directly from a dictionary can be constructed more quickly than those built from information stored in a SQL table. Microsoft Dynamics GP uses this fact to optimize how the menu structure for a user is built.
When you write the sanScript code to define your integration’s menu items, the code must be able to work with both of these cases. The code from the sample integrating application will show you how to structure your code to create menu items.