Navigate To SObject

force:navigateToSObject

Navigates to a record specified by recordId.

For Use In

Lightning Experience, Experience Builder Sites, Salesforce Mobile App

This event enables you to navigate to an sObject record specified by recordId.

We recommend using lightning:navigation component with the standard__recordPage page type instead. For more information, see the Lightning Aura Components Developer Guide.

To display the record view, set the record ID on the recordId attribute and fire the event. Record IDs corresponding to ContentNote SObjects aren’t supported.

The record view contains slides that display the Chatter feed, the record details, and related information. This example displays the related information slide of a record view for the specified record ID.

You can set a specific slide in the Salesforce mobile app, but not in Lightning Experience.

In the Salesforce mobile app, you can specify the slide within the record view to display initially. The following slide names are supported.

  • detail: The record detail slide. This is the default value.
  • chatter: The Chatter slide.
  • related: The related information slide.

This event is handled by the one.app container. It’s supported in Lightning Experience, the Salesforce mobile app, and Aura-based Experience Builder sites.

NameDescriptionTypeDefaultRequired
isredirectWhen redirecting in place, this attribute prevents the creation of multiple history entries in hybrid environments. In this case, hybrid treats redirects as a single history entry.booleanfalse
networkIdInherited. Network that the event is associated with.string
recordIdThe record ID.stringYes
slideDevNameThe developer name of the of the slide to navigate to. By default, options are 'chatter', 'related', 'detail'.string