0

I have created an LWC which I put on a vf page since we are in classic. My challenge whether its possible to have the menu tabs at the top just like in classic as illustrated in the attached images.Classic table with tabs

Lightning table no tabs

1

In Classic, create a Visualforce Page that uses Lightning Out, and add the component in the code.

In Lightning, you can create a Lightning App Page in the Lightning App Builder, add the component to the page, and then you can add it as a tab in the Lightning Experience.

1
  • Thanks for your reply. Unfortunately, that is exactly what I have done. The page showing the lightning table has been added to a vf page which has lightning out. But it doesn't open inside saleforce as the one done purely in classic vf page. The url is showing also that its a vf page containing the lightning table if you check.
    – Pauline
    Jan 30 at 16:08
0

I got it finally.

On the visualforce page with the lightning out, I set the header and sidebar to true.

<apex:page showHeader="true" sidebar="true" readOnly="false">
  <apex:includeLightning />
  <div id="LightningComponentid" />
  <script>
    var paymentID = "{!$CurrentPage.parameters.id}";
    var accID = "{!$CurrentPage.parameters.aid}";
    console.log("Payment ID " + paymentID);
    console.log("Received account ID : " + accID);
    $Lightning.use("c:ApplyPaymentsLWCApp", function () {
      $Lightning.createComponent(
        "c:applyPaymentsLWC",
        { recordId: paymentID, accountId: accID },
        "LightningComponentid",
        function (cmp) {
          console.log("LWC Component added in VF page");
        }
      );
    });
  </script>
</apex:page>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.