How to customize a dynamic field to update info?

I have a form which I want it to automatically pulls out data when the user selects an option. For example, when the users select the Employee ID, the Employee Name field will automatically reflects the name of the employee. Can this be done through ERPNext?

cur_frm.add_fetch('employee', 'employee_name', 'employee_name')`

for more detail, please read…