I have created budget custom object and related it to opportunity through budget look up field. so all opportunity come under opportunity related list on budget object. Like this: enter image description here

When I am trying update budget lookup field on opportunity through process builder. I am putting hardcoded ID to update if close date greater than or equal to 01/01/2016 and less than or equal to 31/01/2016. in sandbox it is working fine but in production am getting error: "The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 301D0000000GyEj. Contact your administrator for help." Also an email came to my email address:

   An error occurred at element myRule_9_A1 (FlowRecordUpdate).
   UPDATE --- UPDATE FAILED --- ERRORS :         
   (CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY) updateexpectedamountField:   
   System.LimitException: Too many SOQL queries: 101, 

   This report lists the elements that the flow interview executed. The   
   report is a beta feature.

   We welcome your feedback on IdeaExchange.
   Flow Details
   Flow Name: Update_budget_field_on_opportunity
   Type: Workflow
   Version: 1
   Status: Active
   Flow Interview Details
   Interview Label: Update_budget_field_on_opportunity-1_Opportunity
   Current User: Salesforce Support (005D0000005texd)
   Start time: 01-02-2016 14:46
   Duration: 1 seconds
   How the Interview Started
   Salesforce Support (005D0000005texd) started the flow interview.
   Some of this flow's variables were set when the interview started.
   myVariable_old = 006D000000iDNKfIAO
   myVariable_current = 006D000000iDNKfIAO
   ASSIGNMENT: myVariable_waitStartTimeAssignment
   {!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}
    {!myVariable_waitStartTimeVariable} = "01-02-2016 14:46"
     ECISION: myDecision
     Executed this outcome: myRule_9
     Outcome conditions: and
     1. {!myVariable_current.CloseDate} (30. September 2016) Greater   
     than or equal 1. September 2016

     2. {!myVariable_current.CloseDate} (30. September 2016) Less than or   
     equal 30. September 2016
     Logic: All conditions must be true (AND)
     RECORD UPDATE: myRule_9_A1
     Find all Opportunity records where:
     Id Equals {!myVariable_current.Id} (006D000000iDNKfIAO)
     Update the records’ field values.
     Budget__c = a1lD0000005u4Hk
     Failed to update records that meet the filter criteria.

     Error Occurred: UPDATE --- UPDATE FAILED --- ERRORS :     
     (CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY) updateexpectedamountField: 
     System.LimitException: Too many SOQL queries: 101, 

Please suggest what to do.

  • In Sandbox, It is working fine. @ratan – Russel baker 1 Feb 1 '16 at 12:04
  • Do you have an update trigger on Opportunity? Either some Apex code is doing a lot of SOQL queries, or that code is called a lot of times. – Sander de Jong Feb 1 '16 at 12:49
  • yes I have trigger to calculate won opportunity amounts, pipeline opportunity amounts. – Russel baker 1 Feb 2 '16 at 4:44
  • It would be helpful if you posted that code. – Sander de Jong Feb 2 '16 at 7:23
  • You said you hard coded the Ids in sandbox. You may have already done this, but if you migrated anything over with change sets (the process builder?) did you change the Ids in the process builder to match the records in Production? – C Roe Mar 6 '18 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.