I'm building an Apex action for Process Builder and would ideally like to pass in a list of strings as an @InvocableVariable. Per the SFDC documentation, "The data type of the invocable variable must be[... a] primitive data type or a list of a primitive data type."
I can create an @InvocableVariable as follows and it compiles fine, but I can't for the life of me figure out how to populate the variable from within Process Builder.
@InvocableVariable (label='Fields to Query' required=false) public list<string> fieldsToQuery;
The desired use case is to allow the user to define zero, one, or many field names which will then be queried, json-encoded, and used in the Apex method.
My last resort is to just accept a comma-delimited string, but I don't think that should be necessary :(. Any ideas would be greatly appreciated!