In Visualforce, we didn't thought much about picklist-values (=options) on simple CRUD UIs - they where simply there using an
<apex:inputField ... />
I like neither of those approaches. Is there any method to get this done better?
The goal is, to populate the values as defined in the setup
- Record-Type aware
- Translation aware
- Dependency aware
A similar (but more specific) question has been asked here Picklist Values in Dynamic Lightning Components
I think in addition to record-type specific values, there are many reasons to make this dynamic, e. g. translations. It is not simple to populate a picklist with exactly the same values as user will see in the standard-UI. Assuming an complex org is already well-configured, it might be a huge piece of work to populate the picklists (reading the schema, evaluating the record-types, translations, etc). This should be done - as in Visualforce - by the platform, but how does it work?
To hardcode picklist-values is the worst option, because you will end up in maintaining them redundatly multiple times, loose configurability by admins and significantly higher implementation efforts.