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
Piyush DeveloperPiyush Developer 

How to make a Wrapper class that collect Lead field Api Name, and its value based on lead record Id? Because I need field Api name and its value so that i will show this on LWC component

surojit Mondalsurojit Mondal
Hi Piyush,

Do a SOQL Query and return it... Something like,
 
Public Static Lead GetLeadDetails(String leadId){
    Lead rec = new Lead();
    rec= [select id From Lead Where Id =: leadId];
    return rec;
}
Please let me know if it does not serve your purpose.

Thanks!