How can I call lightning component from custom button on record page?
I'm trying to call lightning component when I click custom button, but I cannot do it.
How should I set the values to make a new custom button, especially in "Behavior"?
Here's the screenshot:
Best Answer
As Charles T. on this post answered:
Consequently, contrary to what Manish Anand says above, you don't have to embed the Lightning Component in a Lightning App. In fact, you can call Lightning Components not just from record detail buttons but also list buttons. Personally, I call lightning:isUrlAddressable Lightning Components constantly from related lists to navigate to subtabs with Lightning Component child object tables for easier management of child records. See the list button example below with two parameters passed in.
For instructions on how to use
lightning:isUrlAddressable
andpageReference
, see here.