Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [invocablevariable]

The tag has no usage guidance.

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

SOQL inside invocable method returns no results

I have an invocable method which is invoked when a platform event is published. So far the invocable method invokes on time and some elements of the data are extracted from the platform event. Now ...
sumchans's user avatar
  • 777
0 votes
1 answer
54 views

Bulkify SOSL Invocable Apex

I have the following invocable class. It currently functions as I would like (updating the Interaction__c record with a ContactId that is found using a conditional SOSL query and subsequent regular ...
Anton's user avatar
  • 5
0 votes
1 answer
61 views

Number of Results does not match the number of interviews

OK, I feel stupid. I've seen other questions from people who got this same error, but none of those scenarios was like mine. So I'm still really confused. My Flow is sending ONE PropertyId to an apex ...
april's user avatar
  • 1
1 vote
1 answer
258 views

Invocable Method to return External Service data type

Ideally, we will create an External Service based on the API Schema and use it in Flows. For some reason, when we do callouts in the Flow, the API cannot parse the Authorization header correctly, ...
codefish's user avatar
0 votes
1 answer
456 views

How to parse list of custom Apex types returned from InvocableMethod in Flow

Given the following class with an @InvocableMethod: public class InvocableFileCountAction { public class FileCount { @InvocableVariable public Id recordId; @...
Thomas Taylor's user avatar
-2 votes
1 answer
525 views

I have a simple class that grabs the last two digits of the current year. I need to make this class Invocable, how do I do this?

I need to just make this class an Invocable method so that I can grab the last two digits of the year from this class and add it to a text field on another object using a flow. This is the code from ...
Zzz's user avatar
  • 13
0 votes
1 answer
470 views

how can we access flows text Template's variable in apex code ? In body how can i access the variable of flow?

I have to post chatter through the flow as text template. When chatter is posted I need to set CreatedById as Customer_success_manager__c, so that I write apexcode, now how can I use that text ...
Sejal Gohil's user avatar
0 votes
1 answer
927 views

How do I write a test class for invocable variable

I have an invocable method with variables. I am stuck how to set these in unittest. public class getBWS { @InvocableMethod(label='Status' description='') public static List<FlowOutputs&...
FenTro's user avatar
  • 29
0 votes
1 answer
3k views

Passing an variable from flow to @InvocableMethod

I am super close to getting this process to work, however, I am a little unclear as to how to deal with the @invocableVariable portion of the process. And just to preface... I am NOT a coder, like at ...
Kris Ryan's user avatar
0 votes
1 answer
295 views

Variable does not exist: invocable method

I am trying to pass 2 ID's into an apex action from a flow that just query's a subset of ID's and passes it back to the flow. I'm getting the following error for both my invocable variables inside the ...
Delforce's user avatar
1 vote
2 answers
3k views

Flow InvocableAction returning an object with a list of objects

I'm looking to provide a Flow User with a list of Search Results based on a query. I have the following set of code, and haven't been able to figure out how to get it to work. (I've tried moving the ...
Adam Erstelle's user avatar
0 votes
1 answer
2k views

External callout using Flow Builder - Apex Class Invocable Action

I would like to create a callout (webhook) when a custom field Batch_Name__c is updated which belongs to the Account Object. The purpose of this callout is to send all account information to an ...
VBO01's user avatar
  • 1
0 votes
1 answer
2k views

How can I pass maps to an Invocable Method?

I have a method in my code that I want to make into an invocable method: // This should be an invocable method with @InvocableMethod private void updateContacts(Map<Id,Contact> newContactMap, ...
Josiah's user avatar
  • 153
-3 votes
1 answer
30 views

I am not getting full code coverage in my test class, is it because test data isn't setup correctly?

I'm new to Apex and have been working on a class as a training excersize. The invocable method works as expected when called from a flow but I'm having trouble getting the proper code coverage. I ...
Jas's user avatar
  • 31
0 votes
1 answer
244 views

Can't Access 2nd Level in 'InvocableVariable' Object

I've got at flow that makes a callout and returns (to the flow) an object defined in apex (@InvocableVariable): public class MostOuter { @InvocableVariable public Inner1 var1; @InvocableVariable ...
Carl-Johan's user avatar
1 vote
1 answer
451 views

I need help resolving "unexpected token" error when setting up invocable variables in a test class

I have an invocable method with varables. I am stuck how to set these in a test class, below is the progress I've made. I am getting an errror "Unexpected token '='" on the last couple lines ...
Jas's user avatar
  • 31
1 vote
1 answer
2k 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 ...
user avatar
0 votes
0 answers
977 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 ...
plateaued1's user avatar
1 vote
1 answer
818 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';
Serami 's user avatar
0 votes
2 answers
396 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&...
JH-105539's user avatar
0 votes
1 answer
201 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 ...
M.ho's user avatar
  • 5
0 votes
0 answers
93 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 ...
M.ho's user avatar
  • 5
0 votes
0 answers
883 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: (...
zachary edgell's user avatar
-1 votes
1 answer
2k 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 ...
Tipsiduspi's user avatar
0 votes
2 answers
2k 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 ...
user52619's user avatar
4 votes
1 answer
13k 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 ...
user52619's user avatar
0 votes
1 answer
2k 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 ...
gbt's user avatar
  • 3
1 vote
1 answer
4k 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'...
Saaki's user avatar
  • 55
1 vote
1 answer
188 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....
Jas's user avatar
  • 31
1 vote
2 answers
17k 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 ...
bonzi's user avatar
  • 155
0 votes
3 answers
5k 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 ...
Jas's user avatar
  • 31
0 votes
1 answer
288 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 ...
Jas's user avatar
  • 31
2 votes
1 answer
3k 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 ...
sumchans's user avatar
  • 777
1 vote
1 answer
912 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. @...
ondrakr's user avatar
  • 350
2 votes
1 answer
869 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{ @...
SFDC_Dev's user avatar
  • 293
0 votes
2 answers
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 ...
mcg123's user avatar
  • 61
1 vote
2 answers
2k 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 ...
mcg123's user avatar
  • 61
0 votes
1 answer
723 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 ...
George Yanushko's user avatar
2 votes
1 answer
3k 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 ...
user62694's user avatar
1 vote
1 answer
1k 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 @...
Sebastian Kessel's user avatar
5 votes
0 answers
266 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 ...
Chris Abraham's user avatar
1 vote
1 answer
127 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 ...
thinker's user avatar
  • 1,430
0 votes
1 answer
315 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 ...
Testing_SFDC's user avatar
  • 2,940
0 votes
1 answer
1k 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 (...
BoomSpartan53's user avatar
1 vote
1 answer
1k 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 ...
Thomas's user avatar
  • 2,298
3 votes
2 answers
6k 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 ...
Scott Walker's user avatar
2 votes
1 answer
741 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 ...
Robs's user avatar
  • 9,346
4 votes
3 answers
3k 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 ...
Robs's user avatar
  • 9,346