Questions tagged [collection]
The collection tag has no summary.
143 questions
0 votes
2 answers
277 views
In Salesforce Flows, can an item be removed from a Picklist Value Set?
I'm working on a flow that uses picklist values from a defined single-select field on a Salesforce object (in this case a list of Product Families), and uses those values to build a text-based table ...
0 votes
0 answers
68 views
Populate a field for each case in collection with values from another case collection that contains same records but different values?
EDIT: Looks like Spring '25 release will bring out exactly what I need. Too bad I need it before that is available in prod. SHORT VERSION: Collection existingSfBills contains records 1, 2, 3, 4, and 5 ...
0 votes
0 answers
86 views
Json list to flow collection not collecting
First time typing here because this is driving me insane... I've been trying to get a json parsed record collection to use in flow. Apex class does get the information only from the first json record ...
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; @...
-1 votes
1 answer
513 views
DML on Sobject List
I have a scenario where I need to reduce DML calls. I'm performing DML on two objects that have a lookup relationship. I'm currently collecting the records in a list of SObjects and then performing ...
0 votes
0 answers
227 views
I can't get an collection variable from flow to apex
I'm stuck on something, I did an apex code that gets all the conversion rate dated by an input which is an invocable variable and an output which is in a dedicated class to appear as collection ...
4 votes
1 answer
189 views
Why can a Set be modified in an Apex loop but not a List?
Prelude According to Salesforce documentation, both Sets and Lists are considered Collections: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_collections.htm ...
0 votes
1 answer
89 views
when does the Map return null?
class MapTask { public static void main(String[] args) { Map<KeyClass, Object> map = new HashMap<>(); KeyClass key = new KeyClass(); Object value = new ...
1 vote
1 answer
105 views
Collection Filter formula unable to use TEXT() to convert Picklist value to Text value
Receiving unexpected error when debugging a subflow that uses a Collection Filter with formula referencing a picklist using TEXT(). Oddly enough, this validates successfully inside the subflow, but ...
0 votes
1 answer
2k views
Remove Record from Record Collection Variable in RT Flow
I'm trying to remove a single record from a record collection variable in a record triggered flow with the setup below, but the Remove All operator isn't working as expected. The use case is for ...
-1 votes
1 answer
148 views
Finding the average of dates using flow
I have a flow that creates a collection of dates of birth. my goal is to add them together and divide by the count to get the average date of birth. the amount of DOBs in the collection can change ...
0 votes
1 answer
840 views
Clarification - Updating Collections in Flows
I'm looking for some clarification around updating record collections in Flows. I have updates that are not committing to the db, and I'm not sure why. My usual update would follow the below ...
1 vote
0 answers
400 views
Map<Id, List<String>> or Map<Id, List<SObject>>, how access values?
I need to have a Map<Id, List<String>> or a Map<Id, List<Custom_Object__c>> to store this data: Id = Id of the record that is above, List<String>/List<Custom_Object__c&...
1 vote
2 answers
2k views
Quickest way to add field values to a set
What's the quickest way to add field values to a set? Currently, doing it in the following way Set<String> accountNames = new Set<String>(); for(Account acc : [Select Id, Name from ...
0 votes
0 answers
2k views
Can't assign field values in flow loop to text collection variable?
I'm trying to create a flow that loops through a child object of account (child account). The goal is to loop through various fields for each child account, e.g. platform, assign these values to a ...