Questions tagged [invocable-method]

Invocable methods in Apex are called as invocable actions by the REST API and require the InvocableMethod annotation as an identifier. This can only be applied to one method in class and takes a maximum of 1 input parameter of a list of either a primitive data type, an sObject type or a user defined type.

Filter by
Sorted by
Tagged with
4
votes
1answer
1k views

Help on Invokable Apex Test class and @Future callout Apex test Class

I am pretty new to Apex and trying to learn as much as possible. Any help would be really appreciated. I have two classes. Invokeable Apex Class: This class is just getting called by a Process (...
21
votes
3answers
6k views

Process Builder - Breaking Production Deployments?

I have a Process Builder flow set up and I am running some tests around the InvocableMethod Apex code. The tests pass fine in my staging and production environments. Yet, when I try to deploy to ...
9
votes
1answer
3k views

Can't invoke @InvocableMethod via the REST API

I've been trying to use the new Spring '15 functionality related to Invocable Actions / @InvocableMethod / @InvocableVariable using the current documentation: https://www.salesforce.com/us/developer/...
10
votes
2answers
5k views

accessing the return value of an InvocableMethod in process builder

Good morning. Hopefully this is a simple question, that I've just bone-headedly missed in the documentation. In process builder how can I access the return value of an Apex InvocableMethod?
1
vote
4answers
4k views

Invocable method Apex class is not visible in Process builder

I am trying to use following apex class with invocable method but its not showing in process builder. global with sharing class SlackOpportunityPublisher { private static final String slackURL = ...
20
votes
4answers
20k views

How invocable method and bulk behavior in Process Builder work?

I am trying to understand how invocable method called from Process builder behaves. I have Process Builder process on Account which has apex action. Apex action needs to be executed for record inserts....
8
votes
2answers
5k views

Flow + @InvocableMethod: How to assign output to collection/sobject collection variable?

There are methods like: @InvocableMethod public static List<Id> loadContact(List<String> ids) { or @InvocableMethod public static List<Contact> loadContact(List<String> ids) ...
5
votes
1answer
110 views

Deprecate or remove an Apex Invocable Action from Process Builder in a Managed Package

We released global facing Invocable Apex Actions to be used by Process Builder, but would like to hide a couple of them from subscribing orgs. From the official documentation on invocable methods, ...
7
votes
0answers
505 views

InvocableMethod not appearing in Cloud Flow designer [duplicate]

I have written an @InvocableMethod, with an @IncovableVariable as such: public class SimpleAccountLookup { @InvocableMethod public static List<Account> getAccountId(List<...
3
votes
1answer
531 views

Can flow commit changes prior to invoking a method?

I'm trying to get some advanced architecture setup for my company, but I'm running into an issue with my design; looking for help. I'm attempting to execute an API call from Flow, but I'm getting the ...
2
votes
1answer
178 views

DateTime Vs. Date Flow To ProcessPlugin

I find this to be odd, not sure if this is a known issue or if it is something I just have to convert but I have a flow that calls a apex process plugin class. The flow takes a variable of type Date ...
2
votes
1answer
3k views

System.sObjectException: Invalid Field – trying to use a nested SOQL query

I am getting a System.sObjectException: Invalid field error when trying to assign a value across objects. Also, I'm trying calling my method via Process Builder using the @InvocableMethod annotation (...
0
votes
1answer
321 views

APEX Class Clean Up: Round Robin Lead Distribution Model

The code below is responsible for assigning Leads utilizing Round Robin distribution. The process is defined as follows: Lead is created and meets predefined criteria within a automated process (...
0
votes
1answer
2k views

Future Method and Static Variables

I have a class that implements Process.Plugin. It calls the invoke method, which calls a future method, which calls a webservice. The returned value from the webservice should be the output parameters....
0
votes
1answer
200 views

New Opportunity Owner is not receiving Email Notification in proper sequence and receive more than 1 email for different opportunities in apex

I have a requirement in which when I deactivate a user, a deactivation email should be sent and all of the user's opportunities get reassigned to their manager. When the Opportunities are assigned ...
0
votes
1answer
529 views

Process Builder Bulk Scheduled Actions Not Working

I have a fairly simple Process Builder where, if leads meet certain conditions, we will re-run the assignment rules. This is done with a scheduled action 0 Hours After LastModifiedDate that calls an ...
0
votes
2answers
198 views

Invocable Apex in Managed Package Not Returning Values

We have an Apex class in our managed package declared as global but it doesn't seem to be returning anything to our Flow. Used the class prior to packaging it and it worked fine (then it was Public ...