• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialdevelopment

platform-list-view-generate

プラグイン
salesforce-development
ソース
GitHub で見る ↗
説明

次のような場合に使用します: ユーザーが 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のリストビューメタデータを作成・生成したいとき
  • レコード一覧をフィルター条件で絞り込みたいとき
  • リストビューの表示設定やカラム構成を整えたいとき
  • ListViewファイルの検証やトラブルシューティングが必要なとき
本文(日本語訳)

Salesforceリストビューのスキル

このスキルを使う場合

次のような場合に使用してください:

  • オブジェクトのリストビュー(データの一覧表示)を作成する
  • フィルター機能付きで、特定の列を表示したレコード一覧を生成する
  • リストビューの表示範囲と共有設定を変更する
  • リストビューに関連するデプロイメント(本番環境へのアップロード)エラーを解決する

仕様

Salesforceリストビューメタデータの知識

概要

Salesforceのリストビューは、オブジェクトのタブに表示されるデータの一覧です。フィルター機能と、表示する列を自由に設定できます。

目的

  • 役職や担当業務ごとに必要なレコードだけを表示する
  • よく使うフィルター条件と表示列をチーム全体で統一する

設定

ユーザーから特別な指示がない場合、リストビューは以下の場所に保存されます:

  • force-app/main/default/objects/<オブジェクト名>/listViews/<名前>.listView-meta.xml

ユーザーが明確に希望した場合のみ、オブジェクトのメタデータファイルに含めます:

  • force-app/main/default/objects/<オブジェクト名>/<オブジェクト名>.object-meta.xml

主な設定項目:

  • label: 画面に表示される見出し(40文字以内)
  • fullName: メタデータとファイル名で使う識別子(システム用)
  • filterScope: 表示対象を「すべてのレコード」「自分のレコード」「キュー」から選ぶ
  • filters: フィルター条件(項目・演算子・値の3つ組)
  • booleanFilterLogic: 複数フィルターをAND/ORで組み合わせる(例: 「1 AND (2 OR 3)」)
  • columns: 表示する項目をAPI名で順番に並べる

参照:

  • リストビューはオブジェクトのタブに表示されます
  • フレックスページから「filterListCard」コンポーネントで参照できます

重要な判断1: 表示範囲をどこまでにするか

「すべてのユーザーに表示」を選ぶ場合:

  • 多くの職種や担当者に役立つ内容である
  • チーム全体で使う正式な設定として、ソースコード管理で管理したい
  • 表示される情報が社内で広く共有してよい

「作成者のみ」または「限定公開」を選ぶ場合:

  • まだ試験段階または限られた用途である
  • ユーザー・グループ・役職ごとに限定してほしいと明確に言われている
  • ガバナンス(運用規則)やセキュリティ審査が進行中である

迷った場合: 「すべてのユーザーに表示」を既定値にしてください。

重要な判断2: 表示する列の数をどの程度にするか

少なく、重要な情報に絞る場合:

  • ユーザーが一目で内容を把握する必要がある
  • スマートフォンなど小さい画面での利用を想定している

より多くの列を表示する場合:

  • デスクトップ中心の業務で、レコードを開かずに判断したい
  • 作業用キューとして使い、列を増やすことで手作業の手数を減らしたい

迷った場合: 4~6列から始めて、主な業務目的に直結した項目に絞ってください。

重要なルール(最初に読んでください)

ルール1: カスタム項目はAPI名を使う

カスタム項目には、見出しではなく必ずAPI名を使ってください。

間違い:

  • Status(見出し)

正解:

  • Status__c(API名)

ルール2: 標準項目は定義済みの名前を使う

カスタムオブジェクトの標準項目には、既に決まった名前を使ってください:

間違い:

  • Name(API名)

正解:

  • NAME

カスタムオブジェクトの標準項目:

  • NAME
  • RECORDTYPE
  • OWNER.ALIAS
  • OWNER.FIRST_NAME
  • OWNER.LAST_NAME
  • CREATEDBY_USER.ALIAS
  • CREATEDBY_USER
  • CREATED_DATE
  • UPDATEDBY_USER.ALIAS
  • UPDATEDBY_USER
  • LAST_UPDATE
  • LAST_ACTIVITY

ルール3: 演算子は項目の種類に合わせる

選択肢型の項目には「等しい」「等しくない」、日付型には日付専用の演算子、チェックボックス型には0か1を使ってください。

間違い:

  • 選択肢型に「含む」を使う
  • チェックボックス型に「True」を使う

正解:

  • 選択肢型に「等しい」と有効な値を使う
  • チェックボックス型に「1」を使う

ルール4: ファイル名と内部識別子を一致させる

ファイル名、fullName(内部識別子)、一意性をすべて合わせてください。

間違い:

  • ファイル: My_List.listView-meta.xml
  • fullName: MyList

正解:

  • ファイル: MyList.listView-meta.xml
  • fullName: MyList

ルール5: ファイルの保存場所

ファイルはオブジェクトのlistViewsフォルダ直下に置かなければ、デプロイメント時にエラーになります。ユーザーから明確に希望された場合のみ、force-app/main/default/objects/<オブジェクト名>/<オブジェクト名>.object-meta.xmlに含めることができます。

保存場所:

  • force-app/main/default/objects/<オブジェクト名>/listViews/<fullName>.listView-meta.xml

作成の流れ

ステップ1: メタデータ情報を集める

  • 対象のオブジェクトのAPI名を特定する(例: Object__c)
  • 要件を確認する: 目的、利用者、表示項目、フィルター条件
  • 値と演算子が項目の種類に合っているか確認する

ステップ2: 既存の例を確認する

  • リポジトリ: force-app/main/default/objects/<オブジェクト名>/listViews/(ユーザーから別の指示がない場合)
  • 本番環境: 既存のリストビューを参考にして、審査を通り、使いやすい設定を学ぶ

ステップ3: 仕様を文書化する

実装前に以下を整理してください:

  • 名前: fullNameとラベル
  • 利用者: 表示範囲(全員か限定か)
  • フィルター対象: 「すべて」「自分のみ」「キュー」
  • フィルター条件: 項目・演算子・値、複数の場合はbooleanFilterLogic
  • 表示列: 項目のAPI名を順番に並べたリスト
  • 成功基準: どのレコードが表示されるか、ページネーション、主なシナリオ

ステップ4: メタデータファイルを作成する

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>

注記:

  • 「自分のレコード」用の場合、filterScope="Mine"にしてください
  • 表示列は絞り込み、必要なもののみにしてください
  • すべてのユーザーに表示する場合、「sharedTo」セクションは削除してください

ステップ5: ローカルで検証する

  • XMLが正しい形式で、名前空間が正しい
  • 項目がオブジェクトに存在し、演算子と値が項目の種類に合っている
  • ファイルパスとfullNameが一致している
  • 複数フィルターの場合、booleanFilterLogicが正しい(例: 「1 AND (2 OR 3)」)

ステップ6: 本番環境にデプロイして確認する

  • ファイルまたはオブジェクト全体をデプロイする
  • 画面でオブジェクトのタブを開いて確認:
    • 表示されるレコードがフィルター条件に合っている
    • 列が正しく表示されている
    • 表示範囲が想定通りである

よくあるデプロイメントエラーと対処法

エラー 原因 対処法
「無効な項目 Status」 見出しを使った、またはカスタムオブジェクトの標準項目でAPI名を使った Status__c(またはAPI名)、または NAME(Name ではなく)を使う
「無効なフィルター演算子」 項目の種類に合わない演算子を使った 項目に合う演算子を選ぶ(例: 選択肢型には「等しい」)
「コンポーネントがパスに見つかりません」 フォルダやファイル名が間違っている objects/<オブジェクト名>/listViews に置き、ファイル名をfullNameに合わせる
「booleanFilterLogicが正しくない」 文法またはフィルター番号がずれている 「1 AND 2」形式を使い、フィルターの番号順と個数が一致していることを確認する

チェックリスト

  • [ ] 必須項目がすべて入力されている(fullName、label、filterScope、columns)
  • [ ] 値が必要な箇所でXMLエンコードされている
  • [ ] カスタム項目がAPI名で参照されている(例: Status__c)
  • [ ] 標準項目が定義済み名で参照されている(例: NAME)
  • [ ] 演算子が項目の種類に合っており、選択肢の値が有効である
  • [ ] booleanFilterLogic(使用する場合)がフィルターの順番と個数に合っている
  • [ ] ファイルパスとfullName/DeveloperNameが一致している
  • [ ] 非推奨またはClassic専用のプロパティが含まれていない
  • [ ] デプロイメントが成功し、想定どおりに表示されている
  • [ ] レコード・列・フィルター動作が仕様通りである
原文(English)を表示

When to Use This Skill

Use this skill when you need to:

  • Create list views for objects
  • Generate filtered, column-based record listings
  • Configure list view visibility and sharing
  • Troubleshoot deployment errors related to List Views

Specification

Salesforce List View Metadata Knowledge

Overview

Salesforce List Views define filtered, column-based record listings on an object's tab.

Purpose

  • Provide curated, role- or task-specific subsets of records
  • Standardize commonly used filters and visible fields across teams

Configuration

Unless specifically requested to be generated inline, List Views are stored at:

  • force-app/main/default/objects/<ObjectName>/listViews/<fullName>.listView-meta.xml Only if the user requests are they to be included in the object's metadata file:
  • fore-app/main/default/objects/<ObjectName>/<ObjectName>.object-meta.xml

Key elements:

  • label: Human-friendly name shown in UI (must be under 40 characters in length)
  • fullName (fullName): API identifier used in metadata and file name
  • filterScope: Everything | Mine | Queue
  • filters: field/operation/value triples
  • booleanFilterLogic: Combine multiple filters logically with AND/OR (e.g., "1 AND (2 OR 3)")
  • columns: Ordered list of field API names to display

References:

  • listViews appear on the entity's tab
  • listViews can be referenced by flexipages using the "filterListCard" component

Critical Decision: Visibility Strategy

Choose how broadly the view should appear in the org.

Choose "Visible to all users" when:

  • The view is useful across profiles/roles
  • It's a governed, shared artifact to be managed via source control
  • Data contained is appropriate for broad visibility

Choose "Owner-only/Restricted" when:

  • It is experimental or niche during iteration
  • It is specifically requested to be limited to Users, Groups or Roles
  • There are governance/security reviews pending

When in doubt: Default to "Visible to all users".

Critical Decision: Columns Density

Choose minimal, high-signal columns when:

  • Users need at-a-glance scanning
  • Mobile/responsive performance matters

Choose richer column sets when:

  • Desktop heavy workflows need more context without opening records
  • It serves as a work queue and extra fields reduce clicks

When in doubt: Start with 4–6 columns that directly support the primary task.

Critical Rules (Read First)

Rule 1: Custom Field API Names

For custom fields, use exact API names (e.g., Status__c), not labels.

Wrong:

  • Status (label)

Right:

  • Status__c (API name)

Rule 2: Standard Field Names

For standard fields on Custom Objects, use already defined names:

Wrong:

  • Name (API Name)

Right:

  • NAME

The standard fields on Custom Objects are:

  • NAME
  • RECORDTYPE
  • OWNER.ALIAS
  • OWNER.FIRST_NAME
  • OWNER.LAST_NAME
  • CREATEDBY_USER.ALIAS
  • CREATEDBY_USER
  • CREATED_DATE
  • UPDATEDBY_USER.ALIAS
  • UPDATEDBY_USER
  • LAST_UPDATE
  • LAST_ACTIVITY

Rule 3: Operations Must Match Field Types

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:

  • operation="contains" on a picklist
  • value=True on a boolean

Right:

  • operation="equals" with a valid picklist value
  • value=1 on a boolean

Rule 4: Name and Path Alignment

File name, fullName (also sometimes referred to as DeveloperName), and uniqueness must align.

Wrong:

  • File: My_List.listView-meta.xml
  • fullName: MyList

Right:

  • File: MyList.listView-meta.xml
  • fullName: MyList

Rule 5: Folder Placement

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:

  • force-app/main/default/objects/<ObjectName>/listViews/<fullName>.listView-meta.xml

Generation Workflow

Step 1: Get Metadata Information

  • Identify the target object API name (e.g., Object__c).
  • Gather business requirements: purpose, audience, fields, filters.
  • Validate values and operator compatibility with field types.

Step 2: Examine Existing Examples

  • Repo: force-app/main/default/objects/<Object>/listViews/ (unless otherwise required by end user)
  • Org: retrieve existing list views for proven patterns (filters, logic, columns).
  • Note what passed review/deployment and delivered expected UX.

Step 3: Create Specification

Document before implementation:

  • Name: fullName and Label
  • Audience: Visibility scope ("all users" vs. shared)
  • Filter scope: Everything | Mine | Queue
  • Filter items: filter, operator, value; plus booleanFilterLogic if multiple
  • Columns: Ordered list of field API names
  • Acceptance criteria: Which records appear, paging behavior, key scenarios

Step 4: Author Metadata File

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:

  • For "My" views, use filterScope="Mine".
  • Keep columns tight and purposeful.
  • If intended for all users, omit the "sharedTo" section.

Step 5: Validate Locally

  • Well-formed XML; correct namespace
  • Field names exist on the object; operators and values match field types
  • Path and fullName alignment
  • If multiple filters: set booleanFilterLogic correctly (e.g., "1 AND (2 OR 3)")

Step 6: Deploy and Verify in Org

  • Deploy the component path or the whole object.
  • In the UI, open the object tab and:
    • Confirm records match filters
    • Confirm columns render correctly
    • Confirm visibility matches audience

Common Deployment Errors

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

Verification Checklist

  • [ ] All required fields populated (fullName, label, filterScope, columns)
  • [ ] Property values are XML-encoded where needed
  • [ ] Custom Field references use API names (e.g., Status__c)
  • [ ] Standard Field references use defined names (e.g., NAME)
  • [ ] Operations match field types; picklist values are valid
  • [ ] booleanFilterLogic (if used) matches filters ordering and count
  • [ ] File path and fullName/developerName are aligned
  • [ ] No deprecated or Classic-only properties included
  • [ ] Deployed successfully and visible as intended
  • [ ] Records, columns, and filtering behave as specified

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。