0

I want to pass records prepared into an Invocable Apex method from a flow that have had picklist and multipicklist values set on the record. I want to insert a record from Flow via apex (using InvocableMethod)

Can anyone please share pointers?

Thanks in advance

6
  • What did you try? what is the error? You can see example in SF documentation how to invoke apex form flow: developer.salesforce.com/docs/atlas.en-us.226.0.apexcode.meta/…
    – Liron C
    Sep 16 '20 at 1:09
  • Thanks for response! I have create a flow which has one screen with checkbox group. The checked checkbox values should be stored in Multi Picklist field in Salesforce object. I'm using Apex code to save this.
    – Varsha
    Sep 18 '20 at 19:14
  • You don't have to use apex for that. You should create picklist choice set with object.multipicklist_field and then use it in the checkbox group source. Next when you insert the record assign the checkbox selection to the field on the new record
    – Liron C
    Sep 19 '20 at 2:31
  • +If for some reason you still need to use apex, then you can still follow my previous comment - assign the selection to the record field and then pass the record as variable to the apex
    – Liron C
    Sep 19 '20 at 2:36
  • Hi, thanks for the reply. I have already tried with picklist choice set and assign it but some how its not working. So I moved my code to Apex Action and as per this post picklist needs to save as given in the post which works perfectly fine. salesforce.stackexchange.com/questions/299459/… My problem is how to save multipicklist values in backend
    – Varsha
    Sep 19 '20 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.