describeSearchLayouts()
1 つ以上のオブジェクトの検索結果レイアウト設定を取得します。
構文
1DescribeSearchLayoutResult[] = binding.describeSearchLayouts(string sObjectType[]);使用方法
describeSearchLayouts() は、1 つ以上のオブジェクトの検索結果レイアウト情報を取得するために使用します。このコールは、Salesforce の場合と同じレイアウト設定でカスタム検索結果ページを作成する場合に便利です。
サンプル
このサンプルは、オブジェクトのリストについて検索結果レイアウト情報を取得する方法を示します。
1public void describeSearchLayoutSample(String[] sObjectTypes) {
2 try {
3 // Get the search layout of Account and Group
4 DescribeSearchLayoutResult[] searchLayoutResults = connection.describeSearchLayouts(sObjectTypes);
5 // Iterate through the results and display the label of each column
6 for (int i = 0; i < sObjectTypes.length; i += 1) {
7 String sObjectType = sObjectTypes[i];
8 DescribeSearchLayoutResult result = searchLayoutResults[i];
9 System.out.println("Top label for search results for " + sObjectType + " is " + result.getLabel() + " and should display " + result.getLimitRows() + " rows");
10 System.out.println("Column labels for search results for " + sObjectType + " are: ");
11 for (DescribeColumn column : result.getSearchColumns()) {
12 System.out.println(column.getLabel());
13 }
14 }
15 } catch (ConnectionException ce) {
16 ce.printStackTrace();
17 }
18 }引数
| 名前 | 型 | 説明 |
|---|---|---|
| sObjectType | string[] | 検索結果レイアウト設定を取得するオブジェクトのリスト。たとえば、オブジェクトが個人取引先である場合は Account と指定し、個人取引先責任者である場合、Contact と指定します。指定する値は、組織内で有効なオブジェクトである必要があります。すべての標準オブジェクトの一覧は、「標準オブジェクト」を参照してください。 |