Newer Version Available
AppMenu
File Suffix and Directory Location
Each AppMenu component gets stored in a single file in the folder of the corresponding package directory. The filename uses the format Feature.appMenu.
- There’s one app switcher app menu file stored in a file named AppSwitcher.appMenu.
- There’s one Salesforce app menu file stored in a file named Salesforce1.appMenu.
These two files are located in the appMenus folder. The .appMenu files are different from other named components, as there’s only one file for each AppMenu component. App menu files can’t be created or deleted.
Version
AppMenu components are available in API version 30.0 and later.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| appMenuItems | AppMenuItem[] | A list of menu items in the app menu. |
AppMenuItem
Represents a menu item in the app menu.
| Field Name | Field Type | Description |
|---|---|---|
| name | string | The API name of the item. |
| type | string | The type of application represented by this item. Acceptable values
for AppSwitcher.appMenu are:
Acceptable values for
Salesforce1.appMenu are:
|
Declarative Metadata Sample Definition
The following is an example of an AppSwitcher.appMenu file.
1<?xml version="1.0" encoding="UTF-8"?>
2<AppMenu xmlns="http://soap.sforce.com/2006/04/metadata">
3 <appMenuItems>
4 <appMenuItem>
5 <name>standard__Sales</name>
6 <type>CustomApplication</type>
7 </appMenuItem>
8 <appMenuItem>
9 <name>standard__Support</name>
10 <type>CustomApplication</type>
11 </appMenuItem>
12 <appMenuItem>
13 <name>CustomApp1</name>
14 <type>CustomApplication</type>
15 </appMenuItem>
16 <appMenuItem>
17 <name>CustomApp2</name>
18 <type>CustomApplication</type>
19 </appMenuItem>
20 <appMenuItem>
21 <name>ConnectedApp1</name>
22 <type>ConnectedApp</type>
23 </appMenuItem>
24 </appMenuItems>
25</AppMenu>The following is an example package.xml that references the previous definition.
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <members>AppSwitcher</members>
5 <name>AppMenu</name>
6 </types>The following is an example of a Salesforce1.appMenu component.
1<?xml version="1.0" encoding="UTF-8"?>
2<AppMenu xmlns="http://soap.sforce.com/2006/04/metadata">
3 <appMenuItems>
4 <appMenuItem>
5 <name>StandardItem1</name>
6 <type>StandardAppMenuItem</type>
7 </appMenuItem>
8 <appMenuItem>
9 <name>StandardItem2</name>
10 <type>StandardAppMenuItem</type>
11 </appMenuItem>
12 <appMenuItem>
13 <name>StandardItem3</name>
14 <type>StandardAppMenuItem</type>
15 </appMenuItem>
16 <appMenuItem>
17 <name>CustomTab1</name>
18 <type>CustomTab</type>
19 </appMenuItem>
20 </appMenuItems>
21</AppMenu>The following is an example package.xml that references the previous definition.
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <members>Salesforce1</members>
5 <name>AppMenu</name>
6 </types>The following is an example of a package manifest used to deploy or retrieve all the available app menu metadata for an organization, using a wildcard:
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <members>*</members>
5 <name>AppMenu</name>
6 </types>
7 <version>30.0</version>
8</Package>Usage
Use AppSwitcher.appMenu to reorder the list of menu items that appears in the app menu. You can’t add app menu items to or remove app menu items from AppSwitcher.appMenu.
Use Salesforce1.appMenu to customize the list of menu items that appears in the Salesforce navigation menu by reordering, adding, or removing the app menu items.
Wildcard Support in the Manifest File
This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.