【问题标题】:Get all the records of a particular record type from Netsuite using RESTlet使用 RESTlet 从 Netsuite 获取特定记录类型的所有记录
【发布时间】: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
}

提前致谢

【问题讨论】:

    标签: rest netsuite


    【解决方案1】:

    试试all_IDs[0].getRecordType(),而不是all_IDs[0].recordtypeall_IDs 中的对象是 nlobjSearchResult 实例,因此您可以在帮助中查找该对象类型以获取有关其 API 的更多详细信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-15
      • 1970-01-01
      • 1970-01-01
      • 2015-04-08
      • 2020-11-04
      • 1970-01-01
      相关资源
      最近更新 更多