0

I'm trying to populate the picklist values of a field in my custom object with the records of another custom object called "Warehouse". I was able to do this using a controller and adding it to a VF page, but I don't want to recreate the whole page for just one field. Is there any other way to do this? Or am I missing a piece? Any suggestions are appreciated.

1
  • Can you supply some code examples that you have already tried? Anyone here will be happy to help you fix any code that you have tried, but we aren't typically going to implement solutions for you without any prior effort. – Ronnie Jul 8 '18 at 3:33
2

It's not possible to dynamically generate picklist entries without writing code, although you don't have to go full Visualforce: you can embed a tiny Visualforce page in your standard page layout that renders only the content of that one field, while retaining the standard functionality for the rest of the UI and reducing the amount of code you have to write.

However, doing so does create a slightly disjointed UI, particularly with how Save works.

Another option might be to simply make the field a lookup to Warehouse, and apply any lookup filters that might be necessary. Then you get to utilize the native Lookup search window and any customizations you want to apply there.

2
  • What kind of code would I need to do to dynamically generate the picklist? – ad_rey Jul 3 '18 at 16:45
  • I thought from your question that you had already implemented this in Visualforce. That's all I meant. – David Reed Jul 3 '18 at 17:35

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.