Hi,
Currently, we have faced difficulties when trying to pass a list of params with Invocable Methods of Apex Class via Skuid Page.
We have a Custom Object A, and when inserting a record, we need to set many values for the record of Custom Object A. Till now, we couldn’t find any way to transmit multiple values. Please note that inserting a record in apex code is not avoidable, it is a must for our case because it is required on user’s side.
Please help giving advice to us to achieve this idea.
Thank you.
Hi Charlotte ,
You can use wrapper class to send multiple values to a Invocable Method . Please find the syntax below.
public class {
@InvocableMethod
public static <MethodName>(List<WrapperClassName > inputList){
----Use the wrapper class---
}
class {
@InvocableVariable
public string variable1
@InvocableVariable
public string variable2
@InvocableVariable
public string variable3
}
}
You can set variable values in SKUID configuration set up.
Thanks,
Shiva Kumar CH
Hi Shiva,
Thank you for your replying.
We need to insert a record which has many fields values to input, so to declare more than 20 variables like this, is not expecting solutions for us. We are looking for the method to pass model data (a record of an object with many fields values) to Invocable class.
Okay can you then convert all the values to JSON format in javascript and stringify the JSON and pass it to InvocableMethod as a single string
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.