+ Start a Discussion
vijay kumar kvijay kumar k 

Display information of record using lightning component

Let's take example: Lightning component page have one picklist with values of all account names.I want information about that selected value like Name,age,phone,email and address etc. in below of picklist. 
How could i write code for this. Please post your code for future reference

Naveen KNNaveen KN
Hi Vijay, 

Find the design to implement the mentioned functionality. 

1. write init method in the component to bring all the account details and store it in the map[local cache]
2. In the same init method create a picklist with all the account names and associate account record id for that account name as an aura:id for every picklist value
3. Write an on select/on change aura handler for the picklist
4. whenever the user changes the value, make a call to controller js method, get the id of that particular picklist value and get the record details from the map stored in the browser level at step 1 and display it on the ui as a form. 

Team codengine.in
vijay kumar kvijay kumar k
Thankyou for replay codengine team.

U know lightning components examples are less in all doc's ,so can u please post any similarity of this