【发布时间】:2016-01-15 09:38:31
【问题描述】:
我有一个客户记录。现在我正在尝试获取所有客户记录。我在以下链接中访问了类似的帖子。
i) Net Suite getting all records
ii) How to read more than 1000 records return from netsuite search results in c#?
我根据上述链接进行了计算。但我无法得到结果。 我尝试了以下代码。 帮助我改进或建议替代代码。
function getAllIDs() {
//it returns all customer id and record type sample values: 6 , customer
return nlapiSearchRecord('customer', null, null, null);
}
function getAllRecord() {
var all_IDs = getAllIDs();
var len=all_IDs.length;
var result =new Array();
//so far working fine [id & recordtype]
/*
******* This is i want all customer details by giving id, recordtype ******
for(var i=0;i<len;i++) {
result[i]=nlapiLoadRecord(all_IDs[i].recordtype,all_IDs[i].id)
}
return result; //all customer details
********* end ********
*/
[return all_IDs;] //working fine
[return all_IDs[0];] //working fine o/p:{"id":"3","recordtype":"customer"}
[return all_IDs[0].id]; //working fine o/p: "3"
[return all_IDs[0].recordtype;] //not working
}
提前致谢
【问题讨论】: