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 [variable]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
44 views

Javascript variable not being passed to ampscript when using Save button. The form should not be submitted

<form> <input id="firstName" name="firstName" type="text" placeholder="First Name"> <input id="lastName" name="lastName" type=...
James S's user avatar
0 votes
0 answers
17 views

Sort Element - Can it work with/as a variable from GET to UPDATE

Situation. We are tidying up some flows so they use less GET's. We have one that gets a single highest value of the last 6 months. Previously we had a filter (for its requirements) then a descending ...
Stephen John cook's user avatar
0 votes
1 answer
148 views

Subflow passing record as an input not working as expected

I have a flow calling a subflow to which i pass an account record: The AccountrecordID is a record variable (Account type). In the subflow, when i want to eveluate its related records, for instance ...
Fabien Braconnier's user avatar
-5 votes
1 answer
38 views

variable does not exist mapaccmap?

public class UpdateHandler1 { public static void updateaccHandler(list<account> upac ){ Map<Id, Account> mapaccmap = new Map<Id, Account>(); for(Account acc : ...
abhishek patil's user avatar
0 votes
0 answers
66 views

Picklist Choice Set - New Resource Value unavailable

I hope someone can help... I'm creating a Screen Flow to create a new Opportunity with a Picklist Choice Set in one of the Trailblazer Playgrounds. I've created a StageName Picklist Choice Set and I ...
Lakis Juzwa's user avatar
0 votes
0 answers
30 views

Dedupe a collection variable in salesforce flow [duplicate]

I have a flow that ultimately stores a collection variable I am calling var_Opportunities. Due to the nature of how I am getting records, there are sometimes duplicate opportunity IDs in this ...
Alex Waxman's user avatar
0 votes
1 answer
186 views

Receiving this error "Method does not exist or incorrect signature: void add(OpportunityTeamMember) from the type List<List<OpportunityTeamMember>>"

I am trying to pass a list of records back into a flow as a collection variable but keep hitting this error Method does not exist or incorrect signature: void add(OpportunityTeamMember) from the type ...
Mona Weso's user avatar
1 vote
1 answer
81 views

Duplicate variable is not detected as duplicate after compilation

Definining 2 class variables with same name does not always fire Duplicate field compilation error when deploying apex class to the org. Code sample : public with sharing class MyClass { Boolean ...
Shamina's user avatar
  • 4,275
1 vote
1 answer
2k views

How do I pass a variable to a flow component on a Lighting page (that is NOT the recordId)?

I have a Flow for which I have 2 input parameters - the recordId and another Id for a lookup linked to the recordId. Adding the recordId is easy, but I have no idea how to pass the other variable. ...
Irene's user avatar
  • 1,829
0 votes
0 answers
237 views

Error launching screen flow from utility bar item

I created a screen flow which is launched through a utility item in the utility bar. I tested the flow on a particular custom app which I use, and the flow is able to run fine with no errors. However, ...
Steve's user avatar
  • 1
0 votes
1 answer
264 views

Error with AMPscript variable declaration in Free Form block

I've added a snippet of AMPscript into a Template Based Email to add 30 days to a date in my footer. As the email is Template Based, I have inserted the code via a Free Form Block at the top of my ...
JordanMiguel's user avatar
0 votes
2 answers
172 views

Assign Field based on Alpha Split of Contact Last Name

Ok, so I have been searching for a while and I cannot locate anything that helps me resolve this scenario. Business Scenario: I have a field "OSF Counselor" that needs to be assigned to a ...
Anne Jessup's user avatar
0 votes
0 answers
146 views

Pass variables from Flow to LC

Hello everybody I am working on a flow that contains a screen Aura component. From the flow I want to pass two variables one from a recordId and other that has a text field value from a record. In my ...
user avatar
2 votes
1 answer
702 views

Config enviroment variables in Salesforce

in others language like PHP or NodeJs. I can use .env file to store enviroment variables. For example, I need to use one enviroment variable is API_URL Then in local: API_URL will have a value of '...
Richard's user avatar
  • 33
0 votes
1 answer
470 views

Variable not changing in screen component

I am trying to create a lwc button which changes a variable when clicked and it works but the problem is that the variable does not change while the screen is opened and it just changes whenever i ...
Mohamed Montaser's user avatar
-1 votes
1 answer
2k views

How to convert Map<String,List<String>> to Map<String,String>?

I have a Map<String,List> and I want to convert to Map<String,String> converting list to string.join(','). I tried this, but it only replicates one value User u = new User(); List<User&...
Alexia's user avatar
  • 83
1 vote
1 answer
66 views

Illegal Assignment error when dealing with custom sort class

I needed to sort a list of Records by a Date field, so I created a custom sort wrapper class. Now that it is sorted, I want a single one of these records from the list, however I am running into a ...
stormy's user avatar
  • 51
0 votes
1 answer
320 views

Pass a variable from AMPscript block to Client side JS?

I have an index.html file with the following structure: %%[ SET @contactId = AttributeValue("_subscriberkey") ]%% <!DOCTYPE html> <html lang="en"> <head> &...
Simon's user avatar
  • 13
2 votes
1 answer
268 views

Assigning values to variables in a loop

In the full code pasted below I'd like to avoid the if statement within the if statement. I'd like to assign the values stored in @rows into the @Voucher1 and @Voucher2 variables using the incrementor ...
Felix Sanchez's user avatar
0 votes
1 answer
3k views

Apex Convert Positive Currency to Negative Currency

I'm wondering if my syntax is off. My varCreditRefundAmount is a positive value and when I add it to a new transaction representing a refund, I want to convert it to a negative amount. This is what I'...
Heather's user avatar
  • 51
0 votes
2 answers
1k views

Variable does not exist Id developer console error

map<Account, list< contact>> AccountContact = new map<Account, list< contact>>(); accountRecs = [SELECT Id, Name, Active_Contacts__c,(SELECT Id from CONTACTS WHERE Active__c ...
Brindha Sharadha's user avatar
0 votes
1 answer
244 views

Declare CSS stylesheet based on condition in controller

I have a Visualforce page which has a default CSS stylesheet declared, which is always used for general styling. What I would like to do, however, is have alternate stylesheets to change brand colours ...
Irene's user avatar
  • 1,829
0 votes
1 answer
432 views

How to use variables in dot notation to find child relationship name?

Instead of teacher__c and student__c, they needs be dynamic variables. How can I substitute these API names with variables: parentApiName and childApiName? for (ChildRelationship relation : ...
ApexCowboy's user avatar
0 votes
0 answers
467 views

Launch Flow in Modal - pass variable

I am Using AppExchange Launch Flow in Modal. I can't manage to figure out the proper syntax to pass the value of a variable field to my flow input variable string. I am adding the Modal button to my ...
Jeannine Robitaille's user avatar
0 votes
1 answer
3k views

Passing multiple collection variables from flow into an apex method using Invocable Variables

I'm trying to pass four collection variables to be processed in apex but having a difficult time implementing invocable variables to allow for more than the single parameter an invocable method can ...
bblackinton's user avatar
1 vote
1 answer
2k views

In a flow, is it possible to set the object (where you want to "Get Records" from or "Update records") dynamically, through a formula for example?

I'm working on a flow in which the current object where the flow is being launched from (for example, a list view of a certain object), becomes the target object in a Get Records / Update records ...
bonzi's user avatar
  • 155
0 votes
1 answer
802 views

Pass variable created in a flow to a VisualForce Page

I have a flow that is run when internal users click a button. This button will set a variable in the flow for: first name, last name, and decoded email (for url). I created a VF page that is used to ...
User_11223344's user avatar
0 votes
1 answer
15k views

AMPscript EMPTY OR NOT EMPTY

I have created an AMPscript code for an email where I generate a greeting depends on the variable but I want users who don't have the First Name field to display the Last Name and Salutation and those ...
Mery's user avatar
  • 17
0 votes
1 answer
130 views

Formula Assistance

I am creating a formula variable in a Flow but keep getting this error. Crop net Acres is a Number field. IF( ISBLANK( [Opportunity].Crop_Net_Acres__c), 0, ( [Opportunity]....
J B's user avatar
  • 33
2 votes
1 answer
2k views

Can't get flow variable from flow interview I created and started in Apex

Having come across documentation that states that flow variables can be retrieved for a specific flow in Apex, I tested this by writing the following code: myEvent__e eventRecord = new myEvent__e( ...
user73893's user avatar
  • 305
0 votes
1 answer
97 views

How can I make the variable dynamically [duplicate]

I add an email handler service to my org. How can I change the syntax that the c. variable is also dynamically? I tried to add a string like String api_name = 'c.' + fi + '__c' but it does'nt work. ...
peXeq's user avatar
  • 471
0 votes
1 answer
49 views

How to Optimise code to retrieve user NickName by querying fields from a custom object

I have currently have a code that sends alerts to Head of Service(user) of a Business Unit. So if a case has been created for the business Unit APAC for example, an alert is sent the the Head of ...
Hermann Ouré's user avatar
0 votes
0 answers
199 views

Passing variable from apex class to vf page in lightning aura enabled class method

Can we pass a getter value from apex to VF page in lightning aura enabled classes? I have a class which has a variable defined public static Integer testvariable{get;set;} now I have an auraenabled ...
victor's user avatar
  • 5
0 votes
1 answer
111 views

Map variables through query

i want to get the value of the confList to the guaranteeSOQL but i get the error: Variable does not exist: Replaced_Configuration__r how can i overcome this? list<Configuration__c> confList = [...
Christos's user avatar
2 votes
1 answer
2k views

LWC pass date to @wire apex - how to initialise date variable?

I have a component that on first load should display all accounts where a last verified date is 2 years or older. The component has a date selection field where the user can select a different date, ...
Irene's user avatar
  • 1,829
0 votes
1 answer
340 views

Yaml variable to store result of sfdx command

Throughout execution yaml file for CI/CD process in GitLab I am using sfdx force:data:soql:query -q "SELECT id FROM UserRole where name='CER' " -t -u [email protected] to find proper id ...
SFguru's user avatar
  • 25
0 votes
1 answer
252 views

How to use variables in JavaScript without exposing them in the browser?

I want to use the Bee Template API inside my Visualforce page. So, this is the code I used: //Visualforce Page <apex:page showHeader="false" controller="...
Jayesh Babu's user avatar
0 votes
1 answer
233 views

Ampscript - Inputting Variable inside SET Statement

So I have a sendable data extension for an email, for which I'm wanting to input a Subject with dynamic content. For example IF Customer_Region is US then SET Subject = "Hi @First_Name, how are ...
chorlesbarkley7's user avatar
0 votes
1 answer
491 views

List all existing Flows as options in a Custom Object field

I am working on a project and I want to create a Custom Object that has as a field a lookup for flows. I would like to know if there is some kind of way to retrieve all existing flows in one org and ...
Reem's user avatar
  • 1
0 votes
1 answer
750 views

Static variable is cleared between page load and button click - how do I keep the values?

I have a VF page in which I load an account on the page load. I've created a static variable to save the loaded account in to, in order to compare whether any changes were made on the page as I need ...
Irene's user avatar
  • 1,829
-1 votes
1 answer
473 views

Variable does not exist in in method

I am trying to pass value from a map into a string set but get the error: variable does not exist: NewToolsMap in my execute method. I tried to make my map public but this does not seem to work. How ...
Thomas's user avatar
  • 2,298
0 votes
1 answer
85 views

Declare Static Resource as a variable to assign its value through commandbutton

I have the following code: <apex:mapMarker position="{!war.GeoLocPosition__c}" title="{!war.Name}" icon="{!IF(war.AE_letzte_12_Monate__c > 5000,URLFOR($Resource.ms_star), ...
Jan Tonnet's user avatar
1 vote
3 answers
6k views

How do I invoke an apexclass from flow and return a list back to flow

I have a flow from which I want to call an apexclass and retrieve a list of picklistvalues so a user can select from these in a flowscreen. How do I achieve this. I tried the code below but when I use ...
Thomas's user avatar
  • 2,298
1 vote
1 answer
31 views

How to adress method in class

How do I access the method getDateTime in the following class. I tried ZuoraObject zo = new ZuoraObject(); but get the error constructor not defined public class ZuoraObject { private Zuora....
Thomas's user avatar
  • 2,298
1 vote
2 answers
2k views

Visual Studio Code debugger - how do I see content of object or map?

I've started using Visual Studio Code to run through my debug logs, but am not seeing the content of certain types of variables and am wondering whether I'm just missing something or whether this isn'...
Irene's user avatar
  • 1,829
1 vote
1 answer
362 views

Variable does not exist: hed__End_Date__c

public class UpdateGraduated { public static void WhenGraduatedUpdate(List<hed__Program_Enrollment__c> enrollmentListUpdate){ try{ List<hed__Program_Enrollment__c> ...
Chloe Brown's user avatar
0 votes
1 answer
184 views

Accessing variables in a SOQL query

Trying to build a string with the the parts of a SOQL query. I cant get the syntax right with the Account.name and Count fields, even tried the alias name and 'co'. `List < AggregateResult > ...
Tim's user avatar
  • 31
1 vote
1 answer
243 views

How do you share variable values across multiple blocks within an email?

I have a @variable1 defined in an email HTML content block that is defined. When the email iterator starts, I would like to use the value of @variable1 in a second HTML content block. How do I do ...
ElHaix's user avatar
  • 135
0 votes
2 answers
841 views

Setting Invocable Variable value for a Test Class

I'm having difficulty finding a way to write the syntax to set my invocable variables in the test class: Here's the code. global class EmailPreventivoAccettato { global class Parametri { @...
Riccardo Terzi's user avatar
0 votes
0 answers
18 views

variable between two visual page with the same controller

I have a controller like that : public with sharing class JSONDeserialize { public integer d {get;set;} } public void callout() { d = 2; } On my first visual page I have : <apex:page ...
Tiburce's user avatar
  • 33