You need to sign in to do that
Don't have an account?
andyaldis1.3969086903835708E12
Wrapper class error Invalid Type when I try to declare a new List
I am trying to write a wrapper class so I can create a combined lists of tasks and events, I have found several examples and documents that say to define a new public list, but whenever I try to add the list (below in bold). I get the following error: Invalid type: accountWrapper. Every example I see looks like they are doing the exact same thing so why do I get the error?
public with sharing class CTRL_MCContactActivities {
private Contact theContact;
public Map<String, String> params {get;set;}
public Integer getRetailActivitesCount {get;set;}
public String conId;
public List<Activity_Contact__c> activities {set;get;}
public List<accountWrapper> display_list {get; set;}
Public List<Task> taskList {get; set;}
Public List<Event> eventList {get; set;}
Public integer tC = 0;
Public integer eC = 0;
public string activityId {get; set;}
public string activityType {get; set;}
public string createdDate {get; set;}
public string meetingType {get; set;}
public string subject {get; set;}
public string activityDate {get; set;}
public string description {get; set;}
public string activityStatus {get; set;}
public string ownerName {get; set;}
public CTRL_MCContactActivities(ApexPages.StandardController controller) {
theContact = (Contact) controller.getRecord();
If (theContact != null) {
activities = [SELECT Contact__c, Activity_Type__c, Activity_Subtype__c, Subject__c, Due_Date__c,
Short_Description__c, Activity_Status__c, Assigned_To__c
FROM Activity_Contact__c
WHERE Contact__c = :theContact.Id
ORDER BY Due_Date__c DESC
LIMIT 50];
} else {
activities = new List<Activity_Contact__c>();
}
}
// remove this comment }
public class activityWapper{
}
public Integer getRetailActivitesCount() {
return [SELECT count() FROM Task WHERE Id in (Select taskId from taskRelation where Relationid = :conId) AND (RecordTypeId = '0126000000018NT' OR RecordTypeId = '0126000000018NU')];
}
}
public with sharing class CTRL_MCContactActivities {
private Contact theContact;
public Map<String, String> params {get;set;}
public Integer getRetailActivitesCount {get;set;}
public String conId;
public List<Activity_Contact__c> activities {set;get;}
public List<accountWrapper> display_list {get; set;}
Public List<Task> taskList {get; set;}
Public List<Event> eventList {get; set;}
Public integer tC = 0;
Public integer eC = 0;
public string activityId {get; set;}
public string activityType {get; set;}
public string createdDate {get; set;}
public string meetingType {get; set;}
public string subject {get; set;}
public string activityDate {get; set;}
public string description {get; set;}
public string activityStatus {get; set;}
public string ownerName {get; set;}
public CTRL_MCContactActivities(ApexPages.StandardController controller) {
theContact = (Contact) controller.getRecord();
If (theContact != null) {
activities = [SELECT Contact__c, Activity_Type__c, Activity_Subtype__c, Subject__c, Due_Date__c,
Short_Description__c, Activity_Status__c, Assigned_To__c
FROM Activity_Contact__c
WHERE Contact__c = :theContact.Id
ORDER BY Due_Date__c DESC
LIMIT 50];
} else {
activities = new List<Activity_Contact__c>();
}
}
// remove this comment }
public class activityWapper{
}
public Integer getRetailActivitesCount() {
return [SELECT count() FROM Task WHERE Id in (Select taskId from taskRelation where Relationid = :conId) AND (RecordTypeId = '0126000000018NT' OR RecordTypeId = '0126000000018NU')];
}
}
All Answers