Skip to main content
Hi all,

I created a screen flow that updates a number of Payment records for the opportunity that the user wants to update.

Full screen shots are in this post (https://trailblazers.salesforce.com/answers?id=9064S000000D6aK), in the answer marked Best Answer.

I now want to run it as a one off process to update all Payment records for all opportunities. So I created a slightly different version of the screen flow (without a confirmation screen*) and a calling screen flow that gets all existing opportunity records and calls the updating flow for every opportunity. *The only reason this is a screen flow is that I created it from the original version and it won't let me change the flow type from a screen flow to an auto-launch flow without re-writing the flow.

Both flows work on a small number of opportunities but when I try to run them for all opportunities (We only have 250), I get this error message:

Error element Update_varPaymentUpdList_Records (FlowRecordUpdate).

The flow tried to update these records: null. This error occurred: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: npsp.TDTM_Payment: System.LimitException: npsp:Too many SOQL queries: 101. You can look up ExceptionCode values in the SOAP API Developer Guide (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_concepts_core_data_objects.htm" style="color:blue; text-decoration:underline).---The flow tried to update these records: null. This error occurred: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: npsp.TDTM_Payment: System.LimitException: npsp:Too many SOQL queries: 101. You can look up ExceptionCode values in the SOAP API Developer Guide (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_concepts_core_data_objects.htm" style="color:blue; text-decoration:underline

).

I can create a work-around by only running the process in small batches manually (with adding an indication on the opportunity object to let me know if the record was already processed. But I wonder if there is an easier/more clever way of resolving this.

Many thanks!
3 answers
  1. Sep 14, 2020, 4:08 PM

    Update: I was able to play with a newly created auto-launch flow and I created a Pause element. I understand that I can:

    1. Run the Update Records
    2. Call the Pause element with a pause condition that the Update Records element was visited
    3. Define the Resume Event as the date/time of the flow with a 0 hour offset

    But the Pause element needs to be called and then call another element and I'm not sure how to structure it so that the Pause happens after the records are updated and then quits the flow to allow it to be called again from the calling screen flow.

Loading
0/9000