How does Invocable apex help you combine declarative development with custom functionality?

How does Invocable apex help you combine declarative development with custom functionality?

The invocable actions mechanism allows to create custom code and package it into componentes/actions available in declarative tools, such as Flow. The idea is simple. You provide input values that the apex class does something with, and it gives you output values.

How do I use Invocable method in Salesforce?

Use the InvocableMethod annotation to identify methods that can be run as invocable actions. If a flow invokes Apex, the running user must have the corresponding Apex class security set in their user profile or permission set. Invocable methods are called with REST API and used to invoke a single Apex method.

When to use invocable annotation in process builder?

In order to allow an Apex method to be executed as a Process Builder action, you need to use the @InvocableMethod annotation. Here’s an example of using an invocable annotation that I built for the BrightGen Spring 15 Salesforce Release Webinar around account validation.

How does the invocable method in apex work?

Create a custom global or public Apex class to implement your data type, and make sure your class contains at least one member variable with the invocable variable annotation. However, since the Invocable Method requires a list it shows that can be grouped together as they come in.

How to create a process in process builder?

Process Builder: Step 1: Click Setup → Create → Workflow & Approvals → Process Builder. Step 2: Click the New button to create a new Process Builder process, and provide the process name and Description, and then click the Save button. Step 3: Choose an object:

How does taskutils work in Lightning Process builder?

The TaskUtils task contains a single method that is passed the id (s) of the accounts whose validation tasks are to be deleted, locates the validation tasks based on their name and deletes them: ? Creating an account that is unvalidated automatically adds 2 tasks: