Hi, all. I apologize for posting a very newbie que...
# suitescript
j
Hi, all. I apologize for posting a very newbie question in a very advanced channel. I'm just getting started learning SuiteScript, mostly, at the moment, so that I can use Restlets to pull data from NetSuite and occasionally post data. But my current requirement is to take data from a fulfillment partner and use it to update a dozen or so fields for a batch of shipper/fulfillment records. For example, adding tracking numbers and shipping weight to the fulfillment record. Am I headed in the right direction here? Can I use RESTlets to accomplish that? In the early documentation, I only see mentions for PUT. I don't see any mention of PATCH, which is what I would need. I am new to this, so I might be confusing my terminology. Am I headed in the right direction? Can I update a few fields on an existing record this way?
b
restlets are not very flexible
you have access to GET, POST, PUT, and DELETE
ive only seen restlets used with a service built or designed for use with NetSuite
j
Is there a different avenue I should pursue then? My goal is to automate a dozen or so fields on a select group of fulfillment records. I'm pretty new to the options available, but this sounds like it is not the one I want.
b
the methods you use only really matters if you are trying to make your service follow restful design principles
you can use POST to do whatever you want
j
Ah, I was thinking that might be my backup plan. Perhaps I post my data into a custom record and have a workflow that uses the data in the custom record to update the actual fulfillment record?
b
thats a technique you can use if you are working with a lot of data
usually used in combination with a scheduled script or map reduce script
j
100-200 fulfillment records per day probably
b
its not the number per day that really matters
j
I'm only a few months into NetSuite now, so i'm definitely still trying to figure out my options.
b
its the number of fulfillments per request
j
Ah, I see. I could probably make individual requests for each one. I've been debating the 2 approaches.
b
individual requests works best
its unlikely that you will hit governance limits from updating one fulfillment
j
So then I POST my data for each fulfillment into a customer record one at a time and then have something on the NetSuite side to update the fields of the actual fulfillment record from what's on the custom record?
b
you can update the fulfillment directly from the data in the POST
j
Sorry, I don't understand how to do that. I thought I post would create a new record? (Feel free to point me to documentation. I don't want to take up a bunch of your time with very basic questions. I appreciate all your help.)
b
POST has no real meaning
RESTlets are not RESTful in the sense that different verbs do different things
j
I see...that's unexpected! Can I use the document number in a POST to match up to the correct document and then write those fields into it with the POST?
b
yes
j
Excellent! I had no idea. I'm from a SQL background. I'm used to my commands being awful literal and limited.