我是一名初级程序员,我想从 netsuite 获取数据并将其显示在控制台上...我不明白如何使用 node js 从 netsuite 获取它,请帮我解决这个问题或至少推荐一个教程这样做?
There's a sample at Netsuite OAuth Not Working of how to connect from node.
And here is a super simple RESTlet:
/**
*@NApiVersion 2.x
*@NScriptType Restlet
*/
define(['N/search', 'N/error'], function(search, error){
function getSearch(){
var itemSearches = search.create({
type: 'search',
filters:[
'type', 'is', 'item'
],
columns :[
'title'
]});
var availSearches = [];
return itemSearches.run().each(function(srch){
availSearches.push({
id : srch.id,
type: srch.recordType,
title : srch.getValue('title')
});
});
}
return {
get:getSearch
};
});
In order to call the RESTlet from Node your Node needs:
Made a library for this some time ago. It's not maintained but afaik it still works..
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.