+ Start a Discussion
Praveen Kumar JhaPraveen Kumar Jha 

Display employee records

I have one requirement like this:- 
  • Create a visualforce page  and show a list of all employee records.
  • On clicking a record it should show the detail page of the employee in the same page below the list.
  • Employee Name should be a link. On clicking on the link, a new VF page containing a form should open and should display the employee data. All the fields should be editable. Use should be able to save the employee.
  • The form should have a back button to navigate back to the employee list page.
Best Answer chosen by Praveen Kumar Jha
Ankit AroraAnkit Arora
1) You can simply create a VFP (along with class) which will fetch all records of employee and show it.
2) While showing the list of employees you can make the name as link and on click of it you can reRender the page. Create another section below the table and reRender it with the details of employees.
3) Covered in 2, and making fields editable is not a big deal as you are working on custom page.
4) Again reRender can be used.

All Answers

Ankit AroraAnkit Arora
1) You can simply create a VFP (along with class) which will fetch all records of employee and show it.
2) While showing the list of employees you can make the name as link and on click of it you can reRender the page. Create another section below the table and reRender it with the details of employees.
3) Covered in 2, and making fields editable is not a big deal as you are working on custom page.
4) Again reRender can be used.
This was selected as the best answer
Praveen Kumar JhaPraveen Kumar Jha
@Ankit:- i am new in salesforce. Can you please send me the sample code