Link to doctypes in erp

I created a custom doctype department with fields “code” and “description”. in material request I added link field to this doctype.if I click on link field I need to display these fields along with handle it?

Set this in the Department doctype view setting:

Utilize the view setting in Frappe and set code and description field names in the search field with a comma separator, for example, ‘my_code, my_description’.

This should display the fields along with the ID when you click on the link field in the Material Request.

ok.Thank you.