用于获取特定选项卡的应用程序名称的 SOQL 查询

SOQL Query for getting the Application name of a Particular Tab

我想获取特定 sObject 的应用程序名称。例如:我有一个名为 Candidate__c 的自定义对象。如何以编程方式获取 Candidate__c 的应用程序名称? 我也对使用模式命名空间等任何方法持开放态度。

我正在回答我的问题。我使用 Schema.describeTabs() 并且效果很好,但是 Docthe DescribeTabs method returns the minimum required metadata that can be used to render apps ... 基本上,All Tabs 不包含在描述的选项卡列表中。结果取决于 运行 用户可用的应用程序。

// Get tab set describes for each app
List<Schema.DescribeTabSetResult> allApps = Schema.describeTabs();

// Iterate through each tab set describe for each app
for (Schema.DescribeTabSetResult oneApp : allApps) {
    System.debug('The tabs/objects associated with the' + oneApp.getLabel() + ' app are:');
    List<Schema.DescribeTabResult> appTabs = oneApp.getTabs();
    for (Integer i = 0; i < appTabs.size(); i++) {
        System.debug((i + 1) + '. Tab Name: ' + appTabs[i].getLabel());
    }
}