var duplicates = search.create({type: search.Type.SALES_ORDER, columns: [{name: 'tranid'}] , filters: filters}).run().getRange({start: 0, end: 1});
if(duplicates.length == 0) return true;
//No, there is another record, warn user about this
alert('Sales Order '+ duplicates[0].getValue('tranid') +' with the PO number ' + customerpo + ' already exists.\n\n Check the order to find out if order has already been created.');
return false;
}