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
Shruthi NarsiShruthi Narsi 

VP page tp display leads error

I have written the below apex class to display the lead who are parter

For example if I select the partner lead which is a look up feild as xyz then on account page I shoud be able to see his details I am getting ebelow error

Apex class
public class PartnerLeadController {
    
   public final Account acc;
   
    public PartnerLeadController(ApexPages.StandardController stdController) {
        this.acc = (Account)stdController.getRecord();
        initlead();
    }
    List<Lead> lead;
    
    public void initlead() {
        lead = [select id,OwnerId,Owner.Name,Status,LastName,Name from Lead where Partner_Name__c = : acc.id AND  LeadSource=: 'Partner' ORDER BY Name DESC];
    }
    
    public List<Lead> getlead () {
        return lead;
    }   
    
}
Vf Page

<apex:page standardController="Account" extensions="PartnerLeadController" lightningStylesheets="true" sidebar="false" >
   
    <style>
        body {
       
        }
    </style>
    <apex:pageBlock rendered="true">
        <apex:pageBlockTable value="{!lead}" var="l">
            <apex:column >
                <apex:outputLink value="/Lead/{!l.Id}/view" target="_top">{!l.Name}</apex:outputLink>
                <apex:facet name="header">Lead Name</apex:facet>
            </apex:column>
            <apex:column >
                <apex:outputLink value="/lead/{!l.AccountId}/view" target="_top">{!l.Account.Name}</apex:outputLink>
                <apex:facet name="header">Lead Name</apex:facet>
            </apex:column>
            <apex:column >
                <apex:outputLink value="/{!l.OwnerId}" target="_top">{!l.Owner.Name}</apex:outputLink>
                <apex:facet name="header">Owner Name</apex:facet>
            </apex:column>/>
            <apex:column ><apex:outputField value="{!l.Name}" />
                <apex:facet name="header">Name</apex:facet>
            </apex:column>
            <apex:column ><apex:outputField value="{!l.Status}" />
                <apex:facet name="header">Status</apex:facet>
            </apex:column>

        </apex:pageBlockTable>
    </apex:pageBlock>      
</apex:page>

User-added image
 
SwethaSwetha (Salesforce Developers) 
HI Shruti,

It appears to be an issue with get/set methods.The below articles will give an insight on issues of similar error

https://developer.salesforce.com/forums/?id=906F000000094XKIAY
https://developer.salesforce.com/forums/?id=906F000000096eAIAQ
https://salesforce.stackexchange.com/questions/169423/unknown-property-accountstandardcontroller-showopps
 
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful.
 
Thank you
SSP AdminSSP Admin
Hi Shruthi,

It looks like our team of experts can help you resolve this ticket. We have Salesforce global help-desk support and you can log a case and our Customer Success Agents will help you solve this issue. You can also speak to them on live chat. Click on the below link to contact our help-desk. Trust me it is a support service that we are offering for free!

https://jbshelpdesk.secure.force.com

Thanks,
Jarvis SFDC team