Newer Version Available
ProfileActionOverride
File Suffix and Directory Location
Profile-based action overrides are defined as part of a custom application or profile.
Version
ProfileActionOverrides are available in API version 39.0 and later.
ProfileActionOverride can be defined on Profile or CustomApplication for API version 39.0 to 44.0. In API version 45.0 and later, ProfileActionOverride must be defined for CustomApplication instead. Beginning with API version 45.0, Home page assignments related to user profile must also have a corresponding app assignment because more granular Home page assignments are supported. As a result, ProfileActionOverride is defined for CustomApplication rather than Profile.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| actionName | string |
The name of the action. The only valid values are
Tab and View. If pageOrSobjectType is standard-home, this field must be Tab. The Tab action is supported only when ProfileActionOverride is being specified as part of a Profile in API version 39.0 to 44.0. In API version 45.0 and later, this action is supported only when ProfileActionOverride is being specified as part of a CustomApplication, pageOrSobjectType is standard-home, and this field is Tab. If pageOrSobjectType is record-home, this field must be View. The View action is supported only when ProfileActionOverride is being specified as part of a CustomApplication. |
| content | string | Read-only. Represents the name of the Lightning page being used as the override. |
| formFactor | FormFactor (enumeration of type string) | The size of the page being overridden. The Large value represents the Lightning Experience desktop environment. |
| pageOrSobjectType | string | The name of the page being overridden. The only valid values are record-home and standard-home. If the actionName is Tab, this field must be standard-home |
| recordType | string | The record type associated with the override. If pageOrSobjectType is standard-home, this field must be null. This field is required when actionName is set to View. |
| type | ActionOverrideType (enumeration of type string) | Read-only. The type of action override. The only valid value is flexipage. |
Usage
You can't delete custom app ProfileActionOverrides by deploying with destructiveChange.xml. To delete a ProfileActionOverride, retrieve the app. In the app definition file, find the <profileActionOverrides> section, and remove the <content> row. Then, change the <type> value in that same section to default instead of flexipage. Do this for every override you want to reset. After making the changes, rezip the folder and deploy.
You can remove one override at a time each with its own deploy, or you can remove multiple overrides in a single deploy. However, we recommend that you do a fresh retrieve every time you want to delete a new override. Don’t use a previously retrieved file.
Avoid creating duplicate ProfileActionOverrides in your org. Duplicate ProfileActionOverrides can cause problems, including being unable to select or deselect the Disable end user personalization of nav items in this app option in app settings and the Disable Navigation Bar Personalization in Lightning Experience User Interface setting.
Declarative Metadata Sample Definition
You can define a ProfileActionOverride like this.
1<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata">
2 <profileActionOverrides>
3 <actionName>View</actionName>
4 <content>CustomObjectFlexiPage</content>
5 <formFactor>Large</formFactor>
6 <pageOrSobjectType>TestObj__c</pageOrSobjectType>
7 <type>Flexipage</type>
8 <profile>standard</profile>
9 <recordType>TestObj__c.TestRecordType</recordType>
10 </profileActionOverrides>
11 <defaultLandingTab>standard-home</defaultLandingTab>
12 <formFactors>Large</formFactors>
13 <label>My Custom App</label>
14 <tab>standard-Account</tab>
15 <tab>standard-Opportunity</tab>
16 <uiType>Lightning</uiType>
17 <navType>Standard</navType>
18</CustomApplication>Here’s an example package.xml.
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <members>MyCustomApp</members>
5 <name>CustomApplication</name>
6 </types>
7 <version>39.0</version>
8</Package>Wildcard Support in the Manifest File
This metadata type doesn’t support the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.