Any help would be appreciated!
I would like to pass the Results to a javascript function, having some difficulties with my syntax... I think when I assign the array to 'y' it coverts it to a string, any way to pass it as an array.
allCustomersRows = []; //array to hold the Rows data for (i = 0; i < allCustomers_Search.length; i++) { allCustomersRows[i] = []; allCustomersRows[i][0] = allCustomers_Search[i].getValue('entityid'); allCustomersRows[i][1] = allCustomers_Search[i].getValue('companyname'); allCustomersRows[i][2] = allCustomers_Search[i].getValue('custentityinfo_pm'); allCustomersRows[i][3] = allCustomers_Search[i].getValue('custentityinfo_icd'); allCustomersRows[i][4] = allCustomers_Search[i].getValue('custentity6'); allCustomersRows[i][5] = allCustomers_Search[i].getValue('firstsaledate'); allCustomersRows[i][6] = allCustomers_Search[i].getValue('custentity_lastsaledate'); allCustomersRows[i][7] = allCustomers_Search[i].getText('salesrep'); allCustomersRows[i][8] = allCustomers_Search[i].getValue('internalid'); allCustomersRows[i][9] = allCustomers_Search[i].getText('parent'); if (allCustomersRows[i][1] == allCustomersRows[i][9].substring(6)) { allCustomersRows[i][9] = ""; } } } else{ response.write("<tr><td>Sorry no available customers to display</td></tr>"); } //PROBLEM HERE *** response.write("<script type='text/javascript'>" + 'var y="' + allCustomersRows + '";' + "alert(y); " + displayAllCustomers + "displayAllCustomers(y)</script>"); My Goal is to process the results in the following function: function displayAllCustomers(data){ for (i = 0; i < data.length; i++) { var index = i + 1; document.write("<tr><td>" + index + "</td><td><a href='https://system.netsuite.com/app/common/entity/custjob.nl?id=" + data[i][7] + "'>" + data[i][0] + "</td><td width=200>" + data[i][1] + "</td><td>" + data[i][2] + "</td><td>" + data[i][3] + "</td><td>" + data[i][4] + "</td><td>" + data[i][5] + "</td><td>" + data[i][6] + "</td>" + "<td>" + data[i][7] + "</td><td>" + data[i][8] + "</td><td>" + data[i][9] + "</td></tr>"); } } Thanks!