function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Luciano Straccia 7Luciano Straccia 7 

Flow Error: number of results do not match

I have a flow that updates a field (using a function created in Apex) and performs an action to send email.
When I load more than 1 record (with the DataLoader) it generates an error:
 
Se ha producido un error: El número de resultados no coincide con el número de entrevistas que se han ejecutado en una única solicitud de ejecución masiva.
Flow Error: Number of results do not match the number of interviews that have been carried out in a single execution request.
 
Only occurs with load of 2 or + records. 
If with Data Loader I load only 1 record it works correctly.
Some idea about this problem?
Thanks
HarshHarsh (Salesforce Developers) 
Hi Luciano,

Can you please share the apex code and screenshot of the flows? If possible please elaborate your question with details

Thanks
Atosi MalakarAtosi Malakar
Hi Luciano,
Is there any specific reason for updating field  from apex. If possible use Update Record element from flow , which is bulkified and can handel multiple records.

Regards
Atosi
Luciano Straccia 7Luciano Straccia 7
Hi Atosi. The apex code is a complex code (that's why I use apex) that generates a text that will be sent by mail. The update is done from the flow (attached image with the flow). The first step generate a text (into apex action) and the second step update the field with these text.
User-added image
Thanks.
Troy KasonTroy Kason
To resolve this, start by reviewing your Flow's logic and the Apex function it calls to ensure they can handle bulk record processing effectively. Debugging tools can help pinpoint the issue, and conducting bulk testing with smaller record sets can isolate the problem's source. Additionally, be mindful of Salesforce governor limits and consider any resource limitations within your instance. If needed, consult Salesforce Support for specialized assistance in resolving this issue and ensuring your Flow functions correctly for bulk record operations. I explored this  https://factbasket.com/ platform for getting guidance regarding my technical issues but havn't find a proper solution this time.