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
23 votes
2 answers
66k 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 ...
Pramod Kumar's user avatar
  • 5,300
9 votes
2 answers
5k 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? ...
Uwe Heim's user avatar
  • 28.3k
51 votes
5 answers
13k 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 ...
Grekker's user avatar
  • 1,062
2 votes
1 answer
295 views

Automate the process of picklist values retrieval from the backend

Is it possible to automate the process of picklist values retrieval from the backend? Here is how I am doing it right now: @AuraEnabled public static List<String> ...
iloveseven's user avatar
  • 1,105
1 vote
2 answers
2k views

Not able to get value of Picklist field of Parent on Child object record

In my org Lead is Child and a custom object (Intake__c) is parent. This custom object have 2 picklist fields called Intake_Month and Intake_Year. Now in trigger i am trying to access these 2 picklist ...
mkendre's user avatar
  • 13
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 ...
Kevin O'Hara's user avatar
  • 4,039
9 votes
4 answers
23k 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....
Cody Beaner's user avatar
3 votes
1 answer
8k views

Option to select none in picklist fields lightning-combobox - LWC

Using lightning-combobox i am able to display required picklist values but trying to achieve below two options. Allowing users to unselect back to none from the selected value As of now if user ...
Rajasekhar's user avatar
  • 1,551
2 votes
3 answers
641 views

Picklist Formula Sum Question

I have created the above formula to accomplish a sum of 20 number value picklists and it came out to 6,233 characters. As you all know, the compile limit is 5000. What can I do to circumvent this? IF(...
Tamim J's user avatar
  • 213
21 votes
2 answers
68k 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 ...
Kannan Ramamoorthy's user avatar
15 votes
2 answers
10k 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 ...
Robin Wijnen's user avatar
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 ...
raym0nd's user avatar
  • 886
11 votes
2 answers
11k 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?
Ishan's user avatar
  • 537
11 votes
2 answers
21k views

Retrieve globalpicklist/globalvalueset without SOQL

Is it possible to retrieve the values of a Global Picklist/GlobalValueSet using Schema class without a SOQL ?
HSG's user avatar
  • 997
9 votes
1 answer
14k 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?
Dedo's user avatar
  • 4,991
8 votes
1 answer
13k 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 ...
Alex Tennant's user avatar
  • 13.6k
7 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 (...
Willem Mulder's user avatar
7 votes
2 answers
21k 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 ...
Tinkerbell's user avatar
7 votes
3 answers
6k 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 ...
Mark Brazinski's user avatar
6 votes
4 answers
11k views

Setting Default picklist value on loading of Visualforce page

I have designed a VF page to create a new record in which I am trying to display the value of a pick-list field. I have set a default value for this pick-list field. When trying to create the record ...
ShankarSharma's user avatar
5 votes
1 answer
4k views

Picklists validFor attribute

So i am using SFs Rest API to fetch various data from SF, i am fetching all values for a picklist. Problem is that picklist has dependacies, so half of the values either belong in one category, or ...
lordZ3d's user avatar
  • 163
5 votes
1 answer
2k views

Describe/use picklist values in specific language, not the User's language

This Salesforce org includes English and Italian versions of field labels and picklist value labels. This works find within the UI, and for most purposes. However, we have a custom CSV upload page ...
Jeremy Nottingham's user avatar
4 votes
1 answer
2k views

How to populate picklist values in Lightning Componets according to the metadata definition?

In Visualforce, we didn't thought much about picklist-values (=options) on simple CRUD UIs - they where simply there using an <apex:inputField ... /> Now in Lightning I found this documentation ...
Uwe Heim's user avatar
  • 28.3k
4 votes
1 answer
15k views

How can we make ui:inputselect in lightning to dynamically get values from an object's picklist options?

I have a requirement to create a Lightning component that contains a ui:inputselect tag which will automatically fetch out its options from a custom pick list of an Object. How can this be achieved?
Shobhit Saxena's user avatar
4 votes
3 answers
8k views

Dynamically display picklist values based on Record type in vf page

I am having two record type "Record Type 1" and "Record Type 2" on case object. In this two record type we are a having a picklist field call state__c. In Record Type 1 State__c values are "A,B,D" In ...
Lavanya Sanathkumar's user avatar
2 votes
2 answers
2k views

Validation Rule on picklist under opportunities

There are 2 requirements: standard users can’t update the status of a record beyond “open won” (so that only SF Admins or auto processes update “registered” and the stages beyond registration. ...
Samreen Adil's user avatar
1 vote
3 answers
3k views

Validation using two Picklist Fields in 2 objects

I'm trying to create a validation rule formula in Salesforce, that uses two picklist fields which have the same values : p1, p2, p3. One of the picklists is on the account object and the other one on ...
PavanFoxPro's user avatar
  • 1,161
0 votes
1 answer
925 views

How check with SOQL if a picklist value is available or not for a specified record type

How check if a picklist value is available or not for a specified record type ( through SOQL)? Thanks in advance
Accursio Maniscalco's user avatar
0 votes
2 answers
97 views

custom setting not displying correct picklist values based on the condtion

i have a custom setting called product and under that i created two fields called and other is string field BD__c. i want to display picklist value based on string matching record. my custom setting ...
Rajni Bhagat's user avatar
0 votes
1 answer
874 views

How can i call a method from apex:outputField (picklist) in visualforce page on inlineedit

I have a picklist type outputfield on my visualforce page, i want when i select any value from this field some field will hide as per selected value. <apex:outputField value="{!oFormobject....
kumar gaurav's user avatar
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 ...
sagacious's user avatar
  • 139
13 votes
2 answers
4k 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....
Santanu Halder's user avatar
13 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 ...
cropredy's user avatar
  • 69.9k
10 votes
1 answer
10k 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 ...
Anup's user avatar
  • 3,790
8 votes
1 answer
4k 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 ...
Phil W's user avatar
  • 34.1k
7 votes
2 answers
14k views

Get Picklist Values based on Record Type

Am designing a JQuery AutoComplete search box in visualforce page and getting the data source from controller class from two picklist fields(Controlling and dependent). The autocomplete search box ...
mohammed azarudeen's user avatar
7 votes
4 answers
11k 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?
Charan Vuyyuru's user avatar
5 votes
3 answers
12k views

Salesforce - Mass Update Picklist Values

I would like to mass update picklist values in a custom object from picklist values in a standard object. In the absence of universal picklists, i am having to manage a few picklists in different ...
Tony H.'s user avatar
  • 206
4 votes
2 answers
12k views

How to update picklist using REST API

Would anyone have an example on how to update a picklist? I have a System Custom Field that I want to append add new items to as it comes up. The details of the field are the following: Field Label:...
Kris's user avatar
  • 295
4 votes
1 answer
13k views

Error: "Picklist value in picklist not found" while deploying using ANT

on my account object, I created a picklist field - testPicklist1__c. The picklist field has various values in it. One picklist value is "abc t" & its API name is "abc". I retrieved the Account ...
Tushar Arora's user avatar
4 votes
1 answer
4k views

How to Populate values to textboxes dynamically on Picklist Selection Change in Standard page layout

Is it possible to populate values in textboxes(fields of object) dynamically on Pick list selection change in Standard page layout's edit screen. Something like that if Picklist's value = "AB" then ...
Saam's user avatar
  • 75
4 votes
1 answer
1k views

Is there a good way to "untranslate" picklists in Apex?

The project I am working on supports many languages and Case record types. There is also a large amount of dependency between the Case record type and the Case type field (but it isn't one-to-one and ...
Brian Kessler's user avatar
3 votes
1 answer
3k views

SOQL exclude records with blank values on Multi-select picklist fields

I have field Application_type__c on lead object which is multiselect picklist. I want to exclude records where picklist value is No application' or 'Global Markets or Blank. My query is Select Id, ...
C0DEPirate's user avatar
  • 1,599
2 votes
1 answer
2k views

Creating a VF page dependent picklist error?

I am creating a VF page, on that we need to have 13 picklist fields and 13 dependent picklist fiields. We have created 10 picklist fields and 10 dependent picklist field. For creating 11th dependent ...
Lavanya Sanathkumar's user avatar
2 votes
0 answers
749 views

Rendered not working translated picklist value radio buttons

Im trying to translate visualforce page. I have used custom labels to built the page. the page is translated good. For picklist values I used the below code, the picklist values are also translated ...
sfdcFanBoy's user avatar
  • 4,045
2 votes
3 answers
975 views

How can I convert formula to APEX trigger?

I have already exceeded my 5000 compilation code, now I want to create trigger for following formula from custom object. Formula 1 (Custom Field = Package Fee) IF(ISPICKVAL(Package_Option__c,"One ...
Ali Abbas's user avatar
2 votes
1 answer
670 views

State and Country/Territory picklist enabled

Why is apex Trigger unable to get value from Country/BillingCountry field in a BEFORE INSERT/UPDATE trigger when State and Country/Territory picklist enabled and data created from salesforce UI in ...
Priyankur Choudhury's user avatar
2 votes
1 answer
64 views

2GP Patching Fails Due to Missing SalesProcess Value Even Though Same Code Packages Fine

We've been trying to patch with 2GP for a few months now but we're constantly hitting errors even when the only change is a comment in an apex class. Many errors were around reports so to try to get ...
Shane Bird's user avatar
1 vote
2 answers
6k views

Screen Flow Picklist from Lightning Component

I would like to display a Picklist or Radio Button component inside a Visual Flow Screen with choices given by a List of values. I have to pass these values to the Flow from within a Lightning ...
ARWarrior's user avatar
1 vote
1 answer
6k views

How update record picklist field from a variable in a flow?

I'm trying to found a solution for this one. I've a flow in place that creates or updates a record based on some criteria. On record creation or update, I'm assigning a value to a picklist field. ...
poypoy's user avatar
  • 41