How to call invocable method from flow

0 votes
What's the process to call an invocable method within a flow? Any guidance on setup?
Oct 25 in OpenStack by Priyanka
• 4,080 points
70 views

1 answer to this question.

0 votes

To call an invocable method from a Flow in Salesforce, follow these steps:

Step 1: Create the Invocable Method in Apex: First, create an Apex class with a method that has the @InvocableMethod annotation. This lets the method be called directly from a Flow.

public class MyInvocableClass {

    @InvocableMethod

    public static void myMethod(List<String> inputParams) {

        // Your logic here

    }

}
  • The method must be public static and accept a single List parameter (typically a List of custom Apex types or primitive data types).

Step 2: Go to Flow Builder: In Salesforce Setup, go to Flow Builder.

Step 3: Add an Action Element: In the Flow, include an Action element.

Step 4: Select Your Invocable Method: When you want to add an Action, look for a search box to help you find available actions. Type in your class name or method name, and you will see a list of options. Click on the method you want from this list. The method should be visible thanks to the @InvocableMethod annotation, which indicates that it is properly set up in the system.

Step 5: Configure Inputs and Outputs: Set the input values that you need to pass to the method and choose where to store the outputs. The Flow will identify the parameters automatically based on the method signature in Apex.

Step 6: Activate the Flow: After you set up your Flow, save it and turn it on.

Now, every time the Flow runs, it will call your Apex method. This method helps you add custom business logic to expand the capabilities of Flow. If you want to learn more about Azure, click here.

answered Nov 7 by Deepa

Related Questions In OpenStack

0 votes
1 answer

How To Migrate Running Instances From One Openstack Compute Server To Another Openstack Compute Server ?

Hi@akhtar, You can migrate your instance in OpenStack ...READ MORE

answered Mar 17, 2020 in OpenStack by MD
• 95,460 points
1,161 views
0 votes
1 answer

How to login with demo account in OpenStack from CLI?

Hi@akhtar, Packstack program will generate to file when ...READ MORE

answered Jul 3, 2020 in OpenStack by MD
• 95,460 points
956 views
0 votes
1 answer

How to launch one instance in OpenStack from CLI?

Hi@akhtar, You need to login to your OpenStack ...READ MORE

answered Jul 5, 2020 in OpenStack by MD
• 95,460 points
1,045 views
0 votes
1 answer

How to create an image in OpenStack from CLI?

Hi@akhtar, You have to first download one preinstalled ...READ MORE

answered Jul 6, 2020 in OpenStack by MD
• 95,460 points
2,045 views
0 votes
1 answer

How to assign public IP to OpenStack instances?

You can have a look at this ...READ MORE

answered Feb 25, 2019 in OpenStack by Priyaj
• 58,020 points
1,606 views
0 votes
1 answer

How to set static IP in Linux RedHat?

Hi@akhtar, To set a static ip in Red ...READ MORE

answered Feb 24, 2020 in OpenStack by MD
• 95,460 points
965 views
0 votes
1 answer

UiPath - Citirx Automation

best way to do that is to ...READ MORE

answered Apr 13, 2018 in RPA by wrecker
• 3,110 points
1,303 views
0 votes
1 answer

UiPath - Web Scraping

Multiple solutions are listed below: Check your Selector Use ...READ MORE

answered Apr 13, 2018 in RPA by wrecker
• 3,110 points
2,013 views
0 votes
1 answer

Automation in Uipath

you can use the Database package for connecting  ...READ MORE

answered Apr 17, 2018 in RPA by wrecker
• 3,110 points
1,605 views
0 votes
1 answer

UiPath vs Workfusion

in WorkFusion, you can create a script ...READ MORE

answered Apr 17, 2018 in RPA by wrecker
• 3,110 points
2,713 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP