netsuite - Work with sublist on record that isn't listed in record browser -


i trying work list of transactions on customer record.

when run record.getsublists(); sublist shows id of finhist

however, can not work sublist calling record.getsublist('finhist'); i'm assuming because sublist not listed in netsuite record browser customer records.

in past question there workaround using search module. can't seem build search ascertain info want, real question if there way outside of search module work sublists aren't listed in record browser.

if there isn't, looking transactions of given type customer. sales orders or invoices, etc.

you retrieve information using transaction search rather customer search.

// 1.0 function transactionsforcustomerbytype(customerid, txtype) {     var filters = [         ["mainline", "is", "t"], "and",         ["type", "anyof", txtype], "and",         ["entity", "anyof", customerid]     ];      var columns = [ /* search columns */ ];      return nlapisearchrecord("transaction", null, filters, columns) || []; }  var invoices = transactionsforcustomerbytype(1234, "invoice");  // 2.0 // n/search imported `s` function transactionsforcustomerbytype(customerid, txtype) {     var filters = [         ["mainline", "is", "t"], "and",         ["type", "anyof", txtype], "and",         ["entity", "anyof", customerid]     ];      var columns = [ /* search columns */ ];       var search = s.create({         "type": s.type.transaction,         "filters": filters,         "columns": columns     });      return search.run().getrange({"start": 0, "end": 1000}) || []; }  var invoices = transactionsforcustomerbytype(1234, s.type.invoice); 

if sublist or record not listed in record browser, not scriptable - @ least not via officially supported method.


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -