Javascript tips & how to


NameCodeDescription
Get Menu Itemsapp.viewmodel.data.navigationItemsThis will give you all the menu items and you just have to define which one you want to look for i.e... app.viewmodel.data.navigationItems[16] will give you graphics builder since that is the 16th in the list of the app.viewmodel.data.navigationItems list.
Create New Graphic on your contextfinstack.eval('graphicsBuilderNew('+app.TargetRef()+', null, false)')

This will be as if you:

  1. Click on menu
  2. Click on graphics builder
  3. Click on new

In essence, it saves you the 3 clicks when creating a graphic.