0
    List<Event> newEventModuled = new List<Event>();
    newEventModuled = [select Ownerid,Subject,what.name,Description__c,ShowAs,Time_Spent_In_minutes__c, 
                        StartDateTime, EndDateTime,IsAllDayEvent,Description,Location,IsPrivate,account.Name,
                        Activity_Type__c,Channel_partner_Visit__c,Customer_Partner_Visit_Activity__c,
                        Location__c,Daily_Activity__c,OwnerComments__c,DescriptionEvent__c,UndecidedEventInviteeIds,
                        AcceptedEventInviteeIds,(select relation.name from EventWhoRelations) 
                        from event where id IN :eventIds];

Looking at this query can someone tell exactly where my query is fetching extra data or where do i have to put limit?

Its givinh Too many Soql query 101 error in handler!

  • 3
    There is nothing wrong with this particular query regarding given issue. Issues is in a way how given code (and/or any other) is being called, f.e. in a loop. Please, check your entire code related to particular execution context for SOQL/DML in loops. – kurunve Jul 03 '18 at 12:51
  • my query is out of for loop sir.... – Ashutosh Srivastava Jul 03 '18 at 12:55
  • 1
    The "Too many SOQL: 101" error is a cumulative error. That means that the line where you get the error is not the problem (and usually is not). In order to determine the cause, you'll need to enable logging (in Developer Console: Debug > Change Log Levels...), setting the Profiling trace level to FINEST. From there, identify which SOQLs are being called the most, and try to optimize. – sfdcfox Jul 03 '18 at 13:13

0 Answers0