All Collections
Guides on deploying specific metadata types
Compact Layout assignment - retrieve and deploy
Compact Layout assignment - retrieve and deploy

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

Mateusz Kochanowicz avatar
Written by Mateusz Kochanowicz
Updated over a week 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.

Preview in the Compare 2.0

Note: The user interface of the comparison results may differ slightly if you're using Compare 2.0 to retrieve the same Compact Layout assignment, in which case the interface would look as below.

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.

Preview in the Compare 2.0:

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 below image.

Preview in the Compare 2.0:

Did this answer your question?