Navigate To Object Home

force:navigateToObjectHome

Navigates from a custom component to the specified object home.

This event is deprecated. We recommend using the lightning:navigation component with the standard__objectPage page type instead.

For Use In

Lightning Experience, Experience Builder Sites, Salesforce Mobile App

::::::tabset{tabs='[ "Develop", "Specifications"]'}

:::::tab

This event enables you to navigate to the object home specified by the scope attribute.

We recommend using lightning:navigation component with the standard__objectPage page type instead.

For more information, see the Lightning Aura Components Developer Guide.

To navigate to an object home, set the object name on the scope attribute and fire the event. This example displays the home page for a custom object.

navHome : function (component, event, helper) {
    var homeEvent = $A.get("e.force:navigateToObjectHome");
    homeEvent.setParams({
        "scope": "myNamespace__myObject__c"
    });
    homeEvent.fire();
}

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.

:::::

:::::tab

Attributes

Name Description Type Default Required
resetHistory Set to true to reset history. boolean false
scope The name or key prefix of entity to display object home for. string Yes

:::::

::::::