Create a custom action for a menu item or button, and write your own code to dictate its behavior.
- In the Screen Design page, from the palette, click the control you want to customize and click either the Menu box (if it's a menu item), or the screen where you want to place the control.
- Click the menu item or control to select it and configure the properties in the Properties view.
- In the Properties view, from Type, select Custom.
- In the Custom.js file, write the code in the customBeforeMenuItemClick to handle the action.
- Save the Custom.js file.