NetSuite Suitescript搜索访问价值

Cod*_*oto 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');
Run Code Online (Sandbox Code Playgroud)

每次调试器将结果变量显示为null时......我都不明白.我可以在调试器中看到值...

在此输入图像描述

我真的只需要2014103 ...或者我是否构建了错误的搜索?

eri*_*ugh 6

当你把一个总结上一个搜索栏,您必须在检索值以及指定的摘要.所以,因为你有:

new nlobjSearchColumn('custentity_employeenumber', null, 'max');
Run Code Online (Sandbox Code Playgroud)

你必须检索与值:

results[0].getValue('custentity_employeenumber', null, 'max');
Run Code Online (Sandbox Code Playgroud)