Activity Forums Salesforce® Discussions Use same Apex Class for Visualforce Page and Lightning Component in Salesforce

  • Use same Apex Class for Visualforce Page and Lightning Component in Salesforce

    Posted by krati on April 9, 2020 at 5:00 pm

    Can we use same Apex Class for Visualforce Page and Lightning Component in Salesforce?

    Deepak replied 4 years, 7 months ago 2 Members · 1 Reply
  • 1 Reply
  • Deepak

    Member
    April 9, 2020 at 5:18 pm

    You can use the same controller class but cannot share data via the controller fields. Lightning Components do not support the view state mechanism that is used in Visualforce (as that design approach tends to lead to unnecessary data being moved to and from the client). Yes, you could use the same controller.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Salesforce Admin Certification 2020 Questions Explained with References - Part II

Video in

How to prepare and pass Salesforce Admin Certification with Practice Exam Questions 2020 practice questions and answers for the Salesforce Administration Salesforce Certified Admin Exam Questions Salesforce Administrator Certification Exam…