Newer Version Available

This content describes an older version of this product. View Latest

force:navigateToObjectHome

Navigates to the object home specified by the scope attribute.

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.

1navHome : function (component, event, helper) {
2    var homeEvent = $A.get("e.force:navigateToObjectHome");
3    homeEvent.setParams({
4        "scope": "myNamespace__myObject__c"
5    });
6    homeEvent.fire();
7}

This event is supported in Salesforce1 only. If used outside of Salesforce1, this event won’t be handled properly.

Note

Attribute Name Type Description
scope String Required. The API name of the custom or standard object, such as “Contact”, or “namespace__objectName__c”.
resetHistory Boolean Resets history if set to true. Defaults to false, which provides a Back button in Salesforce1.