Q:

SuiteScript 1.0 - nlobjSearchFilter contains invalid search criteria: Searching custom record

I'm pretty new to SuiteScript but I'm working on a script to send an email to all contacts on the Dunning Recipient list of a customer - so a custom record.
I'm receiving the following error - An nlobjSearchFilter contains invalid search criteria: customrecord_3805_dunning_recipient.custrecord_3805_dunning_recipient_cust.
var filters = new Array();
        filters[0] = new nlobjSearchFilter('company', null, 'is', customer);
        filters[1] = new nlobjSearchFilter('email', null, 'isnot', '');
        filters[2] = new nlobjSearchFilter('isinactive', null, 'is', 'F');
        filters[3] = new nlobjSearchFilter('customrecord_3805_dunning_recipient.custrecord_3805_dunning_recipient_cust', null, 'is', customer);

    var columns = new Array();
        columns[0] = new nlobjSearchColumn('company');
        columns[1] = new nlobjSearchColumn('email');
        columns[2] = new nlobjSearchColumn('internalid')

    var searchresults = nlapiSearchRecord('contact', null, filters, columns);

Is there anything I need to note when using custom records as filters? Thanks

A:

The second parameter is the joined table. The first one is the column.
Fix your last filter.

