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
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
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
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
2 votes
1 answer
200 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> ...
user avatar
  • 1,107
1 vote
2 answers
1k 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 ...
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 ...
user avatar
  • 3,959
2 votes
3 answers
495 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(...
user avatar
  • 213
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
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?
user avatar
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
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
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
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
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
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
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 ...
user avatar
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
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
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 ...
user avatar
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
5 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 ...
user avatar
  • 33.6k
4 votes
3 answers
7k 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 ...
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. ...
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 ...
user avatar
  • 1,141
0 votes
2 answers
96 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 ...
user avatar
0 votes
1 answer
820 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....
user avatar
0 votes
1 answer
165 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
user avatar
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
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
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
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
5 votes
1 answer
2k 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 ...
user avatar
  • 163
3 votes
2 answers
3k views

Fetching picklist values based on record type

Is there any way to fetch picklist values based on a record type. I am wondering how salesforce does it. I am fetching list of record types via ForceTK, next i want to fetch picklist values based on a ...
user avatar
2 votes
3 answers
775 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 ...
user avatar
1 vote
2 answers
4k 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 ...
user avatar
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
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
5 votes
2 answers
11k 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 ...
user avatar
4 votes
2 answers
9k 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:...
user avatar
  • 155
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 ...
user avatar
  • 75
4 votes
1 answer
12k 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 ...
user avatar
4 votes
3 answers
10k 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 ...
user avatar
  • 196
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 ...
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, ...
user avatar
  • 1,549
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 ...
user avatar
2 votes
1 answer
27 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 ...
user avatar
2 votes
0 answers
678 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 ...
user avatar
  • 3,964
2 votes
1 answer
390 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 ...
user avatar
1 vote
1 answer
942 views

Retrieving StandardValueSet with the Tooling API

I am trying to avoid using any SOAP service for such simple operations as below: The picklist of all Lead Statuses (including inactive) The picklist of Stages/Statuses attached to a Record Type The ...
user avatar