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.

119 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11
votes
3answers
4k 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?...
4
votes
0answers
2k views

Subscripting a list in VisualForce

I have a list of items, and I'd like to access the first item like below, but get an error when I compile: <apex:outputText value="{!items[0]}" /> Incorrect parameter type for subscript. ...
3
votes
1answer
170 views

Case standard list controller won't show any records on visualforce page

I am new to Visualforce, and for the life of me I can't get a case standard list controller to show cases. It works for Accounts and Contacts, just not cases. Here is the code: <apex:page ...
3
votes
1answer
66 views

Exit customer from welcome Journey - After click/subscribe

I am trying to launch a welcome series with the intent to get the subscriber to fill out their profile. I am using Journey builder to do it. I want to exit the Jounrey when the subscriber visits the ...
3
votes
0answers
628 views

"Add to Campaign" button at Contact Details Page

I'm trying to customize my contact layout and our communications department wants to have "Add to Campaign" button right at Contact Details Page Layout. I tried to add standard "Add to Campaign" ...
3
votes
2answers
1k 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 ...
2
votes
0answers
74 views

"Automatically Refresh Upon Sending" list function doesn't work

In Salesforce Marketing Cloud, the button "automatically refresh upon sending" present in every contact list doesn't stay on after clicking on "Change" and setting it to "On". After the page is ...
2
votes
0answers
61 views

List resets / doesn't insert the values

I have the following code: public class usersManagement { public Map<String,User__c> usersMap; public List<User__c> selectedUsers; public String retrievedUsers {get;set;} public ...
2
votes
0answers
59 views

Query results in Query Editor are different then Degbug Log Results

When I query ActivityHistory in my SOQL editor, I get back the correct results with the correct format of the activity date: [{"CreatedById":"00534000009QnEtAAK","Subject":"Call","Description":"this ...
2
votes
0answers
42 views

Can't find a specific list by it's ID

I filtered all list subscribers by specific list ID and it returned the subscribers ET_Client client = new ET_Client(parameters); ET_List_Subscriber list = new ET_List_Subscriber(); ...
2
votes
0answers
23 views

How to find cause of failure when list upload through FuelSDK fails

When my script attempt to import a list that I uploaded via CSV and I check the status, it eventually returns this. What is the cause of failure? response from ET_Import.status() ET_Get Object ( ...
2
votes
0answers
59 views

Sort after Converting Object Name to Autonumber

We are trying to insert all of our historical quote data to a custom object "Quote". In doing so, we want to conserve the existing quote number that was generated in our legacy Access database but ...
2
votes
0answers
53 views

Weird List/Collection behaviour - Adding an object vs property of an object

Can someone explain this weird behaviour of List? I am trying to call a Webservice which returns me an object SyncClientLicenseInfoWS.LicenseInfoWrapper, which is an inner class. When i add this ...
2
votes
0answers
707 views

REST API For exact target. Add subscribers to lists

We have a email subscribe form that will add users to Email lists they select in the interface. I am trying to find REST API documentation for Exact Target that will allow us to do the following: 1. ...
2
votes
0answers
49 views

How to create a persistent list of modified SObjects for later sync to 3rd party system?

Over the course of a 24 hour period, I need to keep some sort of persistent list of contacts that have been updated under certain conditions. I'll populate the list with a trigger that evaluates the ...
1
vote
0answers
56 views

Run Automation When A Data Extension is Updated

I have an external system that accesses Marketing Cloud to send an email, we are selecting users from that external system and then it updates a Data Extension in Marketing Cloud moments before it ...
1
vote
0answers
82 views

Is there a way to pass a dynamic list into a ListView component?

When using a ListView lightning component, is there a way to pass a dynamic list in as opposed to an existing List View? Or would a list view have to be made completely from scratch in order for that ...
1
vote
0answers
77 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
461 views

Passing List into Apex - Want to insert individual attributes from list

I'm having some difficulty with lists and apex. I have a list declared in my lightning component, please see below: <aura:attribute name="AssetsList" type="List" default="[]"/> I then set ...
1
vote
0answers
43 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
0answers
439 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
40 views

Removal of List elements from another Lists?

There are two lists (UserProduct And List Product), each of them holding Product code and Product Name. On selecting a particular user from picklist UserProduct Lists displays Products based on ...
1
vote
1answer
909 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 ...
1
vote
0answers
403 views

json.serialize returning null

List<ClassName.CustomerDetails> CustomerDetailsList = new List<ClassName.CustomerDetails> (); ClassName.CustomerDetails custDetails = new ClassName.CustomerDetails(); ...
1
vote
1answer
221 views

Delete All Subscriber List: SOAP

I am very new to APIs and eager to learn (especially as I have just uncovered that the only way to delete members from the All Subscribers List is with a SOAP Call). I have installed Postman and ...
1
vote
2answers
415 views

SalesForce Marketing Cloud / Exact Target: Create Subscriber in List via SOAP, but not showing up in list

I am trying to create a subscriber using the SalesForce Marketing Cloud/Exact Target SOAP API. My subscriber is successfully being created, but they are not appearing in the specified list (only ...
1
vote
1answer
143 views

Test class List Exception: Controller cannot find test data

I'm testing a class as a community user. Here is the issue. my debugs show that running user is set. My User query returns a user with a contactid but for some strange reason the contact query is ...
1
vote
3answers
190 views

Custom Object -- duplicate record

I have a custom object and we have a lot of records of same name under it, how do i make a list with no duplicate values in list
1
vote
1answer
144 views

Emptying List - Deleting subscribers from a List FuelSDK

I have created a program in ET to send e-mails from a particular list. I am populating this list named Test, which is located in a Folder named 2016, using the FuelSDK API. I haven't found a way to ...
1
vote
0answers
90 views

Too many SOQL queries error on apex class

I have the class below getting data from a trigger (that seems to be working ok), the problem is, I am getting a "Too many SOQL queries" errors when it executes. If I comment out "insert ...
1
vote
0answers
36 views

Metadata Namespacing rules in Branch Org

I am using the FinancialForce Apex bindings to access the Metadata API on one of my orgs. I attempt to create and a related list to one of the Opportunity layouts. This related list refers to other ...
1
vote
1answer
136 views

Display two lists in Apex chart

Currently, onclick of a button, I'm displaying a bar chart with all data available in that object for that particular filters (using Javascript Remote Action). List<AggregateResult> ListName = ...
1
vote
2answers
161 views

How to sort when we use aggregate function?

I have a formula field that orders a particular field values. Example: A field for employees profession, for each profession there is an equivalent number value like, "IT = 1, Doctor = 2". I'm using ...
1
vote
0answers
359 views

Getting error while adding list elements to set

Below is my code.names.add(newlist) gives error while names.addAll(newlist) gives error.While there is a method in apex where we can add list to a set and both should be of same datatype. Apex class: ...
1
vote
1answer
65 views

List of custom objects for each user in list

I have a list of users and I want to show which custom objects each user has access to. Instead I am getting a list of all custom objects for each user public Set<string> getCus_obj() { ...
1
vote
0answers
82 views

attempting to add data to list using landing page

I have created a landing page and I am trying to add the details to the list. But I am unable to do so. The landing page contains the fields like email address, first name etc. When I enter the ...
0
votes
0answers
36 views

List has no rows of assignment to Sobject

I am facing an issue with the below code my List has 200 records but still i am facing this error List has no rows of assignment to Sobject. Could someone please help with the below error on why i am ...
0
votes
1answer
28 views

Queueable insert list records from map and keep order

I have Map with Account and Account Id. I want to insert that accounts in Queueable and return list of all ids in order as acount is inserted(Or map, it doesnt really matther). How can i keep order if ...
0
votes
1answer
58 views

Check particular value in a list

I have a list. In the list, I have ids and names. May I know how to check if a name is in the list or not? Its like if the name 'Ali' in the list, OwnerID = id [Id value takes from the list] trigger ...
0
votes
1answer
17 views

Add Lightning Avatars into a list of Different Results from a Customized SearchBar

I have a search bar which is showing the Users, Queues and Public Groups from the ORG, when you start typing on the search bar the different objects start to appear. I want to show the results with ...
0
votes
1answer
34 views

Apex Class - List of records by record type that also reference a field value on found records

I don't write code, so bear with me. I have a portion of an Apex Class that pulls a list of record types for Cases. However, I need to add a criteria here that then looks at the received records and ...
0
votes
1answer
27 views

Update(reassociate) lookups on newly created object from an old object

What is a better way of writing the below code so I can avoid repeating similar lines of code for every lookup object that I try to re associate Here Speaker & Session are Lookups on Event Object, ...
0
votes
1answer
43 views

How can I map one record to another using a lookup field in salesforce?

I hope you are well, I would like to ask for your help with something that you have in mind and I can not do it haha If I have two different object record lists and the first record list has a lookup ...
0
votes
1answer
25 views

Variable does not exist: Name compilation Error

I am trying to create a new case once the rating of a Hotel is < 45% Here Hotel__c is the parent object and Customer_Reviews__c is child Object with MDR Even though there is a field called Name i ...
0
votes
1answer
15 views

Select every list elements using field checkbox, not only - on example 50

Does Salesforce make it possible to select every records in table using field checkbox for list? Becouse when we select this checkbox, scroll down and new elements appears, they will be unchecked. Is ...
0
votes
0answers
36 views

Iterating through a List and create another list

I'm trying to iterate through a list and create multiple records with it but I am not able to. The list is created and filled with the changeHandler event: if(event.target.name==='psProduct'){ ...
0
votes
0answers
10 views

Can i use a publication list to filter a data extension?

I've created a multi-step journey (email then SMS). We want to send the email and SMS to a publication list created just for promotional emails. I've selected a data extension as an entry-source then ...
0
votes
0answers
27 views

Whenever I am doing any exercise on Opportunity object I also get the error Ilegal assignment from list<Opportunity>to list<Opportunity>

List<Opportunity> oppList =[ Select Name, StageName, CloseDate from Opportunity];
0
votes
0answers
23 views

Is it possible to run a report of all Lists that are marked as 'public' in Marketing Cloud?

I have recently started at a company that has a LOT of List and Publication List Sub-Folders in Marketing Cloud. Looking at the Subscription Center, it looks like at least some Lists have been marked ...
0
votes
0answers
42 views

Help with changing a line on a list class in apex code

I am pretty new to coding and just need help on adding/changing the following line in my apex code so it queries the RecordTypeId as well as the OpportunityId from the record that my lightning ...