Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Please note that on Saturday, April 18, 2026, at 8:00 PM Pacific Time, our Case Management System will undergo a scheduled maintenance for approximately 15 minutes. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
Calling one function from within another
I would like to display results of the second function from within the first one: (see line with stars***)
function list1(request, response) { var fileObj = nlapiLoadFile(275); var all = fileObj.getValue(); var Filters = []; Filters[0] = new nlobjSearchFilter('entitystatus',null,'is',"13"); //supply the stage, 13 = Cust. Filters[1] = new nlobjSearchFilter('firstorderdate',null,'isnotempty'); var Columns = []; Columns[0] = new nlobjSearchColumn('entityid'); Columns[1] = new nlobjSearchColumn('companyname'); Columns[2] = new nlobjSearchColumn('salesrep'); var SearchResults = new Array(); SearchResults = nlapiSearchRecord('customer',null,Filters,Columns); style = "<head><style type='text/css'>h1 {text-align:center}p.date {text-align:right}table.main {background-color:lightgrey;color:brown;font-size:14px;}{</style></head>"; response.write(all+style+"</br></br><table border=1 class='main' ><tr><td>No.</td><td>Cust. ID: </td><td width=200>Company Name:</td><td>Sales Rep</td></p></tr>"); Rows = []; //array to hold the Rows for (i=0;i<SearchResults.length;i++) { Rows[0] = SearchResults[i].getValue('entityid'); Rows[1] = SearchResults[i].getValue('companyname'); Rows[2] = SearchResults[i].getText('salesrep'); response.write("<tr><td>" + i + "</td><td>"+Rows[0]+"</td><td width=200>"+Rows[1]+"</td><td>"+Rows[2]+"</td></tr>"); *** response.write(januaray()); ????????????? 0