Announcement

Collapse
No announcement yet.

Custom default bool filter

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom default bool filter

    I have applied default bool filter in clientDefs.json like so:
    PHP Code:
    "defaultFilterData": {
        
    "bool": {
            
    "notClosed""notClosed"
        
    }
    }
    ​ 
    On page load it did the job and applied filter for fetching records from DB, but on fron-end this bool filter appears to be unchecked.
    Click image for larger version  Name:	1.jpg Views:	0 Size:	8.5 KB ID:	100446

    Click image for larger version  Name:	2.jpg Views:	0 Size:	23.8 KB ID:	100447
    I want to know what am I missing in my config? Also did I applied default bool filter the right way? Because when I tried just "bool": "notClosed" I have been getting ERROR: (500) Empty bool filter name.; GET /Task; line: 91, file: /var/www/espocrm/application/Espo/Core/Select/Bool/FilterFactory.php

  • #2
    Case closed. I was really close to the solution. Just need to set true for the filter name like so
    PHP Code:
    "defaultFilterData": {
        
    "bool": {
            
    "notClosed"true
        
    }
    }
    ​  ​ 

    Comment

    Working...
    X