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. |
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 is 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.