{
id: id,
+ pref : 'HK-Account'
//reportaction: 'exportcsv',
//apptype: 'html',
//visibleranges: '0,' + reportTable.getTotalRowCount()
}
// location name for location download.
- var pref = 'HK-Account';
+ var pref = data.pref;
console.log(
JSON.stringify ({
data: ar
}));
+
+ NS.downloadgetdata(
+ 'https://system.netsuite.com/app/common/search/searchresults.csv' +
+ '?searchtype=Transaction' +
+ '&Transaction_ACCOUNT=' + id +
+ '&Transaction_DEPARTMENT=2' + // hk
+ '&sortcol=Transaction_TRANDATE_raw' +
+ '&sortdir=ASC'+
+ '&csv=Export'+
+ '&OfficeXML=F'+
+ '&pdf='+
+ '&style=NORMAL'+
+ '&report='+
+ '&grid='+
+ '&searchid=118'+
+ '&dle=F',
+
+ {
+ id: id,
+ pref: 'SG-Account'
+ //reportaction: 'exportcsv',
+ //apptype: 'html',
+ //visibleranges: '0,' + reportTable.getTotalRowCount()
+ }
+
+ );
+
+
+
}
xmlhttp.send();