---
schema_version: "1"
id: 0115ee483396d1cd46f30a6e777cb8305585669f4db83eac5533b2e0c2076195
title: Select SObject
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/lightning-base-components/lightning-design-system/guides/aura/components/ltng/selectSObject/ltng-select-sobject.md
canonical_url: https://developer.salesforce.com/docs/platform/lightning-component-reference/guide/ltng-select-sobject.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: a09fcb89dbef21e837991b7f3cf2c3157249d48f99b22090a4ff239cbb5a9442
products:
  - Lightning Component Reference
---
# Select SObject

**`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.

```javascript
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 |         | ![Yes](https://developer.salesforce.com/media/check.png) |

:::::

::::::
