ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Load list view with selected rows



I want initial listview of a doc to be loaded with some of the rows only. So, I am having which calls method that gets data using frappe.db.sql having conditional query. This call returns proper rows. Now I want to load the listview of the doc with this result. But it is not loading.

Here is my code.

frappe.listview_settings[‘Activity Tracker’] = {
onload: function (listview) {{
callback: function( r ) {
console.log(r.message); = r.message;

Where am I going wrong?


can try through hook to restrict rows visible to user, then listview need not br customised

permission_query_conditions = {
    "{doctype}": "{}",
has_permission = {
    "{doctype}": "{}",

Permission By Field

yes… solved by this way before some days