I saw this question on the developer.salesforce.com forums. There are a couple of ways to answer this I would say. I'll start the non custom code way to display an edit form. first to the custom code way. Component-Library Answer:"Use the lightning:recordEditForm component to create a form that's used to add a Salesforce record or update fields in an existing record. The component displays fields with their labels and the current values, and enables you to edit their values." We could use this to just display and edit form that will allow the user to pick the records from dropdown. recordEditForm CustomFor this example I am picking the Industry Field from the Account object since it has a ton of picklist values. Component
JS Controller
Apex Controller
You can't use SelectOption because it's not aura enabled so using a basic map, you could also create a wrapper class
Here is what the basic component will look.
0 Comments
|