Passing parameter from button url to lightning component through visualforce page | How to add lightning component in visualforce page


In this post we are going to see how to pass parameter from button url to lightning component. We cannot call lightning component directly from button url so for that we need to use visualforce page and inside that we need to create a container type lightning component. We will also learn how to add lightning component inside visualforce page.
We are taking Opportunity Product object, in this object we cannot create quick action so we are creating Custom Button "Add Product C". (link - /apex/AddProductLightning?oppid={!Opportunity.Id}) You can see the image below.
After creating button you can see the code below



Reactions

Post a Comment

0 Comments