3

I've searched it and found a few things where people have put it as an idea to be voted for a few years ago, but I haven't seen any response from Salesforce on any I've seen, so what I want to know is can a list custom setting be used as a set of picklist values on a standard layout?

I know it can be done in visualforce but I'm talking about the standard fields on a standard page layout. I would just like to know before I consign myself to putting a load of manual picklist entries in.

  • 1
    I don't thing salesforce has provide any solution or any way to use custom setting values in picklist values. – D-Horse Jul 7 '14 at 13:28
  • I've done it with VisualForce, but not in standard layouts. But if your other option is lots of manual entry, maybe you should consider scripting it with the metadata API. – Charles Koppelman Aug 26 '14 at 20:19
  • Note - it's definitely possible using a VisualForce page dropped onto a standard layout page. – Charles Koppelman Aug 27 '14 at 15:59
1

Even if it could be done, it wouldn't be advisable and here's why.

A picklist is part of a database object while a custom setting is not. So when you store your records, you can't realistically expect to store values from a picklist that were obtained from a custom setting into fields intended to store picklist values from your object. That would not be advisable from a database design standpoint.

With that said, I fully recognize that picklists are simply strings and their values can change. That's something one can also keep a history on when it happens. But how would you propose to keep a history on changes to a picklist stored in custom settings? I know of no way to do that. You also don't have a way of managing security on a picklist stored in custom settings in the same way you do as one stored with an object. So all in all, I think this would be a poor design practice.

As a final point, if you look at custom settings at the object level in say Eclipse or in your Schema, you'll also see that they show up as a unique object, so you'd be storing picklist values from one object in another object. It might perhaps be a different story if you had a look-up relationship from one object to the other, but that's not what I hear you proposing.

All in all, I think this would not be a good practice to implement in a design.

2

Based on your question, I'm guessing you're using this so that you can control the available picklist values for multiple fields with one setting. If that's the case, you should considering voting for Universal Picklists a highly voted idea that's under consideration.

As @crmprogdev mentioned, list custom settings are typically used for different reasons and will likely never be setup for use in your situation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.