1

The situation is as follows: I have a picklist on Leads derived from a global value set.

However, I don't want to show all value from the global value set.

Is it possible to achieve this without creating a record type for Leads?

5
  • What is the business reason behind trying to avoid creation of record types?
    – arut
    Commented Dec 2, 2020 at 11:41
  • Basically because the scenario I'm describing would be the only reason to create record types. If I don't have to I want to keep it simple Commented Dec 2, 2020 at 11:44
  • So, you want to use single global value set across different objects, but display only few picklist entries from the value set (depending on the object)?
    – arut
    Commented Dec 2, 2020 at 11:53
  • Yes, that's it exactly Commented Dec 2, 2020 at 12:48
  • 1
    you're going to need either a VF page or LWC component that replaces the standard Edit page where this field is shown
    – cropredy
    Commented Dec 2, 2020 at 16:15

1 Answer 1

0

Developing a custom component should be best possible solution for your requirement, but since you are trying to avoid record types, I'm assuming that you wouldn't prefer writing custom code.

Restricting the display of a subset of global value set entries at object level isn't possible AFAIK, but dependent picklists or (field dependencies) can be used as a dirty workaround (if you have a valid business case to avoid creation of record types). For the record, I really don't like this approach since field dependencies were not really meant for this, but the approach will work.

  • Create a custom field of checkbox type and default value as checked. If required, mark it's FLS as read-only for all profiles and also, as read-only in the page layouts.
  • Create a custom picklist field using the global value set as its entries.
  • Click Field Dependencies in the Fields & Relationships page and create a new field dependency with controlling field as the checkbox field and dependent field as the picklist field. Include only the picklist entries you need and save the changes (or selection).

In the sample screenshot shown below, you can see that I have a controlling checkbox field (named as CtrlPicklist) and dependent picklist field (named as Macaron Flavor that uses a global value set). Since, the default value of the controlling field was marked as checked, only the entries selected (shown in the screenshot below) will be displayed in the picklist field when a record is created or updated.

enter image description here

One major downside of this approach is that the controlling field needs to always be included in the page layout. Otherwise, the picklist field will be disabled. This isn't a good design IMO.

Also, watch out for any picklist limitations that could affect the design in long run.

2
  • Ok, it sounds like the creation of a record type would simply be the easiest solution. Correct? Commented Dec 3, 2020 at 5:58
  • Yes, and the record types can be expanded for other requirements in the long run (i.e., for other business use cases as per salesforce recommendations).
    – arut
    Commented Dec 3, 2020 at 8:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .