Tuesday, May 12, 2020

Navigate to Visualforce page from lightning web components(lwc)

To navigate to visualforce page we have to use the Navigation Service in Lightning web components.

Check below for more details about navigation service in Lightning web components

Sample Code

//Navigate to visualforce page
navigateToVFPage() {
	    type: 'standard__webPage',
	    attributes: {
		    url: '/apex/SampleVFPage?id=' + recId
    }).then(vfURL => {

1 comment:

  1. Hi,
    Could you please tell me how can we define URL in vfURL, actually I am new to LWC so dont know.