Can I filter view by checkbox instead of status?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • worldmiros
    Senior Member
    • Dec 2015
    • 120

    Can I filter view by checkbox instead of status?

    I have a field in a custom entity that is a checkbox. The way the status can be filtered for primarFilterName property, is it possible to that with a checkbox?
  • yuri
    Member
    • Mar 2014
    • 8484

    #2
    SelectManager class responsible for filters. Declare select there.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • worldmiros
      Senior Member
      • Dec 2015
      • 120

      #3
      Like this?
      PHP Code:
        protected function filterBilled(&$result) {     $result['whereClause'][] = array(         'billed' => true     ); } 
      
      On the client side, would it be like?
      Code:
      this.createView('dialog','Modals.SelectRecords',{
      scope:'Call',
      primaryFilterName: true
      });
      Last edited by worldmiros; 05-13-2016, 06:36 PM.

      Comment

      • worldmiros
        Senior Member
        • Dec 2015
        • 120

        #4
        yuri I tried the code above, but no success. What could I be doing wrong?

        Comment

        • yuri
          Member
          • Mar 2014
          • 8484

          #5

          try primaryFilterName: 'billed'
          If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

          Comment

          • worldmiros
            Senior Member
            • Dec 2015
            • 120

            #6
            It works. Thanks.

            Comment

            Working...