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.

116 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
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?...
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
0answers
81 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
50 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
494 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
995 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
44 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
1answer
363 views

Getting error “Method does not exist or incorrect signature: approveRecord(Patient_Package__c)”

Below are my two methods. I am getting error at "approveRecord(ppcklist[index]);" saying Method does not exist or incorrect signature: approveRecord(Patient_Package__c) public static void ...
2
votes
0answers
56 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
21 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
57 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
52 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
706 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
48 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
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
43 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
23 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
191 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
36 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
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 ...
1
vote
0answers
323 views

json.serialize returning null

List<ClassName.CustomerDetails> CustomerDetailsList = new List<ClassName.CustomerDetails> (); ClassName.CustomerDetails custDetails = new ClassName.CustomerDetails(); ...
1
vote
1answer
193 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
369 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
121 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
56 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
124 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
34 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
120 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
105 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
337 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
56 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
2answers
19 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 ...
0
votes
2answers
41 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 ...
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
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 ...
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
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
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
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
21 views

Building out a multi-dimensional array / list for an update statement

I have a contact list I am looping over and one of the fields in the contact object holds 1 or more contactIDs in a delimited list using a carriage return. Standard Contact Object: ContactId: ...
0
votes
0answers
28 views

Adding Subscribers to List via SDK

My integration team is trying to add subscribers to a list via the SOAP API and while the user is getting added to 'All Subscribers' it is not being added to the list in each child account. Below is ...
0
votes
0answers
13 views

Use flow loop to add the parent to a list

I have a master-detail relationship between Account and Property Agreement: I'm using a "Get records" element to browse through the child records and I need to add the parents to a list. I tried ...
0
votes
0answers
16 views

Is there any limit in creating fields in Profile managent

I want to display about 250 fields in the All Subscribers list. So is it possible to do that or is there any restriction on the number that can be displayed.
0
votes
1answer
26 views

Unable to Compare two Strings in Salesforce - APEX

I am trying to Compare two strings which are delimited by SEMI-COLUMN (;). I have made sure I SPLIT them and the store them in lists. In the below example, I receive an error for BALL for all other ...