NetSuite Suite脚本 - 对象的所有列

时间:2017-08-17 05:50:44

标签: netsuite suitescript

在Furncript中是否有一个函数用于获取属于该对象的所有字段或列(即位置,帐户,事务等)。

1 个答案:

答案 0 :(得分:3)

您可以使用记录的getAllFields()函数来检索该记录的所有字段。

var fields = nlapiGetNewRecord().getAllFields()
 // loop through the returned fields
 fields.forEach(function(fieldName){
    var field = record.getField(fieldName);

    var fieldlabel =  field.getLabel();
    if(fieldlabel=='something'){
       //do something here
       return;
    }
 }

您还可以获取记录here

的可用字段列表