Skip to content

Home Page Layouts

Config key: settings.homePageLayouts

Salesforce Classic only

This feature only exists in Salesforce Classic.

Salesforce Classic Setup: Customize → Home → Home Page Layouts (/setup/ui/assignhomelayoutedit.jsp)

Assigns Home Page Layouts to profiles.

Screenshot

Home Page Layouts

Pill Field
1 homePageLayoutAssignments[0].profile
2 homePageLayoutAssignments[0].layout
3 homePageLayoutAssignments[1].profile
4 homePageLayoutAssignments[1].layout

Use cases

Give sales users their own home page

The sales reps of Acme still work in Salesforce Classic, and their home tab should show the dashboard snapshot and the custom links of the DE Default home page layout. The Metadata API deploys the HomePageLayout itself, but the Profile type has no field for its home page layout: which profile sees which layout is only set on the Home Page Layout Assignment page of Setup.

This config gives the Standard User profile the DE Default layout, and keeps the System Administrator profile on the standard home page: an empty layout stands for Home Page Default. Profiles are named as Setup shows them, and the profiles the config does not list keep their layout.

{
  "$schema": "https://raw.githubusercontent.com/amtrack/sfdx-browserforce-plugin/main/src/plugins/schema.json",
  "settings": {
    "homePageLayouts": {
      "homePageLayoutAssignments": [
        {
          "profile": "Standard User",
          "layout": "DE Default"
        },
        {
          "profile": "System Administrator",
          "layout": ""
        }
      ]
    }
  }
}

Example

{
  "$schema": "https://raw.githubusercontent.com/amtrack/sfdx-browserforce-plugin/main/src/plugins/schema.json",
  "settings": {
    "homePageLayouts": {
      "homePageLayoutAssignments": [
        {
          "profile": "StandardUser",
          "layout": "MyHomePageLayout"
        },
        {
          "profile": "SystemAdministrator",
          "layout": ""
        }
      ]
    }
  }
}

Fields

In the field paths, [] stands for the items of a list and * for the entries of an object keyed by name.

Field Type Description
homePageLayoutAssignments[].profile string Developer Name of Profile
Required.
homePageLayoutAssignments[].layout string Developer Name of the HomePageLayout or empty string for default layout
Required.
JSON Schema
{
  "type": "object",
  "properties": {
    "homePageLayoutAssignments": {
      "default": [],
      "title": "Home Page Layout Assignment",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "profile": {
            "type": "string",
            "description": "Developer Name of Profile"
          },
          "layout": {
            "type": "string",
            "description": "Developer Name of the HomePageLayout or empty string for default layout"
          }
        },
        "required": [
          "profile",
          "layout"
        ]
      }
    }
  },
  "title": "Home Page Layouts",
  "description": "Salesforce Classic Setup: **Customize → Home → Home Page Layouts** (`/setup/ui/assignhomelayoutedit.jsp`)\n\nAssigns Home Page Layouts to profiles.\n\n![Home Page Layout Assignment](https://raw.githubusercontent.com/amtrack/sfdx-browserforce-plugin/main/src/plugins/home-page-layouts/screenshot.webp)",
  "examples": [
    {
      "homePageLayoutAssignments": [
        {
          "profile": "StandardUser",
          "layout": "MyHomePageLayout"
        },
        {
          "profile": "SystemAdministrator",
          "layout": ""
        }
      ]
    }
  ],
  "x-user-interface": "classic"
}

Source code of this setting