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.
describeAppMenu()
This call is available in API version 29.0 and later.
If you’re accessing the API using a custom community URL, the describeAppMenu() call retrieves the tab set associated with the community ID you specify.
Syntax
1DescribeAppMenuResult describeResult = connection.describeAppMenu(String appMenuType, String networkId);Code Sample—Java
This code sample shows how to get the menu items from the Salesforce mobile app navigation menu.
1public void describeAppMenu() {
2 try {
3 //The following two lines are equivalent
4 DescribeAppMenuResult describe = connection.describeAppMenu("Salesforce1", "");
5 DescribeAppMenuResult appMenu = getClient().describeAppMenu(AppMenuType.Salesforce1);
6
7 for (DescribeAppMenuItem menuItem : appMenu.getAppMenuItems()) {
8
9 if (menuItem.getType() == "Tab.apexPage") {
10
11 String visualforceUrl = menuItem.getContent();
12
13 System.out.println("URL to Visualforce page: " + visualforceUrl);
14
15 }
16
17 }
18
19 } catch (ConnectionException ce) {
20 ce.printStackTrace();
21 }
22}