Show TOC

Client-Side Tray Options APILocate this document in the navigation structure


The client-side Tray Options API enables you to create and manage custom options in the tray menu of a module. These options can either be actions performed on the module, or different views of the module.

ActionOption and ViewOption Objects

Represent an action option and a module view option respectively. The objects have the following properties:




The text of the option


The position of the option in the tray menu (1-100)


The module ID


( ActionOption only)

The callback function that implements the action


( ViewOption only)

The URL of the module view, which can be any of the following:

  • PCD ID of an iView or a page, such as pcd:portal_content/iview_id

  • Relative URL of a portal component, such as /irj/servlet/prt/portal/prtroot/application_id.component_id

  • URL of a Web site

launchMode ( ViewOption only)

Defines how to launch the view. Possible string values are as follows:

  • inPlace

  • inPlaceMax

  • newWindow


Defines the workspace user role(s) for which this option is available: workspace members, or managers, or both managers and members.

Possible values are defined by the following constants in the TrayOptions object:

  • EPCM.getSAPTop().TrayOptions.FOR_MEMBER

  • EPCM.getSAPTop().TrayOptions.FOR_MANAGER


TrayOptions Object

Serves as a factory for creating and adding options to the module tray menu. To use the methods of the TrayOptions object, obtain a reference to the object as follows:

var trayOptionsManager = EPCM.getSAPTop().TrayOptions;

createAction(text, position, moduleID, callback, roleAvailability)

Creates an ActionOption object.


See the above table.

createView (text, position, moduleID, URL, launchMode, roleAvailability)

Creates a ViewOption object.


See the above table.

addOptions (options)

Adds the specified options to the module tray.


options: An array of options, both actions and views


Note that tray options created with the help of this API appear only in the module view in which they were added. The options are lost when the user navigates to a different module view.