function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shweta GargShweta Garg 

navigate to the url on clicking custom button in Lightning

Hello All,

I am having one requirement. I just want to navigate to the URL on clicking button In Lightning experience using quick actions,global actions or custom button Url either. Is thery any way through which i can achive this.

Please help me.

Hi Shweta Garg,

Please click the below links.which has a document  to "navigateToURL"


And we also have a module in trailhead to create a custom button to navigate to URL. Please check the video in below link.

Please feel free to contact me if you need any further information.

Thanks and Regards
Shweta GargShweta Garg
Hi Rahul,

Thanks for responding.  I need to use that button on detail Page of an object separately. button is not on Lightning component else on detail page of an object. Custom URl button does not work in lightning experience. any idea to implement it with quick actions?

hi Shweta Garg 
you can do this task by using Quick Action, first create a lightning component with implements="force:lightningQuickActionWithoutHeader,force:hasRecordId"  interface and then add this lightning component with quick action .
when you click on the quick action button ,on the load of the component you can navigate to URL by using force:navigateToURL event. (http://
let me inform if it helps you .