Skip to main content
improved formatting
Source Link
highfive
  • 6.3k
  • 3
  • 32
  • 58

Can anyone please help me with the code below and why I am getting a null exception

public with sharing class activitiesdashboard {
    public list<Transport__c> activities {get; set;}
    public List<Trip_Activity__c> internalActivities {get; set;}
    public set<Id> actIds;
    public timeZone tz {get;set;}
    public string location {get;set;}
    public datetime refreshDate {get;set;}
    public Id taId;
    public List<Id> IdList;
    
    public activitiesdashboard() {
        tz = UserInfo.getTimeZone();
        location = apexpages.currentPage().getparameters().get('Site');
        activitydetails(); 
        internalActivityDetails();
    } 

    public void internalActivityDetails(){
        //retrieve the data required
        string recordtypecontains = '%'+location+'%';
        internalActivities = [select Id,trip__r.Group_Name__c,trip__r.Group_SYCO_ID__c,Patron_ID__c,Patron_Name_E__c,Activity_Type__c,Car__c,
                   start_time__c,pax__c,venue__c,pickup_time__c,end_time__c,Host__r.name,trip__r.Patron_Type__c
                      from Trip_Activity__c where recordtype.name LIKE :recordtypecontains 
                      order by start_time__c asc limit 10];`10];
          for(integer i=0;i < internalActivities.size();i++)
           {
            taId =   internalActivities[i].id;  
            actIds.add(taId);
           }
   }
}

Can anyone please help me with the code below and why I am getting a null exception

public with sharing class activitiesdashboard {
    public list<Transport__c> activities {get; set;}
    public List<Trip_Activity__c> internalActivities {get; set;}
    public set<Id> actIds;
    public timeZone tz {get;set;}
    public string location {get;set;}
    public datetime refreshDate {get;set;}
    public Id taId;
    public List<Id> IdList;
    
    public activitiesdashboard() {
        tz = UserInfo.getTimeZone();
        location = apexpages.currentPage().getparameters().get('Site');
        activitydetails(); 
        internalActivityDetails();
    } 

    public void internalActivityDetails(){
        //retrieve the data required
        string recordtypecontains = '%'+location+'%';
        internalActivities = [select Id,trip__r.Group_Name__c,trip__r.Group_SYCO_ID__c,Patron_ID__c,Patron_Name_E__c,Activity_Type__c,Car__c,
                   start_time__c,pax__c,venue__c,pickup_time__c,end_time__c,Host__r.name,trip__r.Patron_Type__c
                      from Trip_Activity__c where recordtype.name LIKE :recordtypecontains 
                      order by start_time__c asc limit 10];`
          for(integer i=0;i < internalActivities.size();i++)
           {
            taId =   internalActivities[i].id;  
            actIds.add(taId);
           }
   }
}

Can anyone please help me with the code below and why I am getting a null exception

public with sharing class activitiesdashboard {
    public list<Transport__c> activities {get; set;}
    public List<Trip_Activity__c> internalActivities {get; set;}
    public set<Id> actIds;
    public timeZone tz {get;set;}
    public string location {get;set;}
    public datetime refreshDate {get;set;}
    public Id taId;
    public List<Id> IdList;
    
    public activitiesdashboard() {
        tz = UserInfo.getTimeZone();
        location = apexpages.currentPage().getparameters().get('Site');
        activitydetails(); 
        internalActivityDetails();
    } 

    public void internalActivityDetails(){
        //retrieve the data required
        string recordtypecontains = '%'+location+'%';
        internalActivities = [select Id,trip__r.Group_Name__c,trip__r.Group_SYCO_ID__c,Patron_ID__c,Patron_Name_E__c,Activity_Type__c,Car__c,
                   start_time__c,pax__c,venue__c,pickup_time__c,end_time__c,Host__r.name,trip__r.Patron_Type__c
                      from Trip_Activity__c where recordtype.name LIKE :recordtypecontains 
                      order by start_time__c asc limit 10];
          for(integer i=0;i < internalActivities.size();i++)
           {
            taId =   internalActivities[i].id;  
            actIds.add(taId);
           }
   }
}
formatted
Source Link
highfive
  • 6.3k
  • 3
  • 32
  • 58

Can anyone please help me with the code below and why I am getting a null exception

public with sharing class activitiesdashboard {
    public list<Transport__c> activities {get; set;}
    public List<Trip_Activity__c> internalActivities {get; set;}
    public set<Id> actIds;
    public timeZone tz {get;set;}
    public string location {get;set;}
    public datetime refreshDate {get;set;}
    public Id taId;
    public List<Id> IdList;
    
    public activitiesdashboard() {
        tz = UserInfo.getTimeZone();
        location = apexpages.currentPage().getparameters().get('Site');
        activitydetails(); 
        internalActivityDetails();
    } 

   `public public void internalActivityDetails(){
        //retrieve the data required
        string recordtypecontains = '%'+location+'%';
        internalActivities = [select Id,trip__r.Group_Name__c,trip__r.Group_SYCO_ID__c,Patron_ID__c,Patron_Name_E__c,Activity_Type__c,Car__c,
                   start_time__c,pax__c,venue__c,pickup_time__c,end_time__c,Host__r.name,trip__r.Patron_Type__c
                      from Trip_Activity__c where recordtype.name LIKE :recordtypecontains 
                      order by start_time__c asc limit 10];`
         `for for(integer i=0;i < internalActivities.size();i++)
           {
            taId =   internalActivities[i].id;  
            actIds.add(taId);
           }
   }
}

Can anyone please help me with the code below and why I am getting a null exception

public with sharing class activitiesdashboard {
    public list<Transport__c> activities {get; set;}
    public List<Trip_Activity__c> internalActivities {get; set;}
    public set<Id> actIds;
    public timeZone tz {get;set;}
    public string location {get;set;}
    public datetime refreshDate {get;set;}
    public Id taId;
    public List<Id> IdList;
    
    public activitiesdashboard() {
        tz = UserInfo.getTimeZone();
        location = apexpages.currentPage().getparameters().get('Site');
        activitydetails(); 
        internalActivityDetails();
    } 

   `public void internalActivityDetails(){
        //retrieve the data required
        string recordtypecontains = '%'+location+'%';
        internalActivities = [select Id,trip__r.Group_Name__c,trip__r.Group_SYCO_ID__c,Patron_ID__c,Patron_Name_E__c,Activity_Type__c,Car__c,
                   start_time__c,pax__c,venue__c,pickup_time__c,end_time__c,Host__r.name,trip__r.Patron_Type__c
                      from Trip_Activity__c where recordtype.name LIKE :recordtypecontains 
                      order by start_time__c asc limit 10];`
         `for(integer i=0;i < internalActivities.size();i++)
           {
            taId =   internalActivities[i].id;  
            actIds.add(taId);
           }
   }
}

Can anyone please help me with the code below and why I am getting a null exception

public with sharing class activitiesdashboard {
    public list<Transport__c> activities {get; set;}
    public List<Trip_Activity__c> internalActivities {get; set;}
    public set<Id> actIds;
    public timeZone tz {get;set;}
    public string location {get;set;}
    public datetime refreshDate {get;set;}
    public Id taId;
    public List<Id> IdList;
    
    public activitiesdashboard() {
        tz = UserInfo.getTimeZone();
        location = apexpages.currentPage().getparameters().get('Site');
        activitydetails(); 
        internalActivityDetails();
    } 

    public void internalActivityDetails(){
        //retrieve the data required
        string recordtypecontains = '%'+location+'%';
        internalActivities = [select Id,trip__r.Group_Name__c,trip__r.Group_SYCO_ID__c,Patron_ID__c,Patron_Name_E__c,Activity_Type__c,Car__c,
                   start_time__c,pax__c,venue__c,pickup_time__c,end_time__c,Host__r.name,trip__r.Patron_Type__c
                      from Trip_Activity__c where recordtype.name LIKE :recordtypecontains 
                      order by start_time__c asc limit 10];`
          for(integer i=0;i < internalActivities.size();i++)
           {
            taId =   internalActivities[i].id;  
            actIds.add(taId);
           }
   }
}
added 122 characters in body
Source Link
Eric
  • 54.4k
  • 11
  • 104
  • 196

Can anyone please help me with the code below and why I am getting a null exception

`public with sharing class activitiesdashboard { public list<Transport__c> activities {get; set;} public List<Trip_Activity__c> internalActivities {get; set;} public set actIds; public timeZone tz {get;set;} public string location {get;set;} public datetime refreshDate {get;set;} public Id taId; public List IdList;

public with sharing class activitiesdashboard {
    public list<Transport__c> activities {get; set;}
    public List<Trip_Activity__c> internalActivities {get; set;}
    public set<Id> actIds;
    public timeZone tz {get;set;}
    public string location {get;set;}
    public datetime refreshDate {get;set;}
    public Id taId;
    public List<Id> IdList;
    
    public activitiesdashboard() {
        tz = UserInfo.getTimeZone();
        location = apexpages.currentPage().getparameters().get('Site');
        activitydetails(); 
        internalActivityDetails();
    } 

   `public void internalActivityDetails(){
        //retrieve the data required
        string recordtypecontains = '%'+location+'%';
        internalActivities = [select Id,trip__r.Group_Name__c,trip__r.Group_SYCO_ID__c,Patron_ID__c,Patron_Name_E__c,Activity_Type__c,Car__c,
                   start_time__c,pax__c,venue__c,pickup_time__c,end_time__c,Host__r.name,trip__r.Patron_Type__c
                      from Trip_Activity__c where recordtype.name LIKE :recordtypecontains 
                      order by start_time__c asc limit 10];`
         `for(integer i=0;i < internalActivities.size();i++)
           {
            taId =   internalActivities[i].id;  
            actIds.add(taId);
           }
   }
}

public void internalActivityDetails(){ //retrieve the data required string recordtypecontains = '%'+location+'%'; internalActivities = [select Id,trip__r.Group_Name__c,trip__r.Group_SYCO_ID__c,Patron_ID__c,Patron_Name_E__c,Activity_Type__c,Car__c, start_time__c,pax__c,venue__c,pickup_time__c,end_time__c,Host__r.name,trip__r.Patron_Type__c from Trip_Activity__c where recordtype.name LIKE :recordtypecontains order by start_time__c asc limit 10]; for(integer i=0;i < internalActivities.size();i++) { taId = internalActivities[i].id; actIds.add(taId); } } }

Can anyone please help me with the code below and why I am getting a null exception

`public with sharing class activitiesdashboard { public list<Transport__c> activities {get; set;} public List<Trip_Activity__c> internalActivities {get; set;} public set actIds; public timeZone tz {get;set;} public string location {get;set;} public datetime refreshDate {get;set;} public Id taId; public List IdList;

public activitiesdashboard() {
    tz = UserInfo.getTimeZone();
    location = apexpages.currentPage().getparameters().get('Site');
    activitydetails(); 
    internalActivityDetails();
} 

public void internalActivityDetails(){ //retrieve the data required string recordtypecontains = '%'+location+'%'; internalActivities = [select Id,trip__r.Group_Name__c,trip__r.Group_SYCO_ID__c,Patron_ID__c,Patron_Name_E__c,Activity_Type__c,Car__c, start_time__c,pax__c,venue__c,pickup_time__c,end_time__c,Host__r.name,trip__r.Patron_Type__c from Trip_Activity__c where recordtype.name LIKE :recordtypecontains order by start_time__c asc limit 10]; for(integer i=0;i < internalActivities.size();i++) { taId = internalActivities[i].id; actIds.add(taId); } } }

Can anyone please help me with the code below and why I am getting a null exception

public with sharing class activitiesdashboard {
    public list<Transport__c> activities {get; set;}
    public List<Trip_Activity__c> internalActivities {get; set;}
    public set<Id> actIds;
    public timeZone tz {get;set;}
    public string location {get;set;}
    public datetime refreshDate {get;set;}
    public Id taId;
    public List<Id> IdList;
    
    public activitiesdashboard() {
        tz = UserInfo.getTimeZone();
        location = apexpages.currentPage().getparameters().get('Site');
        activitydetails(); 
        internalActivityDetails();
    } 

   `public void internalActivityDetails(){
        //retrieve the data required
        string recordtypecontains = '%'+location+'%';
        internalActivities = [select Id,trip__r.Group_Name__c,trip__r.Group_SYCO_ID__c,Patron_ID__c,Patron_Name_E__c,Activity_Type__c,Car__c,
                   start_time__c,pax__c,venue__c,pickup_time__c,end_time__c,Host__r.name,trip__r.Patron_Type__c
                      from Trip_Activity__c where recordtype.name LIKE :recordtypecontains 
                      order by start_time__c asc limit 10];`
         `for(integer i=0;i < internalActivities.size();i++)
           {
            taId =   internalActivities[i].id;  
            actIds.add(taId);
           }
   }
}
Source Link
user27749
  • 494
  • 1
  • 13
  • 26
Loading