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
madhu_ramadhu_ra 

Include Standard Lightning Component in Visualforce Page

Can anybody please let me know if there's a way to include Standard lightning component in a visualforce page?

Simply what I'm trying is to have lightning lookup component in a Visualforce page(which uses SLDS) since we need 'Create New' function to be there in lookup window(popup). Enabling 'Quick Action' won't help as it's by passing validation as well as can't add/ remove fields from the layout.

Thank in advance
Raj VakatiRaj Vakati
Refer this link 

https://rajvakati.com/2018/04/02/using-lightning-components-in-visualforce-page/

https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_visualforce.htm

Step 1 :  Creating an App with Lightning Dependency App
<aura:application access="GLOBAL" extends="ltng:outApp"> 
    <aura:dependency resource="ui:button"/>
</aura:application>
Step 2 : Creating a Component on a Page

 
<apex:page>
    <apex:includeLightning />

    <div id="lightning" />

    <script>
        $Lightning.use("c:lcvfTest", function() {
          $Lightning.createComponent("ui:button",
          { label : "Press Me!" },
          "lightning",
          function(cmp) {
            // do some stuff
          });
        });
    </script>
</apex:page>


 
madhu_ramadhu_ra
Hi Raj,

Thanks for the links.

Here they are talking about creatig custom components and adding them in Visualforce Page. I just want to know about adding standard component into a Visualforce page.

Because if we are going to develop it from the scratch we will have to do opening popup, filtering results on key press, handle Create New function, associating back the lookup to parent window, etc.

I want to know if there's easy way to do this as Salesforce is always making developer's life easier and development faster.

Thanks