Skip to main content
Used to control the main (left-side) menu of SuperOffice CRM. Customizing the main menu means modifying the corresponding trigger.

Constructors

Initializes a new instance of the MainMenu class.

Methods

addGroup(String,String)

Adds a group to the main menu (navigator) with the given label and image. By default, it appends the item to the bottom of the main menu. Use one of the other addGroup variants to specify the exact position or on-click JavaScript code.
Returns: CRMScript.Global.Void
The image is specified by the URL to the actual file.
Example:

addGroup(String,String,Integer)

Adds a group to the main menu (navigator) with the given label and image in a specific position. This will shift the index of all subsequent groups. Thus, you should not make assumptions about which slot a group is in.
Returns: CRMScript.Global.Void
The image is specified by the URL to the actual file.
Example:

addGroup(String,String,Integer,String)

Adds a group to the main menu (navigator) with the given label and image in a specific position. This will shift the index of all subsequent groups. Thus, you should not make assumptions about which slot a group is in. In addition, you can specify on-click JavaScript code. Use this to create clickable menu groups.
Returns: CRMScript.Global.Void
The image is specified by the URL to the actual file.
Example:

addItem(String,String)

Adds an item to the SuperOffice main menu (navigator).
Returns: CRMScript.Global.Void Example:

addItem(String,String,Integer,Integer)

Adds an item to the SuperOffice main menu (navigator).
Returns: CRMScript.Global.Void Example:

addItem(String,String,Integer,Integer,String,String,String)

Adds an item to the SuperOffice main menu (navigator).
Returns: CRMScript.Global.Void Example:

addItem(String,String,Integer,Integer,String,String,String,String)

Adds an item to the SuperOffice main menu (navigator).
Returns: CRMScript.Global.Void
The image is specified by the URL to the actual file.
Example:

clear()

Clears all the contents of the menu.
Returns: CRMScript.Global.Void

deleteGroup(Integer)

Removes the group at the given index (starts at 0) from the main menu.
Returns: CRMScript.Global.Void
Verify that you’re removing the correct group by checking with getGroupId() what’s in that slot first.
Example:

deleteItem(Integer,Integer)

Removes the item at the given index from the group.
Returns: CRMScript.Global.Void

getGroupId(Integer)

Returns the label (ID) of a group in the main menu given its position.
Returns: CRMScript.Global.String
The IDs are unique strings starting at zero.
Example:

getGroupIndex()

Returns the position of a specific group in the main menu given its label (ID)
Returns: CRMScript.Global.Integer - The position of a specific group in the main menu. Example:

getItemId(Integer,Integer)

Returns the label (ID) of an item in a group given its position.
Returns: CRMScript.Global.String - The label (ID) of an item. Example:

getItemIndex(Integer,String)

Returns the position of a specific item in the group given its label (ID).
Returns: CRMScript.Global.Integer - The position of a specific item. Example:

getNumGroups()

Returns the current number of groups in the main menu.
Returns: CRMScript.Global.Integer Example:

getNumItems(Integer)

Returns the current number of items in the group.
Returns: CRMScript.Global.Integer - The number of items in the group. Example: