Skip to main content
added 374 characters in body
Source Link
martin
  • 12.7k
  • 10
  • 50
  • 75

I am getting this error when I am running my visualforce page

Below is my apex extension class: public with sharing class ExtensionAccount {

    public ExtensionAccount(ApexPages.StandardController controller) {

    }
    private final Account acct;  

    // The constructor passes in the standard controller defined
    // in the markup below
    public ExtensionAccount(ApexPages.StandardSetController controller) {
        this.acct = (Account)controller.getRecord(); 
    }    
    
    public ApexPages.StandardSetController TaskRecords {
        get {
            if(TaskRecords == null) {
                TaskRecords = new ApexPages.StandardSetController(
                    Database.getQueryLocator([SELECT AccountId FROM Task Where WhatId IN 
                        (Select id From Opportunity Where AccountId = :acct.Id)]));
            }
            return TaskRecords ;
        }
        private set;
    }
    public List<Task> getTaskList() {
         return (List<Task>) TaskRecords.getRecords();
    }  
}

Visualforce page

<apex:page standardController="Account" extensions="ExtensionAccount" sidebar="false"> 
<apex:pageBlock title="Opportunity"> 
<apex:pageBlockSection > 
<apex:dataList value="{!TaskList}" var="task" type="1"> {!task.accountid} </apex:dataList> 
</apex:pageBlockSection> 
</apex:pageBlock> 
</apex:form> 
</apex:page>

I am getting this error when I am running my visualforce page

Below is my apex extension class: public with sharing class ExtensionAccount {

    public ExtensionAccount(ApexPages.StandardController controller) {

    }
    private final Account acct;  

    // The constructor passes in the standard controller defined
    // in the markup below
    public ExtensionAccount(ApexPages.StandardSetController controller) {
        this.acct = (Account)controller.getRecord(); 
    }    
    
    public ApexPages.StandardSetController TaskRecords {
        get {
            if(TaskRecords == null) {
                TaskRecords = new ApexPages.StandardSetController(
                    Database.getQueryLocator([SELECT AccountId FROM Task Where WhatId IN 
                        (Select id From Opportunity Where AccountId = :acct.Id)]));
            }
            return TaskRecords ;
        }
        private set;
    }
    public List<Task> getTaskList() {
         return (List<Task>) TaskRecords.getRecords();
    }  
}

I am getting this error when I am running my visualforce page

Below is my apex extension class: public with sharing class ExtensionAccount {

    public ExtensionAccount(ApexPages.StandardController controller) {

    }
    private final Account acct;  

    // The constructor passes in the standard controller defined
    // in the markup below
    public ExtensionAccount(ApexPages.StandardSetController controller) {
        this.acct = (Account)controller.getRecord(); 
    }    
    
    public ApexPages.StandardSetController TaskRecords {
        get {
            if(TaskRecords == null) {
                TaskRecords = new ApexPages.StandardSetController(
                    Database.getQueryLocator([SELECT AccountId FROM Task Where WhatId IN 
                        (Select id From Opportunity Where AccountId = :acct.Id)]));
            }
            return TaskRecords ;
        }
        private set;
    }
    public List<Task> getTaskList() {
         return (List<Task>) TaskRecords.getRecords();
    }  
}

Visualforce page

<apex:page standardController="Account" extensions="ExtensionAccount" sidebar="false"> 
<apex:pageBlock title="Opportunity"> 
<apex:pageBlockSection > 
<apex:dataList value="{!TaskList}" var="task" type="1"> {!task.accountid} </apex:dataList> 
</apex:pageBlockSection> 
</apex:pageBlock> 
</apex:form> 
</apex:page>
added 6 characters in body
Source Link

I am gettimggetting this error when I am running my visualforce page

Below is my apex extension class: public with sharing class ExtensionAccount {

public with sharing class ExtensionAccount {

    public ExtensionAccount(ApexPages.StandardController controller) {

    }
    private final Account acct;  

    // The constructor passes in the standard controller defined
    // in the markup below
    public ExtensionAccount(ApexPages.StandardSetController controller) {
        this.acct = (Account)controller.getRecord(); 
    }    
    
    public ApexPages.StandardSetController TaskRecords {
        get {
            if(TaskRecords == null) {
                TaskRecords = new ApexPages.StandardSetController(
                    Database.getQueryLocator([SELECT AccountId FROM Task Where WhatId IN 
                        (Select id From Opportunity Where AccountId = :acct.Id)]));
            }
            return TaskRecords ;
        }
        private set;
    }
    public List<Task> getTaskList() {
         return (List<Task>) TaskRecords.getRecords();
    }  
}

I am gettimg this error when I am running my visualforce page

Below is my apex class:

public with sharing class ExtensionAccount {

    public ExtensionAccount(ApexPages.StandardController controller) {

    }
    private final Account acct;  

    // The constructor passes in the standard controller defined
    // in the markup below
    public ExtensionAccount(ApexPages.StandardSetController controller) {
        this.acct = (Account)controller.getRecord(); 
    }    
    
    public ApexPages.StandardSetController TaskRecords {
        get {
            if(TaskRecords == null) {
                TaskRecords = new ApexPages.StandardSetController(
                    Database.getQueryLocator([SELECT AccountId FROM Task Where WhatId IN 
                        (Select id From Opportunity Where AccountId = :acct.Id)]));
            }
            return TaskRecords ;
        }
        private set;
    }
    public List<Task> getTaskList() {
         return (List<Task>) TaskRecords.getRecords();
    }  
}

I am getting this error when I am running my visualforce page

Below is my apex extension class: public with sharing class ExtensionAccount {

    public ExtensionAccount(ApexPages.StandardController controller) {

    }
    private final Account acct;  

    // The constructor passes in the standard controller defined
    // in the markup below
    public ExtensionAccount(ApexPages.StandardSetController controller) {
        this.acct = (Account)controller.getRecord(); 
    }    
    
    public ApexPages.StandardSetController TaskRecords {
        get {
            if(TaskRecords == null) {
                TaskRecords = new ApexPages.StandardSetController(
                    Database.getQueryLocator([SELECT AccountId FROM Task Where WhatId IN 
                        (Select id From Opportunity Where AccountId = :acct.Id)]));
            }
            return TaskRecords ;
        }
        private set;
    }
    public List<Task> getTaskList() {
         return (List<Task>) TaskRecords.getRecords();
    }  
}
added 114 characters in body
Source Link
Ratan Paul
  • 22.8k
  • 14
  • 55
  • 99

I am gettimg this error when I am running my visualforce page

Below is my apex class:

public with sharing class ExtensionAccount {

public with sharing class ExtensionAccount {

    public ExtensionAccount(ApexPages.StandardController controller) {

    }
    private final Account acct;  

    // The constructor passes in the standard controller defined
    // in the markup below
    public ExtensionAccount(ApexPages.StandardSetController controller) {
        this.acct = (Account)controller.getRecord(); 
    }    
    
    public ApexPages.StandardSetController TaskRecords {
        get {
            if(TaskRecords == null) {
                TaskRecords = new ApexPages.StandardSetController(
                    Database.getQueryLocator([SELECT AccountId FROM Task Where WhatId IN 
                        (Select id From Opportunity Where AccountId = :acct.Id)]));
            }
            return TaskRecords ;
        }
        private set;
    }
    public List<Task> getTaskList() {
         return (List<Task>) TaskRecords.getRecords();
    }  
}

}

I am gettimg this error when I am running my visualforce page

Below is my apex class:

public with sharing class ExtensionAccount {

public ExtensionAccount(ApexPages.StandardController controller) {

}
private final Account acct;  

// The constructor passes in the standard controller defined
// in the markup below
public ExtensionAccount(ApexPages.StandardSetController controller) {
    this.acct = (Account)controller.getRecord(); 
}    

public ApexPages.StandardSetController TaskRecords {
    get {
        if(TaskRecords == null) {
            TaskRecords = new ApexPages.StandardSetController(
                Database.getQueryLocator([SELECT AccountId FROM Task Where WhatId IN 
                    (Select id From Opportunity Where AccountId = :acct.Id)]));
        }
        return TaskRecords ;
    }
    private set;
}
public List<Task> getTaskList() {
     return (List<Task>) TaskRecords.getRecords();
}  

}

I am gettimg this error when I am running my visualforce page

Below is my apex class:

public with sharing class ExtensionAccount {

    public ExtensionAccount(ApexPages.StandardController controller) {

    }
    private final Account acct;  

    // The constructor passes in the standard controller defined
    // in the markup below
    public ExtensionAccount(ApexPages.StandardSetController controller) {
        this.acct = (Account)controller.getRecord(); 
    }    
    
    public ApexPages.StandardSetController TaskRecords {
        get {
            if(TaskRecords == null) {
                TaskRecords = new ApexPages.StandardSetController(
                    Database.getQueryLocator([SELECT AccountId FROM Task Where WhatId IN 
                        (Select id From Opportunity Where AccountId = :acct.Id)]));
            }
            return TaskRecords ;
        }
        private set;
    }
    public List<Task> getTaskList() {
         return (List<Task>) TaskRecords.getRecords();
    }  
}
Source Link
Loading