generating-flexipage

Generate Salesforce Lightning FlexiPages via CLI bootstrapping and validate deployments.

803|289|Updated Nov 7, 2025
One-click install
npx skills add https://github.com/forcedotcom/sf-skills --skill generating-flexipage-forcedotcom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generating-flexipage
Source: https://github.com/forcedotcom/sf-skills/tree/main/skills/generating-flexipage
Command: npx skills add https://github.com/forcedotcom/sf-skills --skill generating-flexipage-forcedotcom

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you create, generate, modify guidance for, and validate Salesforce Lightning FlexiPages (RecordPage, AppPage, HomePage) while preventing common FlexiPage deployment and XML formatting errors.

Core Features & Use Cases

  • Guided FlexiPage bootstrapping: Uses the Salesforce CLI template command for creating new FlexiPages to ensure correct structure and region/component configuration.
  • Deployment validation workflow: Provides a dry-run deployment step so you can catch page and dependency errors before proceeding.
  • FlexiPage XML authoring rules & troubleshooting: Covers component/region/facet conventions, field reference formatting, identifier uniqueness, and how to fix frequent deployment errors (e.g., invalid field references, duplicated fieldInstance structures, XML parsing issues).
  • Edit-any-flexipage file support: Applies when working with any *.flexipage-meta.xml content, including understanding components/regions/facets and resolving deployment errors.

Quick Start

Run the command sf template generate flexipage with the correct --template (RecordPage|AppPage|HomePage) and page parameters (including field arguments for RecordPage) to bootstrap a valid FlexiPage skeleton, then follow the dry-run deployment step to confirm it deploys cleanly.

Frequently Asked Questions about generating-flexipage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a Salesforce FlexiPage using the CLI?

To generate a Salesforce FlexiPage, run the sf template generate flexipage command with the correct --template type (RecordPage, AppPage, or HomePage) and required page parameters to bootstrap a valid XML skeleton.

Why does my FlexiPage deployment fail with invalid field references?

FlexiPage deployment fails when Record.{Field} references are formatted incorrectly or identifiers are not unique. You must follow strict XML encoding rules for special characters and ensure fieldInstance structures are not duplicated.

What is the best way to validate a Lightning page before deploying to Salesforce?

The best way to validate a Lightning page is to run a dry-run deployment. This catches page and dependency errors in the FlexiPage XML structure before the actual deployment to your Salesforce org.

Do I need the Salesforce CLI to create FlexiPage XML files?

Yes, using the Salesforce CLI template command ensures correct component and region configuration when creating FlexiPage XML files. It generates a valid skeleton that prevents common formatting and structure errors.

Can I modify and troubleshoot existing FlexiPage XML files?

Yes, you can modify and troubleshoot existing *.flexipage-meta.xml files. The process covers resolving component, region, and facet convention errors as well as fixing XML parsing issues during deployment.

What are the limitations when generating FlexiPages for Salesforce?

Limitations include strict rules for identifier uniqueness, correct region and facet configurations, and proper XML encoding of special characters. Deviating from these rules causes deployment validation errors and XML parsing issues.