Skip to main content
85 votes
Accepted

LWC navigation error: "this[f.NavigationMixin.Navigate] is not a function"

Apply the NavigationMixin function to your component’s base class: export default class MyLwcComponent extends NavigationMixin(LightningElement) { Hopefully this saves 3 mins of searching for those ...
Brent Bowers's user avatar
  • 3,144
28 votes
Accepted

How to navigate in lightning out?

I ran into the same issue. I have Lightning Components I want to use in VF pages AND in Lightning apps running in the Lightning Experience. I also didn't want to update the components to check to see ...
Joe B's user avatar
  • 1,182
15 votes
Accepted

Can lightning:navigation be used in Communities

lightning:navigation is not supported in communities .Take a look at Summer18 release notes here that clearly mentions below These resources aren’t supported in other containers, such as Lightning ...
Mohith Shrivastava's user avatar
12 votes
Accepted

Create record in Lightning with populated fields

URL hacks are not supported in Lightning Experience. The best way to prepopulate fields in Lightning Experience is to use actions. For example: on the Account object I created an action to create a ...
Jenny B's user avatar
  • 10.5k
12 votes

Create record in Lightning with populated fields

From the Summer '17 Release Notes - Prepopulate Fields on a Record Create Panel Speed up record creation with prepopulated field values. The sforce.one.createRecord function now includes ...
Daniel Ballinger's user avatar
11 votes
Accepted

How to open a report using LWC navigation in a new tab?

You can do it via: navigateToReport(event) { // Make sure the event is only handled here event.stopPropagation(); // Navigate to the Contact object's Recent list view. this[...
Phil W's user avatar
  • 36.9k
10 votes

How to navigate in lightning out?

Here is what I use on my page/template to control navigation based on the theme of the current context. <script> function goHome(){ ForceUI.isSalesforce1() ? sforce.one....
Eric's user avatar
  • 54.2k
10 votes
Accepted

Winter 17 - Where to customize the Lightning Navigation Menus ?

Actually figured it out. Indeed, the navigation menus has been deleted in Winter 17. Instead we will need to upgrade an app to a Lightning App where you will be able to set the Navigation Menus.
brovasi's user avatar
  • 5,685
9 votes

Lightning Web Components: navigate to the 'new' object page passing in specific record type Id?

I did find a workaround/hack your welcome to try. I looked at the URL when I Went to the account page, and hit the new button and I found a url that looks like this: '/lightning/o/Account/new?...
Joshua Cruz's user avatar
9 votes
Accepted

LWC Navigation (NavigationMixin) Bug. CurrentPageReference Becomes undefined and won't navigate?

Wooooow, I finally figured it out. Changing { type: 'comm__namedPage', attributes: { pageName: yourPageName } } to { type: 'comm__namedPage', attributes: { ...
Luke's user avatar
  • 413
8 votes

LWC navigation issue in communities

I came in this answer I think we have one more way to do it. You can pass parameters to the community with the following Page to pass the parameters this[NavigationMixin.Navigate]({ type: '...
Henrique Cabral's user avatar
7 votes

How to open a report using LWC navigation in a new tab?

I know this is old and you have probably figured it out by now, but I thought I would answer this one as it seems to be one of the top results on Google. Per the documentation here, you can use the ...
Tim Wilson's user avatar
6 votes

Create record in Lightning with populated fields

It's not documented, so use at your own risk, but you can pass the default values on an attribute named "defaultFieldValues". So for instance, you could create a task and send defaults like this: var ...
Kevin M's user avatar
  • 71
6 votes

Open link in another tab with e.force:navigateToURL

As far as I understand, the navigation event will use the same window/tab if you give it a URL inside your salesforce instance. So, to get what you want, I think you could just use plain JS: window....
Aidan's user avatar
  • 13.7k
6 votes

How is <a>-tag-navigation to URLs and Objects done in Lightning (Summer'18)?

From Summer18 I think one should use lightning:navigation component and the pagereference object that comes along with it . The link here shows various possibilities within the lightning experience . ...
Mohith Shrivastava's user avatar
6 votes
Accepted

URL Type for Lighting:Datatable opens in new tab in console navigation

You can use the target attribute inside typeAttributes , as part of the column definition for your data table. Here's an example of hyperlinking the Case Number column in a Case data table: { ...
David Reed's user avatar
  • 93.2k
6 votes
Accepted

LWC navigation issue in communities

In communities, only comm__namedPage page-reference will work. It will navigate to specified community page within community. You have to use component/page inside community page. Although you can ...
salesforce-sas's user avatar
5 votes

Navigation in a Lightning App

You are probably going to want to use "events" to do this. The approach I would consider comprises the following: 1) A Navigation component with links/buttons that fire a lightning event (this is ...
Simon Lawrence's user avatar
5 votes

How to open VF page in lightning Experience using URL link?

I would recommend that you add conditional code at the top of your page that determines what environment the User is currently in, then either displays the page using the Lightning experience where it ...
crmprogdev's user avatar
5 votes
Accepted

Connecting multiple VF pages

If you have multiple pages that use the same controller extension (a common pattern for creating a series of wizard pages connected via Next/Previous) then the controller values are preserved between ...
Keith C's user avatar
  • 136k
4 votes

Anchor Tag equivalent in Lightning Component

I don't know if you ended up finding a solution, but I'm using the scrollIntoView() method linked to by Praveen, and it works with Locker Service enabled (I'm on Winter '17 at the time of this post) ...
Stephen's user avatar
  • 303
4 votes
Accepted

Where is the Workbench in Lightning Experience?

Workbench is an application which uses salesforce for authentication purpose and then perform operations on the data and metadata of the same salesforce org. It does not have anything to do with ...
Mr.Frodo's user avatar
  • 5,802
4 votes
Accepted

Remove home menu item from lightning community navigation menu

ootb, you cant really remove it. Yes you can hide it using CSS however, if there is a community Update that changes the CSS class, then your CSS rule is most likely going to break, re-exposing the ...
glls's user avatar
  • 20.2k
4 votes

Can lightning:navigation be used in Communities

There's been an update for this since the best answer was posted and it's now possible to navigate around at your heart's content. Here's how: On the component: <!-- exampleComponent.cmp --> &...
Dunks184's user avatar
4 votes
Accepted

Lightning Experience - Edit override with nooverride option

It seems that there is a way around this - It feels a bit imperfect, but it seems to work for us. You can use and fire a view event (with nooverride) immediately followed by an Edit event. Component:...
Bigears's user avatar
  • 1,131
4 votes
Accepted

Open New Tab in Lightning Out?

I don't see any issues using window.open(). According to Locker API Viewer open is supported. I have a lightning component that leverages LDS sitting in lighting experience that opens a tableau ...
Hemavantha Rajesh Varma Mudunu's user avatar
4 votes

Lightning Web Components: navigate to the 'new' object page passing in specific record type Id?

Follow the below procedure, to have a different record type at the time of creation of new record. I have used capital R for RecordTypeID, it didn't work. when changed to small 'r' like this ...
Zakeer's user avatar
  • 41
4 votes

lightning:navigation not passing the States in URL

This feature is getting auto activated in Summer 19 release and could be the reason: Add a Namespace Prefix to pageReference.state Properties and Query Parameters As mentioned in the Spring ’...
ISHAAN MOTWANI's user avatar
4 votes

LWC - Handling Save Event on Record Edit Page

Hi, i had this same problem but i ended up creating a custom lwc for the update. Like this: ...
dibocor's user avatar
  • 1,317
4 votes

Issue with LWC Flow Navigation

Not sure if you are still looking for answer to this question but using documentation provided here: https://developer.salesforce.com/docs/component-library/bundle/lightning-flow-support/documentation ...
user569925's user avatar
  • 1,179

Only top scored, non community-wiki answers of a minimum length are eligible