How to use the lightning/navigation.NavigationMixin.Navigate function in lightning

To help you get started, we’ve selected a few lightning examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github FabienHuot / KnowledgeSearch / force-app / main / default / lwc / knowledgeSearch / knowledgeSearch.js View on Github external
redirectToArticle(event) {
            // Navigate to the CaseComments related list page
            // for a specific Case record.
            event.preventDefault();

            this[NavigationMixin.Navigate]({
                type: 'standard__recordPage',
                attributes: {
                    recordId: event.currentTarget.dataset.toto,
                    objectApiName: 'Knowledge__kav',
                    actionName: 'view'
                }
            });
    }
}
github dreamhouseapp / dreamhouse-lwc / force-app / main / default / lwc / brokerCard / brokerCard.js View on Github external
handleNavigateToRecord() {
        this[NavigationMixin.Navigate]({
            type: 'standard__recordPage',
            attributes: {
                recordId: this.brokerId,
                objectApiName: 'Property__c',
                actionName: 'view'
            }
        });
    }
}
github dreamhouseapp / dreamhouse-lwc / force-app / main / default / lwc / propertySummary / propertySummary.js View on Github external
handleNavigateToRecord() {
        this[NavigationMixin.Navigate]({
            type: 'standard__recordPage',
            attributes: {
                recordId: this.recordId,
                objectApiName: 'Property__c',
                actionName: 'view'
            }
        });
    }
}