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();
    List<Lead> lead;
    public void initlead() {
        lead = [select id,OwnerId,Owner.Name,Status,LastName,Name from Lead where Partner_Name__c = : 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" >
        body {
    <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:outputLink value="/lead/{!l.AccountId}/view" target="_top">{!l.Account.Name}</apex:outputLink>
                <apex:facet name="header">Lead Name</apex:facet>
            <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:outputField value="{!l.Name}" />
                <apex:facet name="header">Name</apex:facet>
            <apex:column ><apex:outputField value="{!l.Status}" />
                <apex:facet name="header">Status</apex:facet>


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
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!

Jarvis SFDC team