# Salesforce List Views

> Create and modify list views — column references, filter logic, queue-based views

- **Type:** Skill
- **Install:** `agentstack add skill-jhillock1-salesforce-claude-skills-salesforce-list-views`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [jhillock1](https://agentstack.voostack.com/s/jhillock1)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [jhillock1](https://github.com/jhillock1)
- **Source:** https://github.com/jhillock1/salesforce-claude-skills/tree/main/skills/salesforce-list-views

## Install

```sh
agentstack add skill-jhillock1-salesforce-claude-skills-salesforce-list-views
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Salesforce List Views

## When to Use
- Creating new list views for an object
- Adding/removing columns from list views
- Setting up queue-specific list views
- Fixing column reference errors

## Critical Knowledge

### Column API Names Are NOT Always Obvious
List view columns use a special naming convention that differs from field API names.

**Common Case columns:**
| Display Name | Column API Name | Notes |
|-------------|----------------|-------|
| Case Number | CASES.CASE_NUMBER | |
| Subject | CASES.SUBJECT | |
| Status | CASES.STATUS | |
| Priority | CASES.PRIORITY | |
| Owner | CORE.USERS.ALIAS | Owner alias |
| Owner (Full Name) | OWNER.ALIAS | Alternative |
| Created Date | CASES.CREATED_DATE | |
| Date/Time Opened | CASES.CREATED_DATE_DATE_ONLY | |
| Case Origin | CASES.ORIGIN | |
| Account Name | ACCOUNT.NAME | Via Account lookup |
| Contact Name | NAME | ⚠️ NOT `CASES.CONTACT` |

**Custom fields:** Use the API name directly: `Waiting_On__c`, `Needs_Attention__c`

⚠️ **Some standard fields DON'T work as list view columns.** If deploy fails with a column reference, remove it and try an alternative.

### List View XML Template
```xml

    Needs_Attention
    Needs Attention
    Mine
    CASES.CASE_NUMBER
    CASES.SUBJECT
    CASES.STATUS
    Waiting_On__c
    CORE.USERS.ALIAS
    CASES.CREATED_DATE
    
        Needs_Attention__c
        equals
        1
    
    
        CASES.STATUS
        notEqual
        Closed,Merged
    

```

**File location:** `force-app/main/default/objects/Case/listViews/Needs_Attention.listView-meta.xml`

### Filter Scope Options
| `` | Meaning |
|-----------------|---------|
| `Mine` | Records owned by current user |
| `Queue` | Records owned by a specific queue |
| `Everything` | All records visible to user |
| `MineAndMyGroups` | User's records + their queue records |

### Queue-Specific List View
```xml

    Queue_Customer_Support
    Queue: Customer Support
    Queue
    Customer_Support
    CASES.CASE_NUMBER
    CASES.SUBJECT
    CASES.STATUS
    CORE.USERS.ALIAS
    CASES.CREATED_DATE
    
        CASES.STATUS
        notEqual
        Closed,Merged
    

```

**Key:** `` uses the Queue's **DeveloperName**, not the display label.

Find queue developer names:
```bash
sf data query --query "SELECT Id, Name, DeveloperName FROM Group WHERE Type = 'Queue'" --target-org 
```

## Recipes

### Create a List View
1. Write the XML file to `force-app/main/default/objects//listViews/.listView-meta.xml`
2. Deploy:
   ```bash
   sf project deploy start --source-dir force-app/main/default/objects/Case/listViews/Needs_Attention.listView-meta.xml --target-org 
   ```

### Add a Column to Existing List View
1. Retrieve it:
   ```bash
   sf project retrieve start --metadata "ListView:Case.Needs_Attention" --target-org 
   ```
2. Add a `` element (order = display order)
3. Redeploy

### Validate List View Shows Correct Data
```bash
# Replicate the filter logic in SOQL
sf data query --query "SELECT CaseNumber, Subject, Status, Owner.Name FROM Case WHERE Needs_Attention__c = true AND OwnerId = '' ORDER BY CreatedDate DESC" --target-org 
```

Compare the SOQL results with what appears in the list view UI.

## Common Pitfalls

| Pitfall | Fix |
|---------|-----|
| Column "not found" on deploy | Check the column API names table above; some standard fields have non-obvious names |
| `CASES.CONTACT` doesn't work | Use `NAME` for Contact Name |
| Queue list view is empty | Check `` uses DeveloperName not label; verify queue exists |
| Filter not working | Boolean fields use `1`/`0` not `true`/`false` |
| Custom field not showing | Use API name directly: `My_Field__c` (no prefix) |

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [jhillock1](https://github.com/jhillock1)
- **Source:** [jhillock1/salesforce-claude-skills](https://github.com/jhillock1/salesforce-claude-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-jhillock1-salesforce-claude-skills-salesforce-list-views
- Seller: https://agentstack.voostack.com/s/jhillock1
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
