Applying a custom filter when opening a drawer.

When viewing a Contact record, there is a subpanel called "Sites", listing Sites that the Contact is related to. I've been attempting to add an initial filter to the results of the drawer that appears when selecting the "Link Existing Record" option, to show only those Sites which are linked to the Account to which the Contact is also linked.

Following the filtering guides given here, I've managed to add a filter in .custom/Extension/modules/Sites/Ext/clients/base/filters/basic/FilterByAccountTemplate.php, which looks like this:


$viewdefs['Sites']['base']['filter']['basic']['filters'][] = array(
     'id' => 'FilterByAccountTemplate',
     'filter_definition' => array(
               <Linking Field> => array(
                    '$equals' => ''
     'editable' => true,
     'is_template' => true

And a display label in .custom/Extension/modules/Sites/Ext/Language/en_us.FilterByAccountTemplate.php, which looks like this:


$mod_strings['LBL_FILTER_BY_ACCOUNT_TEMPLATE'] = 'Account Sites';

So far, this is functional. When I post filter options to the right URL (e.g. https://<My Site>/rest/v10/Sites?<snip>&filter%5B0%5D%5B<Linking Field>%5D%5B%24equals%5D=<Account ID>), I'm getting back the right results.

But when I try to apply the filter in the GUI, no request is made; I'm simply getting all records returned, rather than filtered records. The filter displays correctly, and appears when the drawer is opened, but does not apply. My code for the front-end is in .custom/Modules/Sites/clients/base/fields/link-action/link-action.js, and looks like this:

    extendsFrom: 'LinkActionField',

    initialize: function(options) {
        this._super('initialize', [options]);

    openSelectDrawer: function() {
        if (this.isDisabled()) {
        var parentModel = this.context.get('parentModel');
     var linkModule = this.context.get('module');
        var link = this.context.get('link');
        var filterOptions = new app.utils.FilterOptions()
                'initial_filter': 'FilterByAccountTemplate',
                'initial_filter_label': 'LBL_FILTER_BY_ACCOUNT_TEMPLATE',
                'filter_populate': {
                    '<Linking Field>': parentModel.get('account_id'),
        var context = {
            module: linkModule,
            recParentModel: parentModel,
            recLink: link,
            recContext: this.context,
            recView: this.view,
            filterOptions: filterOptions
            layout: 'multi-selection-list-link',
            context: context,

What am I doing wrong here? I've tried fiddling about with it and all I seem to get back is nothing. Applying and removing the filter doesn't make the client send any requests to the server.