Questions tagged [loop]
A loop is a sequence of instructions that is continually repeated until a certain condition is reached.
350 questions
0 votes
0 answers
40 views
Adding a single value to a Collections, instead of all required values
Hello all I have an issue with a screen flow. In the print, you can see the components numbered 1 to 5. The issue is in component (5), where it's only adding one single Id, the last one, even if it ...
1 vote
0 answers
197 views
Calculate formula in a loop in a flow
In my instance, I have a field called 'Last_Activity_Date__c' that is supposed to be populated by the date of the last event a contact attended. Unfortunately, this field is a String field, and I am ...
2 votes
0 answers
81 views
Do you focus on Performance or Readability?
I have a bit of a conceptual question for the group and would love to start a discussion centered around Performance and Readability. In our Apex Trigger, before insert, were doing 2 things that I ...
0 votes
1 answer
239 views
How do I access list values in flow
I am struggling a bit with accessing individual values in list that is returned by APEX code into the flow. public class DynamicField { @InvocableVariable public String key; @...
0 votes
1 answer
188 views
Would it be advisable to put the Custom Metadata Type records in a Wrapper Class?
I have a code that is dependent in metadata records. Let's say if my object record matches the value in metadata record then it will do something. However, the requirement is getting bigger and we're ...
0 votes
0 answers
83 views
Archive events through flows
I have a requirement where I need to delete current event records and have them archived. For this I have created a new custom object to store the event details called 'Archived Event'. The flow works ...
0 votes
0 answers
43 views
Concat Multi Opps ID To One String
I'm newbie in this. I have an idea like this below: Example: I have a list Opp With 20 Close Won of only one user, I set up a flow (schedule) to scan all of its ID then input to "Send Email" ...
0 votes
2 answers
85 views
About Design Pattern - Avoid excessive looping
I am relatively new to the Salesforce world, working as a developer at a company that provides Salesforce consulting. Well, I usually gain experience by looking at what is done in other projects and ...
-1 votes
1 answer
173 views
Auto-Number Using a specific format and using an already existing field as the base (workflow loop?)
I have an opportunity field called Order # that the user enters it in this format 24-022. I'd like to use this Order # and add a -1, -2, -3 etc. to the end (example 24-022-1) and this field will be ...
0 votes
1 answer
160 views
What's wrong with my substring function?
I'm trying to loop through a string using AMPscript only and pick out specific values. The problem is once it tries to update the string using the substring function the cloudpage errors out. Example ...
1 vote
1 answer
448 views
How to recursively iterate through multi nested arrays in the lwc's html file?
I have the following data and nested a way to recursively call the same logic so that regardless of how many levels are in the data, the data is always printed correctly in a nested format. Example ...
-1 votes
2 answers
352 views
System NullPointerException on get from map
I have a nullpointer exception in the following code on line if(mapSoldAppStatus.containsKey(user.Id)){: Map<String,Map<String,Integer>> mapSoldAppStatus = ReportPageController....
0 votes
1 answer
2k views
Map value to specific variable in loop within Flows?
Working on a flow in which I need to iterate over up to 12 records and sort it in descending order by date. Then take a single value from each record and store it. I will then update the parent record ...
-1 votes
1 answer
727 views
Salesforce LWC nested for each loops with if condition
I am trying to implement a listbox in LWC. The list box is showing values from a picklist in Account object. On click the value of the selected item is adding to an array. But on the UI it is not ...
-1 votes
1 answer
2k views
How to use loop within a loop in salesforce flow?
Requirement: A note will be created for a selected account from the list view, using a custom button. This button calls a VFPage & that vfpage calls this flow. My current output creates the ...