2

I am trying to make a custom filter based on another module in sugarCRM 8.0.1.

I have a module Ev_Registrations that has one Ev_Event and one Contact, the tables are:

ev_registrations

ev_registrations_contacts_c

ev_registrations_ev_events_c

How do I make a dropdown for event or contact on the list page as highlighted below?

sugar selector

I've tried making a custom filter, and managed to get it showing up in the list, however, it doesn't seem to be actually filtering by the event name.

$viewdefs['EV_Registrations']['base']['filter']['basic']['filters'][] = array(
    'id' => 'filterRegistrationByEvent',
    'name' => 'LBL_FILTER_REGISTRATION_BY_EVENT',
    'filter_definition' => array(
                array(
                    'ev_registrations_ev_events_c.ev_events.name'  => '2019 Foo Bar Event',
            ),
        ),

    'editable' => false,
    'is_template' => false,
);
rescobar
  • 1,261
  • 15
  • 25
NathanBrakk
  • 787
  • 1
  • 6
  • 8
  • If remember correctly, you're not supposed to use table names, but the name of the field (type: link), that represents the relationship in the module. For custom relationships that link name is often similar to the relationship name, so make sure you get it right. The resulting filter field will probably look something like `ev_registrations_ev_events.name`. PS: make sure to check Request Headers in Webdebugger (F12) -> Network. If the filter you specified isn't in there, then there are also other issues present. – Jay Sep 26 '18 at 08:08
  • Can I confirm that you're asking how to add a filter for those two columns so that a user is able to configure it via the dropdown boxed in red in your screenshot? – Reisclef Oct 11 '18 at 10:29

0 Answers0