Hi @Joao_Carvalho,
for your first question on a filter for desk user only, I cannot reproduce this behaviour, I get all active users. Do you maybe have them disabled?
As for the second part, to fetch related data, it is probably not even required to go through a client-side script. Have a look at the Sales Invoice DocType: it has a link field to Customer and looks up the customer name automatically
This works when the link field is a DocType and you want to find an attribute of it.
If you really want to fetch something, you can do this (see https://erpnext.org/docs/user/manual/en/customize-erpnext/custom-scripts/custom-script-examples/custom-script-fetch-values-from-master)
add_fetch(link_fieldname, source_fieldname, target_fieldname)
but make sure that the DocType to be fetched from is cached, otherwise it will not work. In that case you will have to use a full db lookup, see Delivery note customization - #2 by lasalesi
Hope this helps.
