The function goToPageByName
is used in conjunction with the PAGE_PRE_xxx field, most specifically for mobile client layouts.
The function allows the administrator to place a button with a custom action on add and edit layouts, with the button action jumping immediately to any page defined within the button’s data dictionary entry.
To create this functionality, follow these steps:
- Within the data dictionary tab named LABELS / BUTTONS, create a new field. This field should have a display type of Menubar Button and you enter the appropriate title and icon to use on the rendered layouts
- Choose an Action Type of Custom Action
-
The Custom Action should have the form
javascript:goToPageByName('3');
where the3
is the name of the page you want to jump to when the button is pressed. This example assumes the field that begins the page is named PAGE_PRE_3. Similarly, if the page had been named PAGE_PRE_NOTIFICATION, the entry for the Custom Action would bejavascript:goToPageByName('NOTIFICATION');
- Place the button field within the layout(s) where you want it to appear.