Skip to main content

Resolving validation errors: "miniLayoutField: <field> is not present in the full layout"

How to resolve the Salesforce validation error: "miniLayoutField: <field> is not present in the full layout."

Written by Sam Wilson

You might hit this Salesforce validation error when deploying a page layout (Layout):

  • miniLayoutField: Region__c is not present in the full layout

This error comes from Salesforce's metadata validator, not Gearset. It means the field is still referenced in the layout's <miniLayout>, but it no longer exists anywhere in the full layout.

What is a mini layout?

Every Salesforce page layout has two parts in its metadata:

  • The full layout (<layoutSections>) is the main layout users see on a record page.

  • The mini layout (<miniLayout>) is a smaller subset of those fields, shown in places like hover details and the Recent Items sidebar.

Salesforce enforces a hard rule: any field in the <miniLayout> must also exist somewhere in the full layout.

How the mini layout and full layout relate

A field appears in the full layout under <layoutSections>, like this:

<layoutSections>
<layoutColumns>
<layoutItems>
<field>Region__c</field>
</layoutItems>
</layoutColumns>
</layoutSections>

The same field can then be referenced in the mini layout:

<miniLayout>
<fields>Name</fields>
<fields>OwnerId</fields>
<fields>Region__c</fields>
</miniLayout>

For this to validate, every <fields> entry in the <miniLayout> needs a matching field in the full <layoutSections>.

Why you're seeing this validation error

This usually happens when a field is removed from the full layout but the matching reference is left behind in the <miniLayout>.

In the example above, a change removed Region__c from the full layout sections, but the field is still listed in the <miniLayout>. The mini layout now points at a field that is no longer part of the layout, so Salesforce rejects the deployment.

How to fix it

You have two options, depending on whether the field should stay on the layout.

  1. Copy the field name from the error (for example, Region__c).

  2. Search for it in the layout XML to find where it is referenced in the <miniLayout>.

Then if:

  • the field should be removed from the layout (the usual case, and what the change intended):

    • Remove the matching <fields> entry from the <miniLayout> so it no longer references the field.

  • the field should stay on the layout:

    • Add it back to the full layout under <layoutSections> so the mini layout reference resolves.

Once every field in the <miniLayout> also exists in the full layout, validation should be successful.

Useful resources

Disclaimer: This error is 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?