Link Field custom script to show all data

frappe.ui.form.on(‘Doctype Name’, {
onload: function(frm) {
frm.fields_dict[‘your_field’].get_query = function(doc, cdt, cdn) {
return {
filters: []
};
};
}
});

This code is using an empty filter to show all data in the your_field field. This is done by setting the filters property of the get_query function to an empty array.

When the your_field field is displayed, Frappe will use the get_query function to fetch the list of available ‘your_field’. The filter that is passed to the get_query function will be used to restrict the list of projects that are returned.

Since the filter is empty, Frappe will return all data.

Hi @Galactose_NotFound,

If you haven’t checked then please check the documentation of Overriding Link Query By Custom Script.

Thank You!