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
nitin Sharma 401nitin Sharma 401 

Apex Invocable process Invocation from Flow builder

Hi Everybody,

I have been sending few accoint names from the flow to the Apex Invocable method and that method is suppose to return accountids back to us but it's giving me the below given error

Error Occurred: The number of results does not match the number of interviews that were executed in a single bulk execution request.

global class lookUpAccountAnnotation 
{
   @InvocableMethod
   public static list<list<string>>getAccountIds(list<list<string>>names)
    {
      //wew.add(new List<String>{'VEC209_ALGE', '2751282.05'});
    list<string>fullnames=new list<string>();
    //list<string>strn1=new list<string>(names);
    list<string>t=new list<string>();
    for(list<string>strn:names)
    {
    
    for(integer i=0;i<strn.size();i++)
    {
        fullnames.add(strn[i]);
      }
    }
    List<Account> accounts = [SELECT Id FROM Account WHERE Name in :fullnames];
    //list<List<String>>accountids = new list<List<String>>();
    list<list<string>>accountids=new list<list<string>>();
    for(Account acc:accounts)
    {
      //wew.add(new List<String>{'VEC209_ALGE', '2751282.05'});
    accountids.add(new list<string>{(acc.id)});
     
    }
    
    for(list<string>Accids:accountids)
    {
    
    System.debug('Now show moe he errors'+accids);
    
    }
     return accountids;  
 }
 }
I have am sending three account names from the flow to the apex and  after querying those accoints it is suppose to return the id's of of the Account but it's giving me the following error.

Error Occurred: The number of results does not match the number of interviews that were executed in a single bulk execution request.