Here is component I want to navigate to, named TestCmp:

<aura:component implements="lightning:isUrlAddressable" access="global">
    <aura:attribute name="someId" type="Id" />

And here is code of component, from which I want to havigate:

<lightning:navigation aura:id="navService"/>

            type: "standard__component",
            attributes: { componentName: "c:TestCmp" },
            state: { someId: "xx" }

When I press the button (this code is executed) nothing happens. No error message, nothing in console. Neither in community builder nor for community user. What I also find that in this code 'finally' is never executed:

            type: "standard__recordPage",
            "attributes": {
                "recordId": accountId,
                "objectApiName": "Account",
                "actionName": "view"
        }).finally(function(value) {

If I log result of generateUrl function, it says Promise object with state 'pending'

Any ideas?


These navigation resources are supported only in Lightning Experience and the Salesforce mobile app. They’re not supported in other containers, such as Lightning Components for Visualforce, Lightning Out, or Communities. This is true even if you access these containers inside Lightning Experience or the Salesforce mobile app.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.