[英]Create invoices in bulk using NetSuite RESTLET API
Is there a way to create multiple invoices with a single POST request to the NetSuite REST API?是否可以通过对 NetSuite REST API 的单个 POST 请求创建多张发票? I'm hoping there's a way to avoid sending thousands of individual requests.我希望有一种方法可以避免发送数千个单独的请求。
My suggestion here would be to look into N/https
module in Suitescripts.我的建议是查看 Suitescripts 中的N/https
模块。
The idea here is simple.这里的想法很简单。 You will try to pass data using a UserEvent Script, the same data which now you are passing using Postman (or some testing application).您将尝试使用 UserEvent 脚本传递数据,与现在使用 Postman(或某些测试应用程序)传递的数据相同。
//Add additional code
...
var response = https.post({
url: 'https://www.testwebsite.com',
body: myPostDataObj
});
...
//Add additional code
You can use a FOR LOOP later for iterating and creating as much records as you desire.您可以稍后使用 FOR LOOP 来根据需要迭代和创建尽可能多的记录。
Hope this helped.希望这有帮助。 Let me know in case of issues below.如果出现以下问题,请告诉我。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.