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.

Filter by
Sorted by
Tagged with
1
vote
1answer
352 views

How to create an Automation Studio exclusion AMPScript to filter the users of the last hour?

I would like to send an email to the users of my Exact Target list after a certain amount of time. In order to do this, I set up a workflow in Automation Studio with a Send Email task. Inside the ...
0
votes
1answer
541 views

How can you associate multiple standard list controller with a visualforce page

Good afternoon, We have a visualforce page that allows us to add multiple contacts at once from a account view. When we add these I would like to be able to associate these contacts with a campaign ...
0
votes
3answers
41 views

Comparing Two Lists of Different Objects

I have two lists for two different objects. They are both are related to opportunities. I want to check to see if the two lists are associated with the same opportunity and, if they are associated ...
11
votes
3answers
2k views

Lightning: dynamic index in aura attribute with type List

related post I am having the same issue. Trying to access array with dynamic index arrayList[index] (index from aura:iteration), but Salesforce doesn't support that. Does anyone know how to do this?...
0
votes
1answer
30 views

List index out of bounds: 0 in execution batch - Send email

I am trying to understand what may be going on. My code basically sends emails through a batch. However, in the executions it is giving the error "List index out of bounds: 0". I can't find ...
0
votes
1answer
662 views

How to get the row data in apex pageblocktable to update the list in apex class

Im planning to update each row using actionSupport event = "onchange". I'm trying to get the ID of the row but it is NULL. Or Is there any way It can be updated as a list without using the ...
1
vote
1answer
109 views

LWC JavaScript way to copy List [List A, List B] Values to a single List

I'm looking for a way to copy wrapper list of content values to a single list Example: LIST<wrapper> dataAandB= [LIST A,LIST B] => List A =[Object X :{Id,Name ... }] and List B =[Object Y :{...
0
votes
1answer
36 views

Parent ID not updating on Attachment [closed]

I have a requirment where when 2 records are merged, the attachment related to merged record should be inserted to parent/master record. Below is my code related to this List<Attachment> attObj =...
0
votes
1answer
37 views

How to differentiate values in a list

I have a list with records from Policy__c which is a custom object. List<Policy__c> PolList = New List<Policy>(); PolList = [Select ID, Code__c from Policy__c]; Now from the above query, ...
0
votes
2answers
42 views

Error: Id not specified in the update call

Below is my apex method where I'm updating Account_Transfer__c Records private static void linkPoliciesAndHandleApprovalFlds( List<string> selectedPoliciesSet, Account_Transfer__c ...
2
votes
1answer
64 views

Map changing the order of key value pairs in apex

I am creating a map from a string stored in a specific format. But Adding the key-value pairs and later displaying it, I notice the order is not maintained on the map. Is it possible to maintain the ...
0
votes
1answer
429 views

Unordered List with no bullets not working with email template

I have a Visualforce Component that has a un-ordered list. I want that list to have no style other then the indentation. Usually with HTML you would just specify the ul css to be list-style:none or ...
1
vote
0answers
18 views

Flow condition using CONTAINS doesn't work properly

I'm working on a flow, and basically I'm trying to compare number values with an "Array". when I debug d the flow, the condition fails: DECISION: verificarMesAProbar Skipped this outcome because its ...
1
vote
1answer
796 views

Array or List of Big Objects as parameter for AuraEnabled controller

Does Salesforce support passing an array or list of big objects as a parameter for an AuraEnabled controller method? In other words can I pass from a lightning component javascript controller an array ...
0
votes
0answers
31 views

Pipe delimiter to generate CSV programmatically in apex

I am trying to generate CSV file with the pipe | as delimiter but the issue that I am facing is it is converting separator into &#124; For example, if csv headers are contained in the list shown ...
3
votes
1answer
32 views

If I know the class type of an Enum, how can I get a list of the values?

I have the following method: public XAP_ENUM_EnumConverter put(Type enumType, XAP_ENUM_EnumWrapper enumWrapper) { ENUM_WRAPPERS_BY_TYPE_MAP.put(enumType, enumWrapper); return this;...
7
votes
5answers
16k views

Can I remove element from a list being looped through

In apex, how can I remove an element from a list being looped? List<String> companyinfos=new List<String>(); companyinfos.add('a1'); companyinfos.add('a2'); companyinfos.add('a3'); ...
-2
votes
1answer
36 views

Is it possible to merge Data from List and Data Extension via query in Marketing Cloud? [closed]

Is it possible to merge Data from List and Data Extension via query in Marketing Cloud? I need to create a Data Extension with SubscriberKey from the list and FirstName from the Data Extension. Which ...
2
votes
2answers
2k views

List Import Error: Invalid Context Status

I am trying to import a list of about 400,000 records into a list. Upon completion of the upload, I only get 2k records imported with the rest returning an "Invalid Context Status" and failing. Would ...
0
votes
1answer
683 views

Problem with passing List of objects to apex controller

I have a problem that i've been trying to work around for a while now. Basically i have a list of objects (some have id's some don't, the ones that don't have them will be inserted instead of being ...
0
votes
1answer
837 views

How to cover a getter/setter list (populated via query) in a unit test?

TL ; DR : I'm unable to fill a getter/setter list (that is filled via SOQL query) during testing. When unit testing a controller class, a certain {get;set;} list is not getting populated (it is null)...
0
votes
0answers
21 views

What would be the best way to strip values from custom list elements?

I have a custom list list<ExistingAccountResult> that contains the following values: ([accountid=00111111111w5YIQAY, includeinfunnel=true, masterid=11111111, salesforceaccountid=O-22222222, ...
0
votes
2answers
425 views

Marketing Cloud sending Content Builder Email to List

I have created a list (using SOAP API) and know the ID of this. The HTML Email exists in Content Builder, I know the name and the ID. How can I send the email to the list. This is not a triggered ...
6
votes
4answers
10k views

How can I add a new value to a picklist using APEX?

I have queries pulling all of the information correctly but what I can't seem to find was a way to add new options to a picklist using APEX. I currently have Package__c.Products__c.add(new Schema....
0
votes
1answer
22 views

Is it possible to get all lists associated with a list email using the Pardot API?

I would like to find the lists associated with a list email using the Pardot API. The list query doesn't seem to support parameter values that would allow for this type of query. Is there any way to ...
0
votes
0answers
25 views

Get unique set of string values from a query

I have a custom object called Asset__c in which there is a lookup field called Site__c which is linked to another custom object called Site__c. This Assets object has more that 20k records. What i ...
0
votes
1answer
43 views

Using Trigger.new List and Map compare new contracts with old contracts

I'm trying to compare dates of old contracts and new contracts (trigger.new) from the same account, the new contracts are imported and are from a lot of different accounts. But the performance of it ...
0
votes
1answer
27 views

Dynamically checking the values of a wrapperClass for a validation

I have a wrapper class. public class wrapperClass{ String s; Date d; Integer i; Id id; } There are different operations for which certain fields are required on these wrapper object. Example 1. for ...
0
votes
1answer
26 views

Is there any way to get the first 10 from the list of objects in APEX? [duplicate]

I need to get the first 10 object from the list that comes from the Query without limiting in the query notifs = [SELECT id FROM Notification__c WHERE Read__c=false ORDER BY ...
3
votes
2answers
997 views

How to create more than one temporary record with lightning components

Dear fellow Salesforce experts, I am building a lightning component where I am using a form with fields in order to create multiple records. I am already able to create multiple opportunity records ...
0
votes
2answers
30 views

Trying insert new contact with condition, with below code it is not happening

I am trying to add a new contact record with below condition where Account has greter than 99 employees an limit is 1. THough new contact is not getting created in accounts where employess are ...
0
votes
3answers
47 views

how to pass subquery als list into map

I have a soql with a subquery. What is the easiest way to pass the id of the query and the list of the subquery into a map. Do I need to create a loop for the subquery and ad them first to the list? ...
0
votes
5answers
6k views

How to add list of list and list?

this is my list of list ((VEC209_ALGE, 2751282.05), (VEC232_ALGE, 2557264.96), (VEC209_ALGE, 2.0), (VEC232_ALGE, 2.0), (VEC209_ALGE, 160000.0), (VEC232_ALGE, 120000.0), (VEC209_ALGE, 3379000.0), (...
1
vote
2answers
65 views

Any limit for map collection size for ReadOnly page

Context Since Lightning component Aura or LWC does not support @ReadOnly mode yet, we have opted for a Visualforce page to export queried data into an Excel and benefit from higher query rows limit. ...
0
votes
1answer
17 views

In List Of List I am not able to assign List of list to SOSL

list<list<sObject>> Mylist = New list<list<sObject>>(); Mylist = [ FIND {IBM} IN ALL FIELDS RETURNING Account(name),Lead(name)]; System.debug(Mylist);
1
vote
2answers
92 views

How to pass a list of string values to a picklist in a flow

I currently pass a list of strings from my apex class to a flow. The list of strings {!cancellationReasonsList} I pass to a choice recource. The choice recource I pass to a picklist. Instead of ending ...
0
votes
2answers
241 views

Method does not exist or incorrect signature: void get(Decimal) from the type List<Decimal> (32:49)

I am new to Apex and cannot seem to find a solution to the error below on the last line of code. The error I get when compiling is "Method does not exist or incorrect signature: void get(Decimal) from ...
0
votes
0answers
17 views

Create a list of accounts and access their fields

I am tackling a Salesforce APEX - problem which is probably quite straight forward but I can't figure it out: I have extend the code from https://developer.salesforce.com/docs/atlas.en-us.pages.meta/...
0
votes
1answer
40 views

LWC for:each issue in rendering list. Cannot use calculated id

I am trying hands on in lwc . Got stuck while I want to do something which in aura was like: <aura:iteration items="{!v.serverResult}" var="item" indexVar="i"> <li role="presentation" ...
-3
votes
1answer
49 views

Split the list in apex [closed]

I am having the list . List has 28 records. I need to split the records in the list into 13 + 13 + 2 in the code. Is it possible?. If it is possible how to do that? Can anyone help me with this? ...
1
vote
2answers
31 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 ...
0
votes
1answer
44 views

How to get current user flow in apex

I am calling an apex class from a flow (in flow debugger) where I want to get the current user/starter of the flow. I tried to get the user with apex but get a system nulpointer exception. I also ...
1
vote
1answer
37 views

VisualForce page, PDF, styling list items

Normally, using CSS it is possible to add a white space between the bullet or number and the text behind it. <ul> <li style="padding-left: 10px;">Text entry</li> <li style="...
0
votes
0answers
16 views

Use Community HTML Component to create nested unordered list in an ordered list

I am trying to use HTML code to create an unordered list nested in an ordered list. No matter what I try, the nested list has numbers in it. It isn't functioning like straight HTML. Can anyone get ...
0
votes
0answers
27 views

Open rates for each list for an email sent out to multiple lists

I have sent out a list email to multiple lists, for instance Boston and Chicago. I'd like to view metrics like open rate, etc for each list. I am able to view these metrics for the email as a whole, ...
0
votes
1answer
31 views

Pageblocktable not showing records

I'm querying Task record from contructor and displaying in Pageblocktable but it's not displaying records in Pageblock table. Could you please let me know what went wrong? <apex:page ...
2
votes
4answers
5k views

Convert and add list of string to set of ID?

I am tring to add list of string to set of Id . i am trying to avoid one more for loop to again loop and convert using Id.valueOf(). Help me to achieve it. Map<String,Set<String>> ...
0
votes
1answer
31 views

Unittest eror: System.NullPointerException: Attempt to de-reference a null object

I am writing a unittest for my apex class but get an error System.NullPointerException: Attempt to de-reference a null object on my unittest for variable: testoptions Apex class public class ...
1
vote
1answer
4k views

Adding to sub list/array within apex wrapper class

I am trying to figure out how to add to this wrapper class. public class Invoice { public String Type; public LineItem[] LineItems; public class LineItem { public String ItemCode; public ...
0
votes
1answer
18 views

How to test a List<SelectOtion> in unittest

How to test a List<SelectOtion> in unittest. I have the following apexclass public class WebToObjAttachments { .. public List<SelectOption> CountryOptions { get { ...

1
2 3 4 5
14