2014-04-15 58 views
1

我不能在我的生活中從NetSuite的搜索中獲取返回的值。當我使用調試器時,我可以看到該值,但我無法訪問它。NetSuite支票搜索獲得價值

var columns = new nlobjSearchColumn('custentity_employeenumber', null, 'max'); 
var results = new nlapiSearchRecord('employee', null, filters, columns); 
var result = results[0].getValue('custentity_employeenumber'); 

每當調試器顯示結果變量爲空...我不明白它。我可以看到值在調試器...

enter image description here

我真的只需要2014103 ...還是我建立搜索錯了嗎?

回答

5

當您在搜索列上添加摘要時,還必須在檢索值時指定摘要。所以,因爲你有:

results[0].getValue('custentity_employeenumber', null, 'max'); 
+0

完美的答案:

new nlobjSearchColumn('custentity_employeenumber', null, 'max'); 

您必須檢索值! – CodeMoto