4

I have an invocable method:

@InvocableMethod(Label = 'Submit Privacy Source')
public static void action(ActionRequest[] requestActionInList) {...}

ActionRequest is:

public with sharing class ActionRequest {
    @InvocableVariable(Label = 'Data Subject ID' Required = true)
    public Id dataSubjectId;

    @InvocableVariable(Label = 'Privacy Source Name' Required = true)
    public String privacySourceName;

    @InvocableVariable(Label = 'Consent Request Names')
    public String[] consentRequestNames;
}

When I try to set values for consentRequestNames variable in Process Builder it allows to set it as a single string only.

enter image description here

How to set a list of strings instead of a single string for consentRequestNames variable?

2
  • have you tried List<String> requestActionInList as a parameter instead?
    – glls
    Commented Jun 30, 2018 at 17:29
  • Yes. I've just tried. The same issue. Commented Jun 30, 2018 at 17:38

1 Answer 1

1

It's not possible to pass list as what you want. Try another way of getting list. You can pass multiple parameters but not the list.

2
  • How do you pass multiple parameters? If for example I need to pass more than one string into his 'Consent Request Names' do I enter it as a ';' separated list? Commented Aug 1, 2019 at 16:15
  • 1
    You can pass semicolon separated string and put logic inside to process them. Commented Aug 2, 2019 at 17:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .