Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
MenuItem
This object is available in API version 32.0 and later.
Supported SOAP Calls
query(), update()
Supported REST HTTP Methods
GET, POST
Fields
| Field | Details |
|---|---|
| Active |
|
| AppId |
|
| Color |
|
| IconURL |
|
| Label |
|
| MenuType |
|
| SortOrder |
|
| Theme |
|
Usage
MenuItem can be queried and manipulated to change how menu items appear in Salesforce. The following example modifies the Salesforce mobile app navigation menu.
1String query = "SELECT AppId, Label, Active, SortOrder FROM MenuItem "
2+
3 "WHERE MenuType = 'Salesforce'";
4SObject[] records = sforce.query(query).getRecords();
5
6//Activate all menu items
7for (int i = 0; i < records.length; i++) {
8 MenuItem item = (MenuItem)records[i];
9 item.setOrder(i + 1);
10 item.setActive(true);
11}
12
13sforce.update(records);