Questions tagged [picklist]

A picklist is a field type in Salesforce that contains a list of values from which a user may select a value. A picklist is represented as a drop-down box in the UI.

Filter by
Sorted by
Tagged with
47 votes
5 answers
11k views

How do I get the intersection of RecordType and Picklist values inside Apex?

#Context# This question has been asked before in the past and I've found several discussions of it here on StackExchange and elsewhere (links below to pages I've found in my research). So far I'm not ...
user avatar
  • 952
27 votes
2 answers
15k views

Converting an Existing Picklist to Use Global Picklist

Is there a way to convert or update an existing custom picklist to use a global picklist without deleting and recreating it? As most will be aware this cannot be done easily if the field is referenced ...
user avatar
  • 5,175
22 votes
2 answers
63k views

how to get a picklist all values in apex controller

I have a Student object and have a pick list field "Student Status" in this object. Status can be Full-Time OR Part Time. Now my requirement is i want this student status list, Part-Time or Full-Time ...
user avatar
  • 5,200
20 votes
2 answers
52k views

How to query 'Value' of a picklist rather than the 'API NAME', using SOQL?

I am using SOQL to query the opportunity. When I use the query, SELECT CUSTOM_PICK_LIST_COL__C FROM OPPORTUNITY I am getting the values under the API Name of the picklist items. How to get the value ...
user avatar
15 votes
6 answers
5k views

What are the best practices for managing changing picklist values in managed packages?

One of the issues that we always see when creating new releases of our managed package is that new or changed picklist values don't deploy when someone upgrades our app using a new release that we ...
user avatar
  • 3,959
15 votes
2 answers
9k views

Mass Delete Picklist values

I'm trying to find an automated way to mass delete picklist values. I had a look at the following ways to accomplish this but without success: Force.com IDE: Deleting the picklist values in the ...
user avatar
14 votes
1 answer
3k views

Why is State and Country a text input in Visualforce when I have State/Country picklists enabled?

Are State and Country Picklist supported in Visualforce? I'm trying to access them on Visualforce for Contact object but only a Textbox is displayed instead of a Dropdown. My code is: <apex:page ...
user avatar
  • 5,606
14 votes
2 answers
10k views

Picklist Values in Dynamic Lightning Components

Is there an out-of-the-box solution to populate record-type specific picklist values when creating a picklist dynamically (in a Lightning Component) that references an sObject field? At this point ...
user avatar
  • 139
13 votes
3 answers
3k views

Is there a way to group options in a selectList

Is there a way to group options in an apex:selectList I have in my page <apex:selectList styleclass="form-control rec" size="1" id="country" > <apex:selectOption ...
user avatar
  • 866
13 votes
1 answer
333 views

Massive Spring '17 bug: SOQL returns wrong Custom Metadata Type picklist value

Based on all evidence gathered there is a major bug in Spring '17 involving Custom Metadata Types and picklist values: what SOQL returns is different than what's saved in the database. To reenact: ...
user avatar
  • 3,766
12 votes
1 answer
2k views

State & Country picklists - importing leads with states for countries without states enabled

Tell me that I'm wrong but it would appear the State and Country picklist feature makes it impossible to integrate / import Leads with state values from countries where you are indifferent to the data ...
user avatar
  • 62.4k
12 votes
1 answer
2k views

Prepopulating multiselect picklists in a flow

I have a multiselect picklist on a record. I want to display its current values in a multiselect picklist in a visual flow. But when I tried setting the value of the picklist to a variable and setting ...
user avatar
  • 121
12 votes
0 answers
9k views

SFDX Deploy: Global Value Set Cannot Be Resolved

I am trying to use DX to deploy to a sandbox. It has been a major hassle. At this point the only error I get is this: Global value set 'External_Evaluation_Required__c' in record type 'Exception' ...
user avatar
  • 1,018
11 votes
2 answers
17k views

Retrieve globalpicklist/globalvalueset without SOQL

Is it possible to retrieve the values of a Global Picklist/GlobalValueSet using Schema class without a SOQL ?
user avatar
  • 997
11 votes
2 answers
10k views

Custom setting Setting type not visible

I am trying to create a new custom setting in salesforce but the Setting Type field is greyed out and fixed to Hierarchy. What could be the possible problem?
user avatar
  • 517
11 votes
2 answers
3k views

Metadata API error while reading Picklist: Web service callout failed: Unable to find apex schema info

I am trying to read a custom dependent picklist field and update it's field-dependencies. I have followed the common resources found online and getting the below error: FATAL_ERROR System....
user avatar
11 votes
1 answer
18k views

How to display Picklist Label, instead of Picklist API in a Formula Field

I think the title says it all, we are using picklist values having different Label and API Name. How can I display the Picklist label instead of API in when using a formula field. I know I can use IF ...
user avatar
  • 273
11 votes
2 answers
4k views

Are dependent picklists supported in Lightning Components?

It's possible to define dependent picklist in the setup and the are supported out-of-the-box in Visualforce. Are they also supported in Lightning natively? Is it on the roadmap to support them soon? ...
user avatar
  • 33.6k
11 votes
3 answers
7k views

Lightning - retrieve picklist values available for RecordType

How can I show only picklist values allowed for a specific Record Type? For example: Case.Status values are "Pending", "Open", "Closed" Case RecordType1 only allows the Pending value Case ...
user avatar
  • 397
10 votes
2 answers
10k views

Access to State and Country Picklist values through Apex or API?

I recognize that State and Country Picklists are still a "Beta" feature, but does anyone know if, in Summer 13, its possible to get at the State and Country Picklist Values through either the Apex ...
user avatar
  • 9,363
10 votes
1 answer
9k views

Dependent multi-select pick lists

I'd like to add 3 picklist fields to an Account object in the following manner: Parent multi-select Picklist field (let's call it ParentMultiSelectField__c) A dependent mutli-select Picklist ...
user avatar
  • 3,661
10 votes
6 answers
10k views

Dependent picklists - Controlling field not on the page layout

I want to be able to have the controlling field of a dependent picklist not show to the users, I am updating this field using workflow. From Salesforce docs Page layouts Make sure controlling fields ...
user avatar
10 votes
1 answer
2k views

How to write Address.settings in order to implement Country Picklists via Metadata API (eclipse)?

In order to implement Country Picklists on standard address fields I'm following the documentation here: https://help.salesforce.com/HTViewHelpDoc?id=admin_state_country_picklists_overview.htm&...
user avatar
  • 33.6k
9 votes
2 answers
9k views

Error: Cannot modify managed object

I have a picklist field in an object with a controlling field and it is uploaded successfully. But when I changed it's controlling field to an another value the uploading gave an error saying :- ...
user avatar
9 votes
1 answer
1k views

Picklists not Supported in SOQL WHERE Clause (External Objects)

Background I ran a SOQL query from the developer console on one of my external objects which has a picklist field (Object name Fixture__x, picklist field name Status__c). The following query: ...
user avatar
9 votes
0 answers
2k views

Populate Record Choice Set from a Record Collection Variable

I am creating a lightning flow & trying to create an input with dynamic choices. On the basis of some decisions I am using get Records with different filter criteria to get records & using ...
user avatar
  • 449
8 votes
4 answers
17k 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....
user avatar
8 votes
1 answer
10k views

Picklist API name in Formulas

In Spring '17 I am trying to use picklist value API name in a formula. How can I access a picklist value API name in a formula like ISPICKVAL?
user avatar
  • 4,869
8 votes
1 answer
6k views

Picklist value translation

I have am email body I'm generating in APEX and I want it to include the translated value of a picklist. How can I get the translated value in APEX?
user avatar
  • 4,869
8 votes
1 answer
5k views

Deploying standard picklists via Metadata API

Have some trouble deploying leadSource and Industry picklists via Metadata API. Had to comment out both of them from the build. It may have something to do with these picklists being shared by ...
user avatar
8 votes
2 answers
4k views

How to Find the Count of Multi-Select Picklist?

I was searching for a method to find the count of selected multi-select picklist. My aim is to select multiple options for Known-Languages in a Drop down and to display the selected count in a Counter ...
user avatar
8 votes
1 answer
853 views

How do I go about updating Pat Patterson's Multiselect Picklist Visualforce Component for API > 26?

Pat Patterson's Multiselect Picklist component is exactly what I need for a page I am working on, and works great with API version 26. However, when I try to use it with a more current API version (...
user avatar
  • 2,092
8 votes
5 answers
4k views

Picklist value available for selection on change of record type

There is a custom object "XYZ" which has a picklist field "F1" with values 1, 2, 3, 11, 12, 13. There are two record types "A" and "B". For A, F1 has 1,2,3 set and for B, F1 has 11, 12, 13 set. User A ...
user avatar
  • 81
8 votes
1 answer
456 views

Is it possible to add a controlling field to an existing picklist on a custom object as part of a managed package upgrade?

I have an existing picklist on an existing custom object in a managed package. This package is already deployed and installed by users. For the next release of my package, I have added a checkbox ("...
user avatar
  • 265
8 votes
1 answer
764 views

Is there a way to automate the deployment of changed picklist values in a pipeline using SalesforceDX?

Sometimes we need to change the label or, more commonly, a value for a picklist item. Suppose we do change the fullName attribute of a picklist field, to match an external system that will integrate ...
user avatar
7 votes
7 answers
6k views

Multiselect Picklists with many values

Note: Though this is still of use in extreme cases, the limit on multi-select picklist values has been raised to 500 values in Winter '16. Also, the Global Picklists feature, which is currently (...
user avatar
7 votes
2 answers
20k views

Using Custom Labels in a Class

I have the below If statements using some hard coded strings and I want to make them use as custom labels. I have created custom labels with the same String names as given below. So how can I make ...
user avatar
7 votes
2 answers
2k views

Replacing the Picklist old values into new values?

We have a requirement to updated the picklist values to new values. We are doing it via "Replace". Whenever we do this, will the updated record fire Apex Triggers, Workflow Rules, etc.?
user avatar
7 votes
1 answer
3k 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 ...
user avatar
  • 27.4k
7 votes
2 answers
9k views

Metadata API : How to get the translated values of picklists of my object

Wanna get the translated values of picklists of my object? How can I get them in Apex. I tried using Metadata APi but invain. Can anyone suggest me?
user avatar
7 votes
4 answers
724 views

Options for universal pick lists?

Is there any strategy for implementing global lookup lists (universal pick lists) ? There is a long standing request (for 7 years) for this, and it is something that I am used to having in Dynamics ...
user avatar
7 votes
1 answer
12k views

When is it appropriate to use Record Types?

The documentation for Record Types states: Record types allow you to offer different business processes, picklist values, and page layouts to different users. It seems to me that unless you are ...
user avatar
  • 13.3k
7 votes
1 answer
6k views

Dynamic Picklist Values by RecordTypes? [duplicate]

I've searched high and low and can't seem to find any posts or blogs showing how to get picklist values for a particular recordType to use in a custom controller. I can easily obtain the RecordType ...
user avatar
  • 40.4k
6 votes
3 answers
4k views

I have a managed package, if I add values a picklist, will my customers get it on an upgrade?

I have a managed package. I have a picklist about where to store something. If the picklist has "Files" and "Notes and Attachments", and I want to add "Content" as an enumeration, when I make a new ...
user avatar
6 votes
3 answers
809 views

Get list of unused picklist options

I have a custom object with a picklist field with a very large number of options. In an effort to reduce the number of choices, I want to find (and remove) all the options in this picklist which are ...
user avatar
6 votes
3 answers
2k views

How to support State and Country picklists from same code that supports picklists disabled?

It would seem that it is not possible to support picklists enabled and picklists not enabled from the same Apex Code if we are writing to the State or Country. Consider the following: oAccount[0]...
user avatar
6 votes
3 answers
1k views

Enforcing Order of Execution (stage progression) in picklist

How to force the order of execution(selection) of the picklist values in salesforce.Is there any other way other than validation rules in visualforce page. Lets say I have 4 picklist values (Draft,...
user avatar
  • 13.3k
6 votes
2 answers
7k views

How to render VisualForce components based on default values

I am trying to render one component based on whether another one has a specific value set on a Visualforce page. Using the following, it works fine EXCEPT on the initial load (i.e. once I start ...
user avatar
6 votes
1 answer
4k views

How to reference Choice Value in formula instead of its label?

I have a Picklist screen component in a Flow which has many choices defined in the same flow: Now I need to make a formula that references the Choice Value of a given choice: If I use UPPER({!Plan} +...
user avatar
6 votes
1 answer
3k views

Get picklist values in apex in the order they were entered

I want to get the picklist values of a picklist field in Apex. I use the someFieldResult.getPicklistValues(); function and that works fine. This gives me all the picklist values, in alphabetic order (...
user avatar

1
2 3 4 5
21