```/** * @NApiVersion 2.x */ require(['N/search...
# general
s
Copy code
/**
 * @NApiVersion 2.x
 */

require(['N/search'], function(search) {
    var myCustomRecordSearch = search.create({
        type: search.Type.CUSTOM_RECORD + '6';
        title: 'My Search Title',
        columns: ['custrecord1']
    }).run().each(function(result) {
        // Process each result
        return true;
    });
});
b
the type should be the id (script id) of your custom record
m
Actually, Roeg is right on that line. That’s what the example shows exactly. Do you need to change the 6 to the actual id of the custom record type? If you don’t have one with an id of 6, then you would get that error message.