Skip to main content

How to deploy Lightning pages and Lightning page assignments

Quickly move your Lightning pages, Lightning page assignments, Lightning record page assignments, and components between orgs

Written by Valerio Chang

Gearset allows you to easily move your Lightning pages (also known as FlexiPage in the Metadata API) and components between your orgs.

How do I deploy a Lightning page and assignments?

You deploy a Lightning page with Gearset the same way as any other metadata. The Default comparison metadata filter includes the Lightning page metadata type.

  1. Compare your source and target orgs using a metadata filter that includes Lightning page.

  2. In the comparison results, find your page under the Lightning page metadata type. Select the page to see its XML, which shows all its configuration settings.

  3. Select the checkbox next to the Lightning page, then click NEXT.

  4. Click DEPLOY NOW. When the deployment completes, the Lightning page is available in your target org.

How do I deploy Lightning page assignments?

Lightning page assignments are stored in the Custom application metadata type, not in the Lightning page itself. To deploy an assignment of a Lightning record page to an app, record type, or profile, deploy the Custom application the page is assigned in.

  1. Make sure your metadata filter includes Custom application. The Default comparison filter already includes it. If you use a custom metadata filter, add Custom application, and add Lightning page too if the page doesn't exist in the target org yet. See Manage custom filters in Compare and deploy.

  2. Run the comparison and select the Custom application for your Lightning app.

  3. Check the assignment in the app's XML, inside the profileActionOverrides tags.

  4. Deploy the Custom application. Gearset deploys the assignment along with it.

The following XML shows a Lightning record page assignment inside a Custom application. It assigns the record page Lightning_Record_Page_Test to Account records for the Custom: Sales Profile profile in this app.
​

<profileActionOverrides>
<actionName>View</actionName>
<content>Lightning_Record_Page_Test</content>
<formFactor>Large</formFactor>
<pageOrSobjectType>Account</pageOrSobjectType>
<type>Flexipage</type>
<profile>Custom: Sales Profile</profile>
</profileActionOverrides>


A Lightning Home page assignment uses the same tags, with actionName set to Tab and pageOrSobjectType set to standard-home. From API version 45.0, Salesforce stores these profile assignments only in the Custom application. For every field in these tags, see Salesforce's ProfileActionOverride reference.

How do I deploy a Lightning page as org default?

When you activate a Lightning page as org default, Gearset shows that change in the Custom object metadata type for the page's object, not in the Lightning page.

  1. Make sure your metadata filter includes Custom object.

  2. Run the comparison and select the Custom object the Lightning page belongs to.

  3. Deploy the Custom object. The deployment makes the Lightning page the org default in the target org.

How do I deploy Lightning components?

Lightning components are either Lightning web components or Aura components. Salesforce explains both in its Lightning Component Framework overview.

The Default comparison metadata filter includes Lightning page, but not Aura component or Lightning web component. To compare and deploy Lightning components, do one of the following:

Useful resources

If you have any trouble with your changes, please send a message to our support team, who will be happy to help.

Did this answer your question?