首页 > 解决方案 > NetSuite REST 服务 - 公司地址

问题描述

我正在开发外部应用程序以使用 NetSuite 的 REST 服务从 NetSuite 中提取数据。无法找到提取公司地址的方法。请回复,如果你的方式。

标签: restnetsuite

解决方案


公司地址将出现在 NetSuite 的公司信息部分(即导航至设置 --> 公司 --> 公司信息)。如果您使用 NetSuite Restlet 脚本来拉取公司地址,则需要使用“N/config”模块。

于是使用 N/config 模块,加载公司信息记录:

var companyInfo = config.load({
    type: config.Type.COMPANY_INFORMATION
}); 

// then get value of Company address

var companyAddress = companyInfo.getValue({
    fieldId: 'mainaddress_text'
});

return companyAddress;       // return the address in Restlet script

希望这可以帮助。


推荐阅读