-
StackOverflow 文件
-
netsuite 教程
-
RestLet - 檢索資料(基本)
-
檢索客戶名稱
/**
* requestdata - the data packet expected to be passed in by external system
* JSON - data format exchange
* stringify() convert javascript object into a string with JSON.stringify()
* nlobjError - add in catch block to log exceptions
*/
function GetCustomerData(requestdata)
{
var jsonString = JSON.stringify(requestdata);
nlapiLogExecution('DEBUG', 'JSON', jsonString);
try
{
var customer = requestdata.customer;
nlapiLogExecution('DEBUG', 'customer', customer);
}
catch (err)
{
var errMessage = err;
if(err instanceof nlobjError)
{
errMessage = errMessage + ' ' + err.getDetails() + ' ' + errMessage;
}
nlapiLogExecution('DEBUG', 'Error', errMessage);
}
}