lightning__RecordAction
Target
Enables a component to be used as a quick action on a record page. To specify the type of quick action, define a targetConfig
with an actionType
attribute.
Configures the component for a record action and defines component properties. The targetConfigs
tag contains at least one targetConfig
tag.
Configures a page type with this attribute.
Attribute | Description | Required |
---|---|---|
targets | Specify one or more page types in the targets attribute, such as <targetConfig targets="lightning__RecordAction"> or <targetConfig targets="lightning__RecordAction,lightning__RecordPage"> . The targets attribute value must match one or more of the page types that you listed under <targets> . | Yes |
actionType | Specify the type of Lightning web component quick action. Valid values are:
|
lightning__RecordAction
doesn't support component properties.
A set of one or more form factors or devices that the component supports. Specify the supportedFormFactors
tag set one time inside a targetConfig
set. The supportedFormFactors
tag contains at least one supportedFormFactors
tag.
Defines which form factor or device the component supports. Use one supportedFormFactor
tag for each supported form factor.
The supportedFormFactor
tag supports this attribute.
Attribute | Type | Description | Required |
---|---|---|---|
type | String | Device form factor on which the component displays. Valid values are:
| Yes |
We strongly recommend including supported form factor information in the configuration file. See Configure Your Component for Different Form Factors.
You can use a quick action to navigate to an object page, such as the Contact home page. In this example, a headless quick action executes custom code you provide in an @api invoke()
method.
A headless quick action corresponds to the Action
type.
You can't change the action type after you've defined it in the configuration file. For example, you can't change a component's action type from Action
to ScreenAction
or vice versa after you deploy your component.
Creating an LWC action in Lightning Experience is similar to creating a regular quick action. For more information, see Salesforce Help: Lightning Web Component Actions. If you're creating a LWC action for the Field Service mobile app, see Salesforce Help: Create Quick Actions for the Field Service Mobile App.
To enable a component to be used as a global quick action, use lightning__GlobalAction
instead.
See Also
- Configure a Component for Quick Actions
- Create an Email as a Quick Action
- XML Configuration File Elements