How to reference a form in a module

Exploring NGClient - MODULES:

When creating a MENU item in svyNavigationUX: how do you reference a FORM in another MODULE.

For example: I load our Magazine solution as a MODULE of cloudSampleSolution and try to create a menu item in MainNavMenu.js ?

I have tried using scopes.<module_solution_name>.forms.<form_name.frm>

Appreciate the guidance…

Daryl

Hi Daryl,

a couple of pointers which may help you.
The mainNavMenu form of the cloudSampleSolution can reference any form on any of it’s submodules ( including your Magazine solution in your setup ).
To add menu items, you can amend the method loadMenuItems() in mainNavMenu.js.
You can add menu entries such as:

// Magazine
menuItem = new Object();
menuItem.id = "nameOfYourMagazineForm";
menuItem.text = "MAGAZINE"
menuItems.push(menuItem);

Using the name of the form as id of menuItem will allow you to access the form when the Menu Item is clicked.

If you need to access the form programmatically instead you can use the navigation API:

var item = new scopes.svyNavigation.NavigationItem(formName);
scopes.svyNavigation.open(item);

See wiki of svyNavigation Module:
https://github.com/Servoy/svyNavigation … t-the-menu
https://github.com/Servoy/svyNavigation … gation-api

Regards,
Paolo