Validate metadata against a Salesforce org using the Salesforce CLI (sf).
Requirement: Salesforce CLI (sf) on PATH and an authenticated org.
Panel (recommended)
IAPL: Open Validate Panel (also via the $(beaker) SF Validate status bar item) opens a UI with:
- Org selector (from
sf org list) - Delta tab: load changes vs a base branch, pick files with checkboxes (grouped by metadata type)
- Manifest tab: pick any
package*.xmlin the repo - Test level radio + editable test list. RunRelevantTests (default; Salesforce Beta, Spring '26) lets the org infer relevant tests via dependency analysis. For RunSpecifiedTests, the "Detectar relevantes" button pre-fills the list locally: test classes in the delta, name matches (
Foo→FooTest/Foo_Test/FooTests) and test classes referencing the changed classes - Buttons: Validar, Generar package.xml (manifest from the selected files via
sf project generate manifest), Cancelar - Live status while validating (async job + poll of
sf project deploy report): component/test progress bars - Final result rendered in the panel: component errors, failed tests with stack traces, and per-class code coverage (red under 75%) with overall run coverage
Commands (Ctrl+Shift+P)
| Command | What it does |
|---|---|
| IAPL: Open Validate Panel | Opens the panel above. |
| IAPL: Validate Delta vs QA | Computes changed files vs origin/QA (merge-base, includes uncommitted changes), resolves tests per the configured test level and runs sf project deploy validate against the QA org. |
| IAPL: Validate Manifest vs QA | Picks a package*.xml from the repo (or browse) and validates it. |
| IAPL: Cancel Running Command | Cancels the running validation (server-side via sf project deploy cancel for panel jobs, process kill for palette commands). |
Deleted metadata (destructive changes)
Requires the sfdx-git-delta plugin (sf plugins install sfdx-git-delta).
When the delta contains deletions, the panel shows an "Incluir destructive changes" toggle (on by default). With it on, validation runs with --manifest + --post-destructive-changes + --ignore-warnings:
- full selection → sgd's generated
package.xmlis used as the constructive manifest - partial selection → a manifest is generated from the selected files (deletions are all-or-nothing; they can't be picked individually)
With the toggle off, deletions are excluded and changed files validate via a generated --manifest (companion -meta.xml / LWC·Aura bundles / static resources auto-included; avoids Windows command-line length limits).
Notes (0.6.4):
- Delta includes untracked files under
force-app - Constructive package always comes from the working tree (sgd is only used for destructive XML; avoids validating HEAD instead of WIP)
- Temp staging folders are cleaned after manifest generation; Cancel can interrupt
generate manifest
Settings
See iaplSfValidate.* in Settings: target org alias, base branch, test level, extra tests, default manifest, wait timeout, sf CLI path.
- Destructive delta uses
git stash createas--toso uncommitted deletions are included - Folder static resources + experiences/digitalExperiences/bots/… bundles expanded
- Validate lock prevents double-submit; temp
iapl-pkg-*/iapl-sgd-*cleaned after job start