Try ERPNext Buy Support Partners Foundation Foundation Members

How to change the default value for filters (List-views)

Hi everyone,

I just had a problem with the default value for filters in list-view:
Currently, if open the customer list:

It will tell me “No customer found”, then I if I delete the “All territories” in the filter, I can get every customer in the List-view.

Would like to have a hint on how to set the default value “” for the territories filter.

Thank you in advance!

Navigate to Customize form -->Customer Doctype
go to territory field and make sure that in permissions section on the right side “Remember last selected value” is not ticked. Not sure if it’s going to solve your problem because i don’t know if you choose another filter from territory, if it will show the last selected value that you chose, if that’s the case then should be solved.

Hello, thank you for your reply.

I checked it is not ticked. And I also tried to tick it and then put an empty value in the filter for it to be saved, but didn’t work either.

This is the only case i know till now where the filter can remember the value , did you try to clear cache ?
by clicking on your user and reload? or from your browser Ctrl shift R (Reload page, overriding cache)
or try to clear your browser history , just saying it might not be the issue though, just to see if it might solve it.
or also Did you check if there is any default values in the standard filter search for field territory ?

How do you check the top filter, I felt it is in somewhere from a python scripts.

I can check the bottom filter which the tick “remeber last selected value” can affect with.

It’s in /apps/erpnext/erpnext/selling/doctype/customer/customer_list.js file:
which is below:

I felt the top filter is somehow related to a report-view that I have worked for a custom report. But I couldn’t found it.

Go to Selling Settings . There you will find default customer group and default territory .
Rewrite them according to your need and save it .
Then Go to customer page and reload it .

1 Like

Thank you for your reply!

I couldnt make it blank. The All Customer Groups or All Territories will not work if it is parent node.