Questions tagged [invocablevariable]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
31 views

How to set variable from flow to Apex and Call flow from Apex?

My flow type is autolaunched flow , the goal of the flow is to send Emails. I want to call this flow from Apex , besides i want to fill these fields : EmailAddresses and SenderAddress in Apex and ...
0
votes
0answers
47 views

How do I access the Collection Values within a Flow that are the result of an Apex Action Output value?

Hi I've added an Apex Action element to my flow which includes an output value. The Apex Action only returns one record but I understand it has to be returned as a nested list. The output value is a ...
0
votes
1answer
14 views

Invocable variable set default value

Is it possible to set default value for invocable variable? Didnt find any info. @InvocableVariable(Label='Var' Required=true) public String var = 'var';
0
votes
2answers
49 views

Invocable Method + Variables -- Hitting Null Pointer Exception

I'm hitting a null pointer exception on an Invocable Method that I'm working on. I suspect that this is happening in the runClass method when I'm trying to convert my List of user ids ("userIds&...
0
votes
1answer
39 views

How to convert List<sObject> to List<InnerClass>

I have a @InvocableMethod that is used from Flow builder to create a record. Also I have a inner class with @invocableVariable. It is working fine, but I want to use the same method from another class ...
0
votes
0answers
27 views

How to pass List<sObject> to @InvocableMethod that accepts only @InvocableVariable [duplicate]

I have a @InvocableMethod that is used from Flow builder to create a record. Also I have a inner class with @invocableVariable. It is working fine, but I want to use the same method to create records ...
0
votes
0answers
103 views

"apexClass" is invalid. Provide the API name of an Apex class that includes an Apex data type supported in flows

We have created a unmanaged package to migrate to a new org. It builds the package successfully and it runs fine in the old org but when we go to install in the new org we get the following error: (...
-1
votes
1answer
59 views

Invocable method with wrapper parameter in console

I have invocable method and trying to pass wrapper as parameter. But i wanna run that in console. How can i do it? It gives me error wrong parameter when i am trying to pass Wrapper Object. public ...
0
votes
2answers
41 views

Get my output( from my apex class) and assign it to a flow variable

I have an apex class that returns a list of records/response as an output. public class KnowledgeArticleLookup { @InvocableMethod(label='Get Knowledge Articles' description='Gets knowledge article ...
2
votes
1answer
844 views

Passing variables from flow to apex and then from apex to flow

I'm trying to put in place a screen flow component in order to display knowledge articles based on the case fields and Knowledge-articles data category. In order to do so, I've created an apex class ...
0
votes
1answer
54 views

Pass values back to flow

I am brand new to Apex, this is my first attempt - I adapted some code from here which is working, but ideally, I'd like to pass the urlencoded variable back to the flow, however, I can't work out how ...
1
vote
1answer
376 views

Invoke Apex to send email from Flow

We have a flow that stores the collection of Ids with Email address and we want to pass those Ids to send an email from Apex. I'm Trying to call the apex but it gives me error list has no rows. Couldn'...
1
vote
1answer
56 views

How to use varaibles in apex soql query

I have a set of invocable variables in my below apex code and I'm hoping to replace the "Workflow_Step_Lookup__c" field that's in the SOQL statement with the "lookUpField" variable....
1
vote
2answers
1k views

Passing an output variable from apex action back into flow

I'm using an apex action to obtain, from a recordId (which is the input variable that is sent from the flow into apex), the name of the object to which it belongs (objectname). I want to send this ...
0
votes
3answers
196 views

Apex Error: You have uncommitted work pending. Please commit or rollback before calling out

I'm working with the DocuSign managed package and looking to allow invocable variable input from process builder. Below is the class I have created and it compiles fine but when I go to execute the ...
0
votes
1answer
117 views

How to create invocable variables to be used in process builder (with DocuSign API)

Very new to the Apex developer game here and I'm having trouble figuring out how to create invocable variables that can be called from process builder. The use case here is we are using the docusign ...
1
vote
1answer
197 views

InvocableMethod - returning string value back to the flow

I want to return a string value back to the flow. Got it this far, and also I am able to get the return value when I am not in an invocable method. Here is the error I am getting - Method does not ...
0
votes
1answer
101 views

Get flow name in Invocable Method

is it possible to get a flow name that invoked the invocable method in Apex? Basically, I want to implement the getFlowName method that dynamically returns a flow name that invoked this method. @...
2
votes
1answer
260 views

Einstein Bot - Passing boolean into Apex action

I need to pass boolean value (NOT asked to the customer) to apex action and need to hard code it. I have an invocable method which takes a list parameters like (psuedo code) public class SomeClass{ @...
0
votes
2answers
1k views

Batch Apex vs Queueable

Thanks to another user (sfdcfox) I've got the following queueable apex being invoked via a screen flow that's being used to update account records. It's taking two string variables from the flow and ...
1
vote
2answers
545 views

Flow with invocable apex

Apex beginner here so I'm open to any and all suggestions. I'm working on a flow + invocable apex combination to mass reassign records. Basically trying to take variables obtained by the flow and ...
0
votes
1answer
230 views

@InvocableVariables in Apex test class

I am having difficulty writing tests for the apex class. This is my first time working with apex classes and I don't understand how to send to @InvocableVariable. I've read answers to similar ...
1
vote
1answer
2k views

how can I pass more than one parameter in invocable method without using flow

In my Process Builder, on creation of my custom Object Bank__c record, I want to pass two parameters(Ids, objectApIName) to InvocableMethod in Apex class, so I added this to my code, public static ...
0
votes
1answer
343 views

Iterate on a Flow Loop Element in an apex collection

I have an apex class that returns a list of a custom class with the following shape global without sharing class Result { @AuraEnabled @InvocableVariable global Id recordId; @AuraEnabled @...
3
votes
0answers
153 views

How can I make parent class variables Invocable in flow and process builder?

I have a scenario where I have an InvocableMethod which takes a custom Class with properties which are made available with the @InvocableVariable annotation, but I want this class to extend a parent ...
1
vote
1answer
74 views

Can't Return values in Apex from Flow Winter 19

I'm trying to refactor a flow I built in Spring 20, back to Winter 19. In Spring 20, I can just create a resource for my Apex Output. I've called this variable {!apexReturnedObj} I'm trying do some ...
0
votes
1answer
245 views

Process Builder activation error

I have a process builder that invokes a method from a class where it passes one of the three parameters. In the class the InvocableVariable is a List of Custom object Call__c but from process builder ...
0
votes
1answer
772 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 (...
1
vote
1answer
758 views

How to set the variables of invocable method in unit test

I have an invocable method with varables. I am stuck how to set these in unittest Class public class or_service { public class invoceVars{ @InvocableVariable public id ...
2
votes
2answers
3k views

Setting Invocable Variables in Test Class

I'm having difficulty finding the syntax to set my invocable variables in a test class related to the below code. I just put the relevant top part of the code in there. How can I set the ids to my ...
2
votes
1answer
571 views

Process Builder Action Type: Processes Requires SObject Variable

BACKGROUND I have two custom object which have a Master-Detail relationship: Credit Note Credit Note Line I have a Process on Credit Note which needs to invoke a Process on Credit Note Line But ...
3
votes
3answers
2k views

How to have an InvocableVariable appear as Drop Down List in Process Builder

BACKGROUND I have a class with an InvocableMethod which takes a set of InvocableVariable's Such that I can call the Apex class from Process Builder. QUESTION I would like one of the fields to ...