I want to clear the list view filter ,because it saves the previous filter every time i logged in to new user login.i don’t want to see the previously selected filter
That for, you have to write a listview client script for that doctype.
Please check the reference: Why the filter is already applied - #2 by NCP
If the reference code doesn’t work then apply the below client script.
frappe.listview_settings['Your DocType'] = {
onload: function(listview) {
setTimeout(() => {
$('.filter-x-button').click();
}, 50);
}
};
Please set your doctype name in the client script.
2 Likes
@neha, Did that code solve your problem? i want to know because i want to apply for all doctype.
Its runs every time we refresh the doctype… Is there is any way to run once when we logout ?