Skip to main content

system.kanoa.config.addNavigationItem(navItemInfo, userId)

Given a dictionary of information, adds a navigation menu item


Parameters

navItemInfo Dictionary

- enabledString
- iconString
- nameStringName of the navigation item
- parentIdIntegerparent node Id
- projectStringProject name that this navigation should be shown for. None if shown for all projects
- rolesList of StringsRoles reuqired for this naigtation item to be displayed. None if available to all users
- sortOrderString
- typeStringNavigation type i.e. 'view', 'url' or None for folder
- viewPathStringpath to the view

userId Integer


Returns

id Integer
msg None if success


Example

navItemInfo = {         
'project': 'kanoaMES',
'name': 'Shift Report',
'parentId': 4,
'viewPath': 'Kanoa\reports\shiftReport',
'icon': None,
'type': 'view',
'enabled': True,
'sortOrder': 5
'roles': None
}
userId = 5
id, msg = system.kanoa.config.addNavigation(navItemInfo, userId)