I'm trying to navigate to record details of record that was created during the flow. I tried adding simple lightning component with lightning:navigation on a last screen but instead of redirection i get error:

This page has an error. You might just need to refresh it. [Cannot read property 'setParams' of undefined]

Any idea how to resolve it ?

component controller:

    doInit : function(component, event, helper) {
        let recordId = component.get('v.recordId');
        let navService = component.find("navService");
        let pageReference = {
            type: 'standard__recordPage',
            attributes: {
                "recordId": recordId,
                 "objectApiName": "Account",
                "actionName": 'view'
  • Are you using this in a standalone app or community? – Ashish Sharma Apr 9 '19 at 17:12
  • No, The flow is activated from the url list view button – Maciej Jaźnicki Apr 9 '19 at 17:18

Your Answer

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

Browse other questions tagged or ask your own question.