• Simon Coles 2
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
If any user performs the initial search, all searches for subsequent users are 2-3 seconds. 

Is there anyway of preventing this?  Does SFDC need to spin up the first time and can we cache the data set? 
I am trying to get some related contact information from a SOQL query but have run into the error "SOQL statements cannot query aggregate relationships more than 1 level away from the root entity object."

Here is my relationships; Activity_List__c <-- Activity_List_Contacts__c --> Contact (Junction Object)

Activities can have Sub Activities (Only one Level) Multiple contacts can be assigned to each activity.

Here is my sample SOQL query :

select id, Name, (select id, Name, (SELECT Id, Contact_Name__r.FirstName, Contact_Name__r.LastName FROM Activity_List_Contacts__r) from Activity_Lists__r limit 50000), (SELECT Id, Contact_Name__r.FirstName, Contact_Name__r.LastName FROM Activity_List_Contacts__r) from Activity_List__c where Campaign__c ='701M0000000O7Ic' limit 50000

I know I need to use a map from reading the boards but am not sure how / what I need to do to accomplish it.

Thanks Colsie
If any user performs the initial search, all searches for subsequent users are 2-3 seconds. 

Is there anyway of preventing this?  Does SFDC need to spin up the first time and can we cache the data set?