You need to sign in to do that
Don't have an account?
Judhajit Mandal
Hi,
I am a Salesforce newbie, and I want to auto populate a picklist in which I want the picklist values to come from a pre-created Table. Suggest if that can be done! And how.
Please explain in detail.
Thank You.
Auto populate Picklist Values
Hi,
I am a Salesforce newbie, and I want to auto populate a picklist in which I want the picklist values to come from a pre-created Table. Suggest if that can be done! And how.
Please explain in detail.
Thank You.
Can you explain the requirement? As I understand, you have a picklist field on some object for which you want to show the picklist values from a table defined in some other object.
AR
It is kindof the way u understood it... I was wondering if at all it can be populated from a table in another object, and the same would reflect any changes made to the table. That is, if we insert or delete records or entries from the table, i want that the picklist values get changed accordingly (Maybe we can include a refresh button or something on the page where the picklist is to be populated)
Thanks!
I guess we do not have any direct way to handle this requirement in Salesforce. But if we see it with a different perspective then we do have a solution.
We can create a lookup field that relates to a custom object which can maintain these dynamically changing values. So it works like this -
1. Suppose on object A you have created this lookup field that relates to object B. Object B is a simple custom object that stores the LOVs and in general is not available to the end user. Only Admins can maintain (add, update or delete) LOVs.
2. When you create a new record on object A, a trigger can default this lookup field to some random value present in object B. (But make sure that this random value always exist in object B, else the trigger will error out.)
3. As and when the application Admin makes any changes in the LOVs present in object B, the changes will always be available in the lookup field present on object A.
I hope this provides you a way to handle this requirement.
AR
- Do remember to like the reply (and/or mark it best answer) if you find it useful.
Can u plz look at this link and tell me if this can be helpful in any way?
http://www.salesforcefast.com/2011/06/get-picklist-values.html
Because I'm not quite savvy with where and how to use this mentioned code structure!
- Dynamic LOVs
- Auto Population
What's with not using Lookup. I find it suitable to handle similar needs for having Dynamic LOVs.
May be I do not have your complete requirement so as to visualize and suggest on your need.