mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-07-30 19:50:42 +08:00
70 lines
17 KiB
JSON
70 lines
17 KiB
JSON
{
|
||
"sections": [
|
||
"title",
|
||
"description",
|
||
"fields",
|
||
"wsdl_segment",
|
||
"declarative_metadata_sample_definition"
|
||
],
|
||
"title": "ActionOverride - Metadata API",
|
||
"description": "Represents an action override on a standard or custom object. Use it to create, update, edit, or delete action overrides. You can access ActionOverride only by accessing its encompassing CustomObject.",
|
||
"fields_columns": [
|
||
"type",
|
||
"description"
|
||
],
|
||
"fields": {
|
||
"actionName": {
|
||
"type": "string",
|
||
"description": "The possible values are the same as the actions you can override: accept clone delete edit list new tab view",
|
||
"required": true
|
||
},
|
||
"comment": {
|
||
"type": "string",
|
||
"description": "Any comments you want associated with the override."
|
||
},
|
||
"content": {
|
||
"type": "string",
|
||
"description": "Set this field if type is set to flexipage, lightningcomponent, scontrol, or visualforce. It refers to the name of the Lightning page, Lightning component, s-control, or Visualforce page to use as the override. To reference installed components, use this format: Component_namespace__Component_name."
|
||
},
|
||
"formFactor": {
|
||
"type": "FormFactor (enumeration of type string)",
|
||
"description": "The size of the page being overridden. If the type field is set to flexipage, set this field to Large to override the View action with a Lightning page in Lightning Experience. The Large value represents the Lightning Experience desktop environment and is valid only for the flexipage and lightningcomponent types. The Small value represents the Salesforce mobile app on a phone or tablet. The Medium value is reserved for future use. The null value (which is the same as specifying no value) represents Salesforce Classic. This field is available in API version 37.0 and later and is part of the feature for creating and editing record pages in Lightning Experience. Lightning component overrides return different FormFactor values depending on the API version used. In API version 41.0 and earlier, Lightning component overrides return only the null value (no value), representing the Salesforce Classic environment. In API version 42.0, if you specify different Lightning component overrides for Lightning Experience and mobile, one component is selected randomly for both overrides and its FormFactor value is returned. If there’s a conflict between Lightning components, and a Visualforce page override is also specified for Salesforce Classic, the Visualforce page takes precedence. In API version 43.0 and later, a Lightning component override for Lightning Experience returns the Large value and a Lightning component override for mobile returns the Small value, as expected."
|
||
},
|
||
"skipRecordTypeSelect": {
|
||
"type": "boolean",
|
||
"description": "Set this field to true if you prefer that any new records created by this action override aren’t forwarded to the record type selection page. This field is only valid if the actionName is a “create” type (like new), and type is set to visualforce. This field is available in API version 21.0 and later."
|
||
},
|
||
"type": {
|
||
"type": "ActionOverrideType (enumeration of type string)",
|
||
"description": "Represents the type of action override. Valid values are described in ActionOverrideType.",
|
||
"required": true
|
||
}
|
||
},
|
||
"wsdl_segment": "```xml\n<xsd:complexType name=\"ActionOverride\">\n <xsd:sequence>\n <xsd:element name=\"actionName\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"comment\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"content\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"formFactor\" minOccurs=\"0\" type=\"tns:FormFactor\"/>\n <xsd:element name=\"skipRecordTypeSelect\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"type\" minOccurs=\"0\" type=\"tns:ActionOverrideType\"/>\n </xsd:sequence>\n</xsd:complexType>\n<xsd:simpleType name=\"ActionOverrideType\">\n <xsd:restriction base=\"xsd:string\">\n <xsd:enumeration value=\"Default\"/>\n <xsd:enumeration value=\"Standard\"/>\n <xsd:enumeration value=\"Scontrol\"/>\n <xsd:enumeration value=\"Visualforce\"/>\n <xsd:enumeration value=\"Flexipage\"/>\n <xsd:enumeration value=\"LightningComponent\"/>\n </xsd:restriction>\n</xsd:simpleType>\n<xsd:complexType name=\"AppActionOverride\">\n <xsd:complexContent>\n <xsd:extension base=\"tns:ActionOverride\">\n <xsd:sequence>\n <xsd:element name=\"pageOrSobjectType\" type=\"xsd:string\"/>\n </xsd:sequence>\n </xsd:extension>\n </xsd:complexContent>\n</xsd:complexType>\n<xsd:complexType name=\"CustomApplication\">\n <xsd:complexContent>\n <xsd:extension base=\"tns:Metadata\">\n <xsd:sequence>\n <xsd:element name=\"actionOverrides\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:AppActionOverride\"/>\n <xsd:element name=\"brand\" minOccurs=\"0\" type=\"tns:AppBrand\"/>\n <xsd:element name=\"consoleConfig\" minOccurs=\"0\" type=\"tns:ServiceCloudConsoleConfig\"/>\n <xsd:element name=\"defaultLandingTab\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"description\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"formFactors\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:FormFactor\"/>\n <xsd:element name=\"isNavAutoTempTabsDisabled\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"isNavPersonalizationDisabled\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"isNavTabPersistenceDisabled\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"isOmniPinnedViewEnabled\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"isServiceCloudConsole\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"label\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"logo\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"navType\" minOccurs=\"0\" type=\"tns:NavType\"/>\n <xsd:element name=\"preferences\" minOccurs=\"0\" type=\"tns:AppPreferences\"/>\n <xsd:element name=\"profileActionOverrides\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:AppProfileActionOverride\"/>\n <xsd:element name=\"setupExperience\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"subscriberTabs\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"xsd:string\"/>\n <xsd:element name=\"tabs\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"xsd:string\"/>\n <xsd:element name=\"uiBundle\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"uiType\" minOccurs=\"0\" type=\"tns:UiType\"/>\n <xsd:element name=\"utilityBar\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"workspaceConfig\" minOccurs=\"0\" type=\"tns:AppWorkspaceConfig\"/>\n </xsd:sequence>\n </xsd:extension>\n </xsd:complexContent>\n</xsd:complexType>\n<xsd:complexType name=\"CustomObject\">\n <xsd:complexContent>\n <xsd:extension base=\"tns:Metadata\">\n <xsd:sequence>\n <xsd:element name=\"actionOverrides\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:ActionOverride\"/>\n <xsd:element name=\"allowInChatterGroups\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"articleTypeChannelDisplay\" minOccurs=\"0\" type=\"tns:ArticleTypeChannelDisplay\"/>\n <xsd:element name=\"businessProcesses\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:BusinessProcess\"/>\n <xsd:element name=\"compactLayoutAssignment\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"compactLayouts\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:CompactLayout\"/>\n <xsd:element name=\"customHelp\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"customHelpPage\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"customSettingsType\" minOccurs=\"0\" type=\"tns:CustomSettingsType\"/>\n <xsd:element name=\"deploymentStatus\" minOccurs=\"0\" type=\"tns:DeploymentStatus\"/>\n <xsd:element name=\"deprecated\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"description\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"enableActivities\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"enableBulkApi\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"enableDataTranslation\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"enableDivisions\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"enableEnhancedLookup\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"enableFeeds\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"enableHistory\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"enableLicensing\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"enablePublishStatusTracking\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"enableReports\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"enableSearch\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"enableSharing\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"enableStreamingApi\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"enrichments\" minOccurs=\"0\" type=\"tns:MetadataEnrichments\"/>\n <xsd:element name=\"eventType\" minOccurs=\"0\" type=\"tns:PlatformEventType\"/>\n <xsd:element name=\"externalDataSource\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"externalName\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"externalRepository\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"externalSharingModel\" minOccurs=\"0\" type=\"tns:SharingModel\"/>\n <xsd:element name=\"fieldSets\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:FieldSet\"/>\n <xsd:element name=\"fields\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:CustomField\"/>\n <xsd:element name=\"gender\" minOccurs=\"0\" type=\"tns:Gender\"/>\n <xsd:element name=\"historyRetentionPolicy\" minOccurs=\"0\" type=\"tns:HistoryRetentionPolicy\"/>\n <xsd:element name=\"household\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"indexes\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:Index\"/>\n <xsd:element name=\"label\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"listViews\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:ListView\"/>\n <xsd:element name=\"mktDataLakeAttributes\" minOccurs=\"0\" type=\"tns:MktDataLakeAttributes\"/>\n <xsd:element name=\"mktDataModelAttributes\" minOccurs=\"0\" type=\"tns:MktDataModelAttributes\"/>\n <xsd:element name=\"nameField\" minOccurs=\"0\" type=\"tns:CustomField\"/>\n <xsd:element name=\"pluralLabel\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"profileSearchLayouts\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:ProfileSearchLayouts\"/>\n <xsd:element name=\"publishBehavior\" minOccurs=\"0\" type=\"tns:PlatformEventPublishBehavior\"/>\n <xsd:element name=\"recordTypeTrackFeedHistory\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"recordTypeTrackHistory\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"recordTypes\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:RecordType\"/>\n <xsd:element name=\"searchLayouts\" minOccurs=\"0\" type=\"tns:SearchLayouts\"/>\n <xsd:element name=\"sharingModel\" minOccurs=\"0\" type=\"tns:SharingModel\"/>\n <xsd:element name=\"sharingReasons\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:SharingReason\"/>\n <xsd:element name=\"sharingRecalculations\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:SharingRecalculation\"/>\n <xsd:element name=\"startsWith\" minOccurs=\"0\" type=\"tns:StartsWith\"/>\n <xsd:element name=\"validationRules\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:ValidationRule\"/>\n <xsd:element name=\"visibility\" minOccurs=\"0\" type=\"tns:SetupObjectVisibility\"/>\n <xsd:element name=\"webLinks\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:WebLink\"/>\n </xsd:sequence>\n </xsd:extension>\n </xsd:complexContent>\n</xsd:complexType>\n<xsd:complexType name=\"CustomTab\">\n <xsd:complexContent>\n <xsd:extension base=\"tns:Metadata\">\n <xsd:sequence>\n <xsd:element name=\"actionOverrides\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:ActionOverride\"/>\n <xsd:element name=\"auraComponent\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"customObject\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"description\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"flexiPage\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"frameHeight\" minOccurs=\"0\" type=\"xsd:int\"/>\n <xsd:element name=\"hasSidebar\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"icon\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"label\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"lwcComponent\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"motif\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"page\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"scontrol\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"splashPageLink\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"url\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"urlEncodingKey\" minOccurs=\"0\" type=\"tns:Encoding\"/>\n </xsd:sequence>\n </xsd:extension>\n </xsd:complexContent>\n</xsd:complexType>\n<xsd:simpleType name=\"FormFactor\">\n <xsd:restriction base=\"xsd:string\">\n <xsd:enumeration value=\"Small\"/>\n <xsd:enumeration value=\"Medium\"/>\n <xsd:enumeration value=\"Large\"/>\n </xsd:restriction>\n</xsd:simpleType>\n```",
|
||
"declarative_metadata_sample_definition": [
|
||
{
|
||
"description": "A Visualforce page override for Salesforce Classic:",
|
||
"code": "<CustomObject xmlns=\"http://soap.sforce.com/2006/04/metadata\">\n <actionOverrides>\n <actionName>edit</actionName>\n <type>visualforce</type>\n <content>myEditVFPage</content>\n <comment>This edit action is a lot safer.</comment>\n </actionOverrides>\n</CustomObject"
|
||
},
|
||
{
|
||
"description": "A Lightning component override for Lightning Experience:",
|
||
"code": "<CustomObject xmlns=\"http://soap.sforce.com/2006/04/metadata\">\n <actionOverrides>\n <actionName>edit</actionName>\n <type>lightningcomponent</type>\n <content>myEditLightningComponent</content>\n <formFactor>Large</formFactor>\n <comment>This edit action is a lot safer.</comment>\n </actionOverrides>\n</CustomObject>"
|
||
},
|
||
{
|
||
"description": "A Lightning component override for the Salesforce mobile app:",
|
||
"code": "<CustomObject xmlns=\"http://soap.sforce.com/2006/04/metadata\">\n <actionOverrides>\n <actionName>edit</actionName>\n <type>lightningcomponent</type>\n <content>myEditLightningComponent</content>\n <formFactor>Small</formFactor>\n <comment>This edit action is a lot safer.</comment>\n </actionOverrides>\n</CustomObject>"
|
||
},
|
||
{
|
||
"description": "When overrides are included in a managed package, the overrides are represented as default retrieve()",
|
||
"code": "<CustomObject xmlns=\"http://soap.sforce.com/2006/04/metadata\">\n <actionOverrides>\n <actionName>edit</actionName>\n <type>default</type>\n </actionOverrides>\n</CustomObject>"
|
||
},
|
||
{
|
||
"description": "If you subscribe to a managed package with default overrides, you can replace the default override behavior by editing the XML. For example, to replace the Visualforce page override with the Salesforce standard page for Salesforce Classic, use:",
|
||
"code": "<CustomObject xmlns=\"http://soap.sforce.com/2006/04/metadata\">\n <actionOverrides>\n <actionName>edit</actionName>\n <type>standard</type>\n </actionOverrides>\n</CustomObject>"
|
||
},
|
||
{
|
||
"description": "To set a Lightning page action override on the View standard button in Lightning Experience, use:",
|
||
"code": "<CustomObject xmlns=\"http://soap.sforce.com/2006/04/metadata\">\n <actionOverrides>\n <actionName>View</actionName>\n <content>myLightningPage</content>\n <formFactor>Large</formFactor>\n <type>flexipage</type>\n </actionOverrides>\n</CustomObject>"
|
||
}
|
||
]
|
||
} |