ltng:selectSObject
Sends the recordId of an object when you select the object in the UI.
For Use In
Lightning Experience, Experience Builder Sites, Salesforce Mobile App
::::::tabset{tabs='[ "Develop", "Specifications"]'}
:::::tab
Fire this event when you want to select an object, for example, when you are displaying a list of records and you want another component to display the selected record. To select an object, set the record ID on the recordId attribute. Optionally, specify a channel for this event so that your components can select if they want to listen to particular event messages. Using a channel is useful if you want to put multiple components on a page and you want to separate them into channels to prevent conflicts.
selectedObj: function(component, event) {
var selectedObjEvent = $A.get("e.ltng:selectSObject");
selectedObjEvent.setParams({
"recordId": "0061a000004x8e1",
"channel": "AccountsChannel"
});
selectedObjEvent.fire();
}
:::::
:::::tab
Attributes
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
channel |
Represents the channel name. Specify this attribute if you want particular components to process some event messages while ignoring others. | string | ||
recordId |
The record ID associated with the record to select. | string | ![]() |
:::::
::::::
