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
21
votes
2answers
54k 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 ...
11
votes
2answers
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? ...
38
votes
3answers
7k 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 ...
1
vote
2answers
707 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 ...
14
votes
5answers
4k 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 ...
2
votes
3answers
413 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(...
4
votes
1answer
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?
16
votes
2answers
31k 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 ...
13
votes
2answers
6k 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 ...
13
votes
3answers
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 ...
7
votes
2answers
17k 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 ...
8
votes
2answers
10k views

Retrive globalpicklist/globalvalueset without SOQL

Is it possible to retrieve the values of a Global Picklist/GlobalValueSet using Schema class without a SOQL ?
7
votes
1answer
6k 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?
5
votes
1answer
2k 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 (...
5
votes
1answer
1k 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 ...
2
votes
1answer
136 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> ...
9
votes
2answers
9k 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?
7
votes
1answer
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 ...
6
votes
4answers
10k 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 ...
6
votes
4answers
11k 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....
5
votes
3answers
2k 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 ...
5
votes
1answer
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 ...
4
votes
3answers
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 ...
2
votes
2answers
1k 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. ...
1
vote
3answers
2k 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 ...
0
votes
1answer
71 views

Text Field Not Formatted in Currency When Selecting Currency Symbol from Dropdown List

I've been repeatedly modifying a Salesforce LWC page which aims to format a text field into a currency format (with corresponding currency symbols, commas, and decimals). Displayed currency symbol ...
0
votes
1answer
719 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....
0
votes
2answers
83 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 ...
0
votes
1answer
1k views

Dependent Picklist Configuration Not Deploying

I have created a 3 level dependent picklist chain: Reason 1 Reason 2 Reason 3 Where 1 determines 2, and 2 determines 3. The problem is, I have deployed this from our Dev org to our Test org, which ...
9
votes
1answer
8k 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 ...
3
votes
2answers
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 ...
1
vote
2answers
1k 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 ...
14
votes
2answers
9k 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 ...
7
votes
2answers
7k 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?
4
votes
1answer
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 ...
4
votes
1answer
10k 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 ...
4
votes
1answer
789 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 ...
3
votes
2answers
7k 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 ...
3
votes
1answer
2k 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, ...
2
votes
0answers
624 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 ...
2
votes
1answer
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 ...
1
vote
1answer
5k views

How to make dependent picklists work in lightning component in aura iteration?

I am working on last few days on how to get the dependent picklist work when it is more than one record inside aura iteration. I apologize if this seems like I am asking for solution, but I am not and ...
1
vote
1answer
571 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 ...
1
vote
1answer
10k views

Apex check for blank picklist value

I am writing a trigger that has an IF clause based off of a field. However, I cannot get it to recognize if that picklist is blank. I have tried: field.isblank() string.isblank(field) field == '' ...
1
vote
1answer
70 views

multiPicklist query

I have a few global picklists which I using for multi picklists. I'm trying to retrieve a data via SOQL but something goes wrong - not all the rows are back or sometimes none of them. It depends if I ...
1
vote
1answer
2k 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 ...
1
vote
1answer
2k views

SelectOption questions for a multiselect picklist

I've got the following code working which will create SelectOptions for both columns of a multivalue picklist (available column (left) and a selected column (right)). The left row is created by a SOQL ...
1
vote
1answer
1k views

Visualforce Picklist from Javascript Query

Can I draw a Picklist in a Visualforce with a Javascript query? With de ajax connection.js in visualforce, I'm trying to retrieve a list of some values, Ex: var qr = sforce.connection.query(“SELECT ...
0
votes
2answers
126 views

Record type not found in controller until after save

I am using record types to filter a picklist. The issue I'm running into is my visualforce page will not display ON NEW the record type no matter what I do. I'm using the syntax {!myObject....
0
votes
1answer
987 views

can we convert a multi-select picklist value into single select picklist value? If so what will be the loss of data

Requirement:- we need to convert a multi-select picklist value into single select picklist value.if We change the Multiselect to Single .how we can avoid data loss