Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [list]

A list is an ordered collection of elements that are distinguished by their indices. List elements can be of any data type—primitive types, collections, sObjects, user-defined types, and built-in Apex types.

0
votes
1answer
35 views

Find the center record in a list from custom object and purge in bi direction

I have a custom object called exception__c and a child object called exception_occurrence__c. There are more than 5000 records in exception object and each exception has more than 25000 child records (...
1
vote
1answer
23 views

Why isn't the type attribute being applied to dataList?

I have a custom component with a dataList component within: <apex:dataList value="{!itemsList}" var="item" type="{! listType }"> <apex:outputText value="{!item}"/> </apex:dataList&...
-2
votes
0answers
39 views

Need help on query optimization [on hold]

Can it be possible to optimise the query mainly in or condition check ,can we use something list and contains .please help List<PermissionSetAssignment> lstcurrentUserPerSet = [SELECT ...
-4
votes
0answers
39 views

List of size 6 too large to display [closed]

list<list<object>> obj = new list<list<object>>(); for(list<String> data : obj){ } I am getting an error in line 2. List of size 6 too large to display.
0
votes
0answers
7 views

How to Access Item in a List of SendEmailQuickActionDefaults

I have the following: List<QuickAction.SendEmailQuickActionDefaults> defaultsSettings = (SendEmailQuickActionDefaults:[QuickActionDefaults.actionName=Case.CC_Send_Email, QuickActionDefaults....
1
vote
2answers
19 views

Unable to assert in test for QuickAction.SendEmailQuickActionDefaults

I have a class for setting a default ToAddress when using a specific email action. See below: global class EmailHandler implements QuickAction.QuickActionDefaultsHandler { // Empty constructor ...
0
votes
1answer
33 views

VF Page Error Incorrect parameter type for subscript. Expected Number, received Text [closed]

I'm getting below error when I'm trying to pass values from map to pageblocktable in Visualforce page. ERROR : Incorrect parameter type for subscript. Expected Number, received Text VF PAGE : &...
-1
votes
1answer
35 views

Creating fulsome combinations of list elements

I have been having some issues getting the logic down for the following: Simplifying, I have an N-element list of Skids defined as: public class Skid { public Integer length { get; set; } ...
0
votes
1answer
36 views

List.Add() not working

I've got the following code snippet in a trigger handler class x1 = trigger.new; List<Id> listx = new List(Id); For(integer i = 0; i < x1.size(); i++ ) { System.debug('Loop ...
0
votes
0answers
14 views

Sending email in Pardot Engagement Studio using dynamic list during business hours

There is a program in Pardot Engagement Studio having 3 simple steps - start/entry point - a dynamic list, send email, end. The email is to be send on weekdays during business hours. The dynamic list ...
1
vote
0answers
48 views

how to avoid system.limitexception too many soql queries 101 in apex classes [closed]

when I am trying to deploy the component then I was getting this error like system.limitexception too many soql queries 101 how to avoid this? ====================================== /** * @...
1
vote
2answers
114 views

Illegal assignment from Id to List

I have a real quick question. Usually when I want to get a list of IDs as a List i'll do something like: List<String> voterIds = [select ID, from Vote__c where suggestion__c =: recordId].ID; ...
1
vote
0answers
22 views

List Button is not passing parameter in URL for a particular profile

I have a list button on a related list of custom Object ABC under Contact object which redirects to a VF page (custom record creation page for ABC). I am passing contact id in the URL so that contact'...
1
vote
1answer
60 views

Do Maps have an Reliable Relationship between keySet() order and values() order?

Let's say I have a map, for example: Map<SObjectField, SObjectField> valueByKeyMap Assuming neither the Map nor its contents are mutated by other activity in the system, can I rely on these ...
0
votes
0answers
11 views

Rule group within a rule group in Pardot

Is it possible to have a rule group within a rule group while creating dynamic list in Pardot?
0
votes
1answer
24 views

Wrong format of JSON Array after a successful POST using Apex Class

I've been trying to create a List from the Account object, filtered by their record type, to be sent to our website using the Apex Class. I managed to create the query correctly and it returned the ...
0
votes
0answers
30 views

How to check List contains?

I would like to check if List contains the serialnumber. 1.User select items. 2.Next page, user select options. Items and options are related by serial number. So, User want option-select-page to ...
0
votes
1answer
22 views

Using both lists and data extensions at the same time in for email and SMS sending?

So I know this isn't the best practice but is it possible to use both lists and data extensions in marketing cloud without any complications? Use case could be like: I use lists when I want to send ...
0
votes
1answer
24 views

Putting a List Inside the value of a map

I am getting an error Error is in expression '{!setGroupBy}' in page customjobapppage: I tried multiple approach and I ended up with this: so this is how i Initialize my map public Map<...
0
votes
1answer
28 views

pass list<string> value in test class

In my class one list of string is there which is get;set; type. i want to pass the value in test class how to do this public class MYController(){ Public list<string> selectedDelList{get;...
0
votes
1answer
42 views

List items not getting removed

I want to remove Accounts from List to which user doesn't have access. Here is my code. However in the debug logs, I can see all the accounts, that is none of them are removed. query += QUERY_BASE + ...
0
votes
1answer
47 views

How to identify similar records in a List and then updating corresponding fields

trigger setCertificationToFailed on Exam__c (after update) { List<Exam__c> ExamList = new List<Exam__c>(); ExamList = [SELECT Id, Exam_id__c, Exam_state__c, doNothingExam__c, ...
0
votes
1answer
36 views

How to iterate map and assign value to field in lightning component?

I have list of account Ids in an array and list of accounts in array. I need to find the account Ids from the account list and want to change the status field. var accId=[]; //holding accIds var ...
6
votes
1answer
296 views

How can I query the supported timezones in Apex?

Apex provides a TimeZone API. You can use this to query the detail of a time zone, named using its "SID" (a value like "Europe/London" or "America/New_York" for example). However, this API doesn't ...
7
votes
2answers
148 views

SOQL: Populate a Literal List in WHERE IN Clause

I need to query for an object based on 2 string variables. The first one is a constant but the second one gets passed to the class constructor. So in the end I want to achieve something like this: ...
-1
votes
2answers
62 views

How to remove list elements without an additional for loop?

I need to remove from the following revenueList list all elements where newRevenueDate is NULL without any additional for loops. List<Revenue__c> revenueWithNoDateList = new List<Revenue__c&...
8
votes
1answer
75 views

How can I safely cast a List<sObject> to a specific concrete type?

I have a List<sObject> genericList in scope in a method. The list was created and populated elsewhere and passed in as a parameter. It could be: a List<sObject> that is homogeneous. E.g. ...
0
votes
1answer
26 views

Where to look for in debug: list index out of bounds

I am trying to debug a piece of code where I get the error : list index out of bounds: 0 In this case do I need to look for:ZcheckoutBaseFor.validateConfiguration() or could this also be :...
0
votes
1answer
25 views

Error trying to remove account from list

When I run the button this error appears: Cannot modify a collection while it is being iterated. public void removerConta() { List<ContaVinculada> listContasRemover = new List<...
0
votes
1answer
24 views

Insert a List collection into a Map Collection with the same index

I am trying to add a List of collection to a Map Collection with the same Index. I have this Code: List<Account> accountContactList = [SELECT Id,Name FROM Account]; Map<Integer,List<...
0
votes
2answers
120 views

Many Lookup Relationship for One Object

I have the case of an object having two lookup relationship and I call for a list containing both relationship as follows. This is my Setup code public static List<Job_Application__c> ...
0
votes
1answer
23 views

How does joining two custom objects into one custom object through master-detail relationship work

I've been working on a test method but I've had a problem creating the setup of it. public static List<Job_Posting__c> createPostings(){ List<Job_Posting__c> testPostings = new ...
0
votes
1answer
30 views

Does Salesforce or any third party maintain a list of which formulas work in list views?

I am looking for a list of formulas that work in list views. For example, you can set "last login" = LAST QUARTER on the user list view, which is very helpful for generating a list of users who have ...
1
vote
1answer
424 views

List sorting by custom field

I dont know how to sort a list of SObject Case. I have a List<Case> newCases which i iterate over in for cycle, where i save Cases to my new List<Case> casesList. for (Case newCase : ...
0
votes
1answer
49 views

Add a new field with value to an already existing SObject

The goal is to get base64 of attachments of each record to render them in a visualforce page. Each record may have any number of attachments or no attachments at all. Map<Id, SObject> results =...
0
votes
1answer
30 views

Add a new List<object> to an already existing List<Object>

Is it possible to add a new list to each object in an already existing list? List<MyObj__c> results = [SELECT Id, Name, Text__c FROM MyObj__c]; I have a second object obj2__c. I want to add ...
-3
votes
2answers
35 views

How to separate only duplicated elements in apex List? [closed]

I have a List with objects and some of them are duplicated. I need a new list containing only the duplicated elements but each element must be available only once. For instance: {1, 1, 1, 1, 2, 2, 3,...
-1
votes
1answer
46 views

Chunk Account list into List<List<Account>>() based on a condition

I am having trouble with a small piece of code. I am calling an API, with List of accounts address. API is working fine, but it gives error when URL endpoint length exceeds 3500. I have a look on ...
0
votes
1answer
24 views

Combine two List<Map<String, String>> for unique list

How can I combine two lists of maps so that only the unique values in the list remain? I thought about doing some nested for loops to compare the two lists, but it seems a bit messy. Is there a ...
2
votes
1answer
110 views

Delete all records in All Subscribers List at once

We're doing some data cleanup here and need to delete all records from the All Subscribers List. I've seen several suggestions regarding exporting all the records from All Subscribers to a CSV, then ...
-2
votes
2answers
88 views

List size isnt working as expected for partner user

I have observed very weired nature in Lists result. I run this query in query editor: select id, Title, Description, FileType,FeaturedContentDate,FeaturedContentBoost,ContentDocumentId,TagCsv from ...
1
vote
2answers
142 views

Create List of Strings from Another List of Object Records

I am new to Salesforce development and I am trying to practice by creating a list of strings deriving from another list of object records created from a query. My code is the following.... public ...
0
votes
1answer
156 views

SOQL: Retrieve records based on List of Booleans

I have this json object coming in for boxes: Boxes: [ { count: 5, Fragile: true }, { count: 10, Fragile: false } ], I have box records that need to be updated based on if they are fragile or not ...
4
votes
1answer
129 views

Bound data binding does not work with list items

Let me start by showing you what I am doing. ParentAppWithListAttr.app <aura:application > <aura:attribute type="List" name="justAList" default="['hello','world']"/> <aura:...
1
vote
1answer
94 views

Error: Too many DML rows: 10001

I have a question here, every time I run my code I first delete everything that is in the object, and then inserted a new list, when I try to do this simultaneously with the error ERROR System....
0
votes
2answers
18 views

APEX: Can't add instances of a custom class as elements of a list within a complex class

When I try to initialize an instance of the daisychain class below, using the makeDaisyChain method, I get a "System.NullPointerException: Attempt to de-reference a null object" error. ...
0
votes
1answer
24 views

Data Duplication [closed]

I have a List in which I am adding registry, but I noticed that the registry comes duplicated, for that I used a set, but the set only returns me a single registry instead of a List, can someone help ...
-1
votes
2answers
80 views

How to Divide a list which has set of duplicate values in it in apex

for(AggregateResult hier4: hierarchy) { fld4.add((String)hier4.get(Field1)); fld5.add((String)hier4.get(Field2)); fld6.add((String)hier4.get(Field3)); string Soqlstr3=' Select Name '...
0
votes
1answer
36 views

APEX Would like to validate my approach [closed]

I have written the following REST callout to update Club & Players custom object. Based on the API ID club information is fetched and updated, same for players as well. For players I need to check ...
1
vote
1answer
30 views

Removing ALL Duplicates on a List

I'm facing a Requirement Specs that can be simplified to this scenario. Simply put, the specs say to remove all duplicates from a list. This means not to leave one duplicate record from the list but ...