Fetch employee branch in field for current logged user

i need way to set field name called : branch automatically when current user apply form .
the data will be fetch from employee branch .

In Branch field go to Fetch From and add Employee link field name + name of field you want from Employee doctype
like this… employee.branch

this not working

replace it with employee.branch
small letter same ass field name
and should use same name of linked field with Employee doctyp

it’s not working ,
i need to get current user branch

any help please ?

@Ahmad_Abu_Nahel
The field type should be a ‘Link’ field and not Data field. Try changing it and see if it works. Kindly find the following link for references:
https://erpnext.com/docs/user/manual/en/customize-erpnext/articles/field-types.html
https://erpnext.com/docs/user/manual/en/customize-erpnext/articles/creating-custom-link-field

Hope this helps.

Regards,
Reema

i need fetch it automatically depends on user branch

@Ahmad_Abu_Nahel
Yes, you want the branch to be fetched automatically when you type an employee name, is that correct? If yes, then you need to change the field type to link field. You can check any other DocType in your system where once you put data then some fields get automatically fetched (which is mostly read only).

i need fetch branch for currently user logged actually the user which used form

any help please ?

@Ahmad_Abu_Nahel
Can you send the screenshot of the doctype where you want the branch fetched along with what you have currently added (custom field)?

Regards,
Reema

fetch this branch from employee table which is currently logged user and he is employee
and put it in this doctype

i need help plz

@Ahmad_Abu_Nahel
In the second image where you want to fetch the branch put Branch in ‘Options’ and field type link. It should work.

Regards,
Reema