Here in this docs page, it shows fields having Link will have an option filter on them, through which we can have custom filters on Link types.
https://docs.erpnext.com/docs/user/manual/en/creating-custom-link-field
But I was not able to find that. Is there anyway to put these filters from the UI rather than frm.set_query() in js files?