• Shubham Kherde
  • 0 Points
  • Member since 2016

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
  • 4
Hi all,
I am facing Too many SOQL queries: 101 error for following code but as per governor limit my SOQL Query is outside the for loop still getting this error and also showing following process builder error with this
 ( 09:59:49:020 EXCEPTION_THROWN [184]|System.DmlException: Upsert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, We can't save this record because the “Update Oppty Lookup RelatedTo Events 2 test” process failed. Give your Salesforce admin these details. This error occurred when the flow tried to update records: LIMIT_EXCEEDED: System.LimitException: Too many SOQL queries: 101. You can look up ExceptionCode values in the SOAP API Developer Guide. Error ID: 1987318438-82422 (-64273350): []   )
  Map<Id, Opportunity> oppdbmap = new Map<Id, Opportunity>(
            [select Id, Booked__c, Initial_Appt_Date_Time__c, Initial_Appt_Time__c,
                (select Id, Subject, ActivityDateTime from Events where What.Type = 'Opportunity' and ActivityDateTime != null and Subject != 'Cancelled Appointment' order by ActivityDateTime desc limit 1) 
             from Opportunity where Id in: oppevmap.keyset()]);

        // if an existing event is more recent than a new one, we will use an existing one
        for (Id oid: oppevmap.keyset()){
            Event etempnew = oppevmap.get(oid);
            Opportunity oppdb = oppdbmap.get(oid);
            Event etempdb = oppdb == null ? null : oppdb.Events == null ? null : oppdb.Events.isempty() ? null : oppdb.Events[0];
            if (etempdb != null && etempdb.ActivityDateTime != null){
                if (etempnew == null || etempnew.ActivityDateTime == null || etempdb.ActivityDateTime > etempnew.ActivityDateTime){
                    oppevmap.put(oid, etempdb);

would anyone know how I can fix?

Shubham Kherde

Guys we are getting multiple "Too many SOQL queries: 101" emails at the moment. We are using Classic.
We have not used any triggers just Process Builder for various functionality requirements. 
I have read on one of the ideas that this had been resolved and Process Builder is now "bulkified".
Can anyway guide me as to how we can resolve this
Would this only occur if there is a mass upload of records to the object where the Process Builder is built on?
  • August 17, 2017
  • Like
  • 0
Update failed. First exception on row 0 with id 00Q22000001F4nLEAS; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 301220000000ZNe. Flow error messages: <b>An unhandled fault has occurred in this flow</b><br>An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Contact your administrator for help.: []

actual process is when i am trying convert a lead in custom convert.after convert lead ststus set as a Custom Converted. after that i need to set record lock. so i am trying to set record lock by using the process bulider and Approval process.in that process i got this issuse.please fix this issuse.

otherwaise tell me how to set record lock.i know 16th winteer release. but it was not suport for my org. because my org is 16th summer.
I keep getting the following error however my button meets all of the requirements and works. 
  • To pass this challenge, create a custom button which opens a link to 'http://google.com/#q={CONTACTNAME}' - where {CONTACTNAME} is the current contact's name. Then add this button to the default 'Contact Layout'.
  • The custom button must be named 'Google Link'.
  • The custom button must be added to the 'Contact Layout' page layout.
Challenge not yet complete... here's what's wrong:
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: SOLSGVKY
User-added image