Loading
Feature Disruption - Service Cloud VoiceRead More
Feature degradation | Gmail Email delivery failureRead More

Page Layout assignments set to 'Not Assigned' during deployment

Publish Date: May 18, 2026
Description

After deploying using ANT, Force.com IDE (now Salesforce Extensions for VS Code), Workbench, or any Metadata API-based tool, you may find that Page Layout Assignments on certain profiles and record type combinations are removed and shown as "Not Assigned" in Setup.
This happens because Page Layout Assignments in Salesforce are stored as <layoutAssignments> tags inside Profile metadata files. When Profiles are retrieved without also retrieving the associated Record Types and Page Layouts in the same transaction, these tags are absent from the retrieved Profile XML. Deploying a Profile without <layoutAssignments> tags instructs Salesforce to clear all page layout assignments for that profile.

Resolution

Root Cause

Page Layout Assignments are controlled by <layoutAssignments> elements in Profile metadata files. Each assignment consists of:

  • A <layout> tag specifying the page layout in the format: ObjectName-LayoutName
  • A <recordType> tag specifying the record type in the format: ObjectName.RecordTypeName

If a Profile file is deployed without these tags, Salesforce interprets this as "remove all existing page layout assignments" for that profile, resulting in "Not Assigned" entries.

Solution: Always Retrieve These Three Components Together

To preserve Page Layout Assignments during deployment, always retrieve the following three components in a single transaction from the source org:

  1. Profiles — contains the <layoutAssignments> tags
  2. RecordTypes (part of Object metadata) — required for the profile to reference the correct record type
  3. Page Layouts — required for the profile to reference the correct layout

When all three are retrieved together, the Profile XML will include <layoutAssignments> entries like the following example:

<layoutAssignments>
<layout>Opportunity-OpportunityLayout</layout>
<recordType>Opportunity.StandardRecordType</recordType>
</layoutAssignments>

In this example:

  • Opportunity-OpportunityLayout is the name of the page layout (ObjectName-LayoutName format)
  • Opportunity.StandardRecordType is the API name of the record type (ObjectName.RecordTypeName format)

The presence of these <layoutAssignments> tags in the Profile file tells Salesforce which page layout to assign to which record type during deployment.

Note: This Is Working As Designed (WAD)

If Page Layout Assignments are removed after a deployment and the <layoutAssignments> tags were not present in the Profile file, this is expected (Working As Designed) behavior. The Salesforce Metadata API deploys exactly what is contained in the deployment payload. If the layout assignment tags are absent from the Profile, Salesforce clears those assignments. There is no defect — the solution is to always retrieve all three components together.

Knowledge Article Number

000382756

 
Loading
Salesforce Help | Article