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
Priya Sharma 37Priya Sharma 37 

Send multiple parameters to invocable method

Hi All,
Is there any alternative way to pass more than one parameters through visual flow to invocable method?
Manj_SFDCManj_SFDC
Hi Priya ,

you can override your actual method with another method which accpets one parameter of List of primitives then use split and invoke your actual method. 

public with sharing class InvokeMultipleParams {

    public static String concateString(String  str1,String str2){
        return str1+str2;
    }

    @InvocableMethod(label='mulParams' description='mulParams')
    public static void innerMethodInvocable(List<String> values){
        concateString("John", "Smith");
    }    
}
AthiSachiAthiSachi
hi priya,
Do you have any update?

Thanks
Athi
Saravana Kumar G 1Saravana Kumar G 1
Hi Priya,
You can Pass multiple parameters in invocable methods by creating an inner class with variables mentioned with @InvocableVariable.