function beforeLoadSublist(type, form) { ...
# suitescript
w
function beforeLoadSublist(type, form) { var contacts = form.addSubList('custpage_customcashsale', 'list', 'inline Editor Sublist', 'Billing'); //add fields to the sublist contacts.addField('name', 'text', 'name'); contacts.addField('department', 'text', 'department'); contacts.addField('office', 'text', 'office'); // perform a Contact record search. Set search filters and return columns for // the Contact search var contactdata = nlapiSearchRecord('cash sale', 'customsearchcustomsalesordersublist', null, [new nlobjSearchColumn('tranid'), new nlobjSearchColumn('entity'), new nlobjSearchColumn('account')]) // display the search results on the Custom Contact sublist contacts.setLineItemValues(contactdata) }