How to set a filter that cannot be modified by users in the List View?

Hi @Franklin,

We have a temporary solution like please remove the filter option for particular users and apply the listview client script.

// For Version-14

frappe.listview_settings['Your DocType'] = {
    refresh: function(listview) {
        if (frappe.session.user == "user1@test.com" || frappe.session.user == "user2@test.com") {
            $('.filter-selector').hide();
        }
    }
};

Then reload and check it.

Output:

I hope this helps.

Thank You!

4 Likes