Skip to main content
How to deploy Compact Layout assignments

Guidance on how to retrieve and deploy Compact Layout assignments using Custom object and Record type metadata types

Mateusz Kochanowicz avatar
Written by Mateusz Kochanowicz
Updated over 2 months ago

What metadata type to select in the filter?

Compact layout assignments are stored in the Custom object metadata within the RecordType sub-component.

So in order to deploy Compact Layout assignment, you'll need to include Custom object + RecordType in your metadata filter.

Alternatively, you can use Gearset's default Basic comparison metadata filter, which already includes Custom object metadata.

When to include only 'Custom object' metadata type without any of its sub-components?

Below is an example of a Compact Layout assignment stored directly within the 'Account' Custom object metadata type.

In this Salesforce org you'd find it in Account > Compact Layouts.

If you've reassigned System Default Compact Layout on a specific standard object, then you'd only need to include Custom object in your metadata filter (without any of its sub-components).

This is when the Compact Layout assignment is being stored within Custom object metadata.

When to include both 'Custom object' and 'Record type' metadata types?

You would need both Custom object and RecordType metadata types included in the filter when Compact Layout assignment is set up for a specific RecordType on a Custom object.

Below is an example of a Compact Layout assignment found in the comparison within the Record type.


In this Salesforce org its location is: Case (object) > Record Types > 'CSE Support' Record Type.

When to include 'Custom object' and 'Compact Layout' metadata types?

You'd normally include both Custom object and its sub-component Compact Layout when you're aiming to retrieve the Compact Layout as a top level component.


​This means that you'd have the Custom Layout separated from the Custom object in your comparison results, as per the below image.

Did this answer your question?