Skip to main content

Resolving FlexiPage validation errors: unused Facet regions

How to match facet definitions with facet references and resolve validation errors: 1) 'Facet Facet-#### is not used anywhere in the Lightning page definition', or 2) 'The facet Facet-#### is defined by a component in the FlexiPage but not actually used.'

Sam Wilson avatar
Written by Sam Wilson
Updated this week

You might hit one of these Salesforce validation errors when deploying a Lightning page (FlexiPage):

  • Facet Facet-#### is not used anywhere in the Lightning page definition.

  • The facet Facet-#### is defined by a component in the FlexiPage but not actually used.

These errors come from Salesforce’s metadata validator, not Gearset. They basically mean the same thing: your FlexiPage XML defines/references a facet region, but nothing on the page defines/references it.

What is a Facet?

A FlexiPage is a Lightning page made up of regions that contain components. In the Metadata XML, those regions are listed under <flexiPageRegions>, and each region has a name and a type.

Most regions are standard page regions (type="Region").

Some container components need named slots for child content. In the FlexiPage XML, those slots are represented as facet regions (type="Facet").

How are facets defined and used?

Facet definition

A facet is defined as a region like:

<flexiPageRegions>
<name>Facet-b699f866-703a-4add-b501-4b5708e11072</name>
<type>Facet</type>
</flexiPageRegions>

The name (usually Facet-<uuid>) is the facet ID.

Facet reference

A facet is only “used” if a container component references that ID in its properties:

<componentInstanceProperties>
<name>body</name>
<value>Facet-b699f866-703a-4add-b501-4b5708e11072</value>
</componentInstanceProperties>
  • <name> is the slot the container exposes (examples: body, tabs, columns, header).

  • <value> must exactly match the facet region’s <name>.

Why you’re seeing these validation errors?

Salesforce expects every facet to be defined and referenced. If those don’t match up, validation fails.

Facet is defined but not referenced:

There’s a <flexiPageRegions> entry with type="Facet" and name Facet-####, but no container component property points to it.

Facet is referenced but not defined:

A container property references Facet-####, but there’s no matching facet region with that name in <flexiPageRegions>.

How to fix it?

  1. Copy the facet ID from the error (for example, Facet-4fd4079c-Decd-46b2-9efc-f4d6a8b9040b).

  2. Search for that ID in the XML

Then if:

  • the Facet exists but isn’t referenced:

    • Add/restore the container property that references it, or

    • Remove the unused facet region if it’s not needed.

  • the Facet is referenced but doesn’t exist:

    • Recreate the missing facet region with the same name, or

    • Update/remove the reference if it’s wrong.

Once every facet has a matching reference, and every reference has a matching facet, validation should be successful.

Useful resources

Disclaimer: These errors are returned by Salesforce directly, rather than Gearset. Even so, we offer guidance based on our combined experience with the Metadata API. Where possible, we try to help guide you to fix or avoid this error. In the case that this isn't possible, we may need to direct you to Salesforce support for further clarification.

Did this answer your question?