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(); }
Attribute Name | Type | Description | Required? |
---|---|---|---|
scope | String | The API name of the custom or standard object, such as “Contact”, or “namespace__objectName__c”. | Yes |
resetHistory | Boolean | Resets history if set to true. Defaults to false, which provides a Back button in Salesforce1. |