Platform list view generate

From forcedotcom/sf-skills · View interactive version

Platform list view generate is an AI agent skill from the GitHub repository forcedotcom/sf-skills. 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 lik

How to use this skill

Skill file

When to Use This Skill

Use this skill when you need to:

Specification

Salesforce List View Metadata Knowledge

Overview

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

Purpose

Configuration

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

Only if the user requests are they to be included in the object's metadata file:

Key elements:

References:

Critical Decision: Visibility Strategy

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".

Critical Decision: Columns Density

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.

Critical Rules (Read First)

Rule 1: Custom Field API Names

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

Wrong:

Right:

Rule 2: Standard Field Names

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

Wrong:

Right:

The standard fields on Custom Objects are:

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:

Right:

Rule 4: Name and Path Alignment

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

Wrong:

Right:

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:

Generation Workflow

Step 1: Get Metadata Information

Step 2: Examine Existing Examples

Step 3: Create Specification

Document before implementation:

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:

Step 5: Validate Locally

Step 6: Deploy and Verify in Org

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

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.