次のような場合に使用します: ユーザーが Salesforce のリストビュー(特定の条件で絞り込まれたレコード一覧)メタデータの作成・生成・検証が必要なとき。ユーザーがリストビュー、フィルター済みレコード一覧、ビューの作成、レコード列の設定、条件によるレコードの絞り込み、リストビューの表示範囲について言及したときに起動します。 また、ユーザーが「〇〇を表示するビューが欲しい」「レコードを△△でフィルターしたい」「□□のためにリストビューを作成したい」といったことを述べたり、ListView XML ファイルを扱っていて検証やトラブルシューティングが必要なときも対象です。
Use this skill when users need to create, generate, or validate Salesforce List View metadata. Trigger when users mention list views, filtered record lists, creating views, setting up record columns, filtering records by criteria, or ask about list view visibility. Also use when users say things like "I need a view that shows...", "filter records by...", "create a list view for...", or when they're working with ListView XML files and need validation or troubleshooting.
次のような場合に使用してください:
Salesforceのリストビューは、オブジェクトのタブに表示されるデータの一覧です。フィルター機能と、表示する列を自由に設定できます。
ユーザーから特別な指示がない場合、リストビューは以下の場所に保存されます:
ユーザーが明確に希望した場合のみ、オブジェクトのメタデータファイルに含めます:
主な設定項目:
参照:
「すべてのユーザーに表示」を選ぶ場合:
「作成者のみ」または「限定公開」を選ぶ場合:
迷った場合: 「すべてのユーザーに表示」を既定値にしてください。
少なく、重要な情報に絞る場合:
より多くの列を表示する場合:
迷った場合: 4~6列から始めて、主な業務目的に直結した項目に絞ってください。
カスタム項目には、見出しではなく必ずAPI名を使ってください。
間違い:
正解:
カスタムオブジェクトの標準項目には、既に決まった名前を使ってください:
間違い:
正解:
カスタムオブジェクトの標準項目:
選択肢型の項目には「等しい」「等しくない」、日付型には日付専用の演算子、チェックボックス型には0か1を使ってください。
間違い:
正解:
ファイル名、fullName(内部識別子)、一意性をすべて合わせてください。
間違い:
正解:
ファイルはオブジェクトのlistViewsフォルダ直下に置かなければ、デプロイメント時にエラーになります。ユーザーから明確に希望された場合のみ、force-app/main/default/objects/<オブジェクト名>/<オブジェクト名>.object-meta.xmlに含めることができます。
保存場所:
実装前に以下を整理してください:
Lightningに対応したテンプレートを使い、正しいXMLにします:
<?xml version="1.0" encoding="UTF-8"?>
<ListView xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>OpenMine</fullName>
<label>Open - My Records</label>
<filterScope>Mine</filterScope>
<columns>NAME</columns>
<columns>Status__c</columns>
<columns>OWNER.ALIAS</columns>
<columns>LAST_UPDATE</columns>
<filters>
<field>Status__c</field>
<operation>equals</operation>
<value>Open</value>
</filters>
<sharedTo>
<role>CEO</role>
<roleAndSubordinatesInternal>COO</roleAndSubordinatesInternal>
</sharedTo>
</ListView>
注記:
| エラー | 原因 | 対処法 |
|---|---|---|
| 「無効な項目 Status」 | 見出しを使った、またはカスタムオブジェクトの標準項目でAPI名を使った | Status__c(またはAPI名)、または NAME(Name ではなく)を使う |
| 「無効なフィルター演算子」 | 項目の種類に合わない演算子を使った | 項目に合う演算子を選ぶ(例: 選択肢型には「等しい」) |
| 「コンポーネントがパスに見つかりません」 | フォルダやファイル名が間違っている | objects/<オブジェクト名>/listViews に置き、ファイル名をfullNameに合わせる |
| 「booleanFilterLogicが正しくない」 | 文法またはフィルター番号がずれている | 「1 AND 2」形式を使い、フィルターの番号順と個数が一致していることを確認する |
Use this skill when you need to:
Salesforce List Views define filtered, column-based record listings on an object's tab.
Unless specifically requested to be generated inline, List Views are stored at:
Key elements:
References:
Choose how broadly the view should appear in the org.
Choose "Visible to all users" when:
Choose "Owner-only/Restricted" when:
When in doubt: Default to "Visible to all users".
Choose minimal, high-signal columns when:
Choose richer column sets when:
When in doubt: Start with 4–6 columns that directly support the primary task.
For custom fields, use exact API names (e.g., Status__c), not labels.
Wrong:
Right:
For standard fields on Custom Objects, use already defined names:
Wrong:
Right:
The standard fields on Custom Objects are:
Picklists require equals/notEqual; date fields require date operators; boolean values are 0 and 1; do not mix text-only operators with non-text fields.
Wrong:
Right:
File name, fullName (also sometimes referred to as DeveloperName), and uniqueness must align.
Wrong:
Right:
Place files under the object's listViews directory or deployments will fail to resolve components. Only if a user requests it, may the listView may be included inline in force-app/main/default/objects/<ObjectName>/<ObjectName>.object-meta.xml
Path:
Document before implementation:
Use a Lightning-compatible template and ensure valid XML:
<?xml version="1.0" encoding="UTF-8"?>
<ListView xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>OpenMine</fullName>
<label>Open - My Records</label>
<filterScope>Mine</filterScope>
<columns>NAME</columns>
<columns>Status__c</columns>
<columns>OWNER.ALIAS</columns>
<columns>LAST_UPDATE</columns>
<filters>
<field>Status__c</field>
<operation>equals</operation>
<value>Open</value>
</filters>
<sharedTo>
<role>CEO</role>
<roleAndSubordinatesInternal>COO</roleAndSubordinatesInternal>
</sharedTo>
</ListView>
Notes:
| Error | Cause | Fix |
|---|---|---|
| "Invalid field Status" | Used label instead of API name, or used API Name instead of defined name for Standard Field | Use Status__c (or correct API name), or NAME instead of Name (for Standard Fields) |
| "Invalid filter operator" | Operator not valid for field type | Choose operation compatible with field type (e.g., equals for picklist) |
| "Component not found at path" | Wrong folder or file name | Place in objects/<Object>/listViews and align file name with fullName |
| "Malformed booleanFilterLogic" | Syntax or index mismatch | Use "1 AND 2" style, ensure filters index order matches |
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。