OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Programming Questions Sort and filter contacts by group

This topic contains 2 replies, has 1 voice, and was last updated by  klipach 9 years, 4 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #24908

    klipach
    Participant

    In Oro 1.2 there was a Group filter and sorter in contact grid. In version 1.3 it is removed. Implementation from version 1.2 doesn’t work due to a bug. How can i add this filter/sorter?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #24909

    klipach
    Participant

    There is no answer for a long time… so i found some solution, it is not perfect but it works. You can add filter functionality by adding custom filter class. Here is an example:

    GroupFilter.php

    Register this filter in filters.yml

    don’t forget to load filters.yml in DependencyInjection/AcmeDemoExtension.php

    now you can use this filter in contact datagrid using eventListener like here https://github.com/orocrm/crm/blob/master/src/OroCRM/Bundle/CallBundle/EventListener/Datagrid/CallListener.php like

    or in datagrid.yml

    #24910

    klipach
    Participant

    Is there a better way to do such filtering?

Viewing 2 replies - 1 through 2 (of 2 total)

The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.

Back to top