Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs
3 votes

Validation rule for Multiselect picklist

There's no need for a validation rule. Just make the multiselect picklist a dependent picklist on "abc", select the desired values for the dependency, and make the field required on the page ...
sfdcfox's user avatar
  • 493k
2 votes
Accepted

How to select the default picklist value for lightning-combobox in lwc?

The default value, if any, will be in data.defaultValue. To avoid possible race conditions, store the value in a property: if(data) { if(!this.comboboxValue) { this.comboboxValue = data....
sfdcfox's user avatar
  • 493k
2 votes

Create a validation rule that checks that Warranty picklist field is not blank, when status = Containment Acheived / Root Cause / Corrective Action

Generally speaking, you must perform separate checks for each item you want test for. There are a few tricks that we can use though. CONTAINS() can be used to check if a single value matches any ...
Derek F's user avatar
  • 62k
2 votes

Create a validation rule that checks that Warranty picklist field is not blank, when status = Containment Acheived / Root Cause / Corrective Action

You must test each status separately, and OR these together. If the status is one of the required values AND the warranty is blank there is a validation failure. I have used || for OR and && ...
Phil W's user avatar
  • 36.6k
2 votes

How can I mass activate inactive picklist values?

We need to go to Classic, allow popup on the page _ui/common/config/field/StandardFieldAttributes/d?id=Family&type=Product2 and execute script in Javascript console for (a of Array.from(document....
Patlatus's user avatar
  • 17k
2 votes
Accepted

Opportunity stage closed with 2 depending picklists - only one shows up

It can be done in two ways: If Detail Close Reason will not change based on the 'Close Reason', then Add another Dependency for field Stage and Detail Close Reason and setup Detail Close Reason ...
Vijay Ganesh's user avatar
2 votes
Accepted

Using Tooling API Lookup To Update Picklist Choices

I've copied your code into my scratch org and executed it from Execute Anonymous: UpdateBankerPicklistValues schedulable = new UpdateBankerPicklistValues(); schedulable.execute(null); As sfdcfox ...
Felix van Hove's user avatar
1 vote

Picklist field returning values instead of API Names in SOQL after Summer '24 release in sandbox

Thanks for raising this - will take a look into it.
Jeremy Westerman's user avatar
1 vote
Accepted

How to sort newly created Picklist Choices?

The UI uses the sorted property to override the input order and alphabetize the values according to their label. This is a UI-only feature. If you want to do this in code, you'll have to sort the ...
sfdcfox's user avatar
  • 493k
1 vote

Checking if picklist value is blank to start a flow

PRIORVALUE should wrap around !$Record.HSFE_Lead_Origin__c: PRIORVALUE(!$Record.HSFE_Lead_Origin__c) You can then use this inside of an ISPICKVAL statement: ISPICKVAL(PRIORVALUE(!$Record....
Morgan Marchese's user avatar
1 vote
Accepted

Is it possible to know that a picklist field is sorted alphabetically?

That attribute isn't stored--it's a one-time operation. The only way to know if the list is currently sorted would be to describe the picklist and check each picklist entry.
sfdcfox's user avatar
  • 493k
1 vote
Accepted

SOQL - Relationship extract json from child object and join picklist label

You can get something close to this using an Aggregate Query. Your query would be: SELECT Market__r.Name, toLabel(Role__c), COUNT(Id) FROM Person__c GROUP BY Market__r.Name, Role__c (I'm guessing what ...
fred's user avatar
  • 3,420
1 vote

Record type specific default picklist value is not populating in VF Page

I tested this, and it works as expected. Make sure you're setting the record type Id. Here's my version: public class CustomControllerClass { public account record { get; set; } public ...
sfdcfox's user avatar
  • 493k
1 vote

Formula Field Case Statement that is dependent on a picklist value

Yes, but because formulas are so limited you'd have really no other option but to duplicate the CASE() structure. ex. IF( TEXT(TYPE) = "CURRENT CUSTOMER", /* CASE() for when it is &...
Derek F's user avatar
  • 62k
1 vote

deleting inactive picklist values

It won't cause any problems. When you delete the inactive value and choose a replacement, that new value will be applied to all records.
sfdcfox's user avatar
  • 493k
1 vote

Salesforce apex how to save checkbox multiple values in database

First, make sure your picklist is a multiselect picklist. Single option picklists won't hold multiple values correctly. Second, to assign multiple values to a multiselect picklist, you must use a ...
sfdcfox's user avatar
  • 493k
1 vote
Accepted

Record types, with their corresponding reason and subreasons

Unfortunately, there is no simple way to do this via a SOQL query. Your best bet is the UI API, which you can query via Salesforce Workbench. Go to Utilities, REST Explorer and do a GET request to ...
fred's user avatar
  • 3,420
1 vote

Picklist field is disabled in LWC Datatable

As per the documentation, the options needs to be an array of label/value pairs. e.g. [{ label: 'label 1', value: 'value 1' },{ label: 'label 2', value: 'value 2' }] Your current ...
Nick C's user avatar
  • 6,710
1 vote

Why am I getting this error when I sue the solution posted for how to use a picklist field in a formula field

Because VALUE() takes a string and turns it into a number, and string + string + number makes no sense as a formula (i.e. it's a syntax error). The + operator in functions can be used for both string ...
Derek F's user avatar
  • 62k
1 vote

Error: Incorrect parameter type for TEXT. Expected Number, Date, DateTime, received Picklist

as mentioned below the formula editor box: Use formula syntax: Enclose text and picklist value API names in double quotes : ("the_text"). You can use this in your formula box. "$User....
prem22's user avatar
  • 652
1 vote
Accepted

Storing a table with multiple value data in custom metadata types

You can create a metadata relationship. Keep Role metadata as parent. And RoleChild as a child relationship metadata. Just like a parent child relationship. So when you see admin, it will display all ...
Nagendra Singh's user avatar
1 vote

PicklistValueInfo does not returns Custom object's picklist records but only returns standard object's picklist records

Or in one step... SELECT Value,Label,IsActive FROM PicklistValueInfo WHERE EntityParticle.EntityDefinition.QualifiedApiName = 'Client_Master__c' AND EntityParticle.QualifiedApiName = 'Status__c'
Ciarán's user avatar
  • 111

Only top scored, non community-wiki answers of a minimum length are eligible