Hi All How do we update transactions lines in net...
# suiteql
i
Hi All How do we update transactions lines in netsuite using rest api?
m
i
can we update multiple lines custcol in 1 single rest api request?
m
Yes. Did you read the documentation page I linked to? There are examples
i
saw it thanks
can this be done thru suitescript
inside suitescript can we use rest api to update tranlines etc
im having probs with the http method patch
which is not available
m
Why would you want to use REST API inside SuiteScript?
i
performance benchmarking
im comparing the performance of record.load -> update line items > save VS rest api update/patch
n
Yes you can write your own RESTlet to do pretty much anything. One of your challenges will be making sure you update the correct lines. You might want to introduce something that generates a unique identifier on each line.
i
not a restlet
rest api
suitetalk rest api
n
But you went on to ask if you can do it in SuiteScript so???
You wouldn't call the SuiiteTalk REST API from within NetSuite that just sounds insane.
i
yes you can
n
"wouldn't" not "couldn't"
i
i tried already the https.requestSuiteTalkRest api but the proble is the http method for update
no patch http method available in suitescript
its for preformance/benchmarking purposes (mentioned above)
n
At this point I have no idea what it is you need help with. You asked "can this be done thru suitescript" I thought you meant replace the call to the REST API with something custom. You clarified you want to call the REST API from within NetSuite using SuiteScript, which you confirmed you can do. So what do you need?
i
n
?
What problems?
i
n
Repeating your question without context or more detail to help people giving their time freely to help you is not helpful. You keep saying you're having problems with the patch method, I get it, but what problems??? Maybe someone else can help you. Good luck 🤷🏻‍♂️
🥳 1
s
The problem at least seems clear to me - they want to do an
HTTP PATCH
from SuiteScript but cannot. @infestrio if an HTTP verb isn't supported by NS, it's a dead end. Looks like benchmarking will have to happen from outside NS
I am curious what others are seeing in terms of relative performance from SuiteTalk REST
i
rec.load to update sublist line fields then rec.save is taking so much time also bec of the deployed UE scripts done by the other outsourced devs. just curious to try the suitetalk rest using suitescript to compare the execution time. but yeah seems like the http patch cannot be overriden to post/put atleast for the request
s
I presume you'd incur the same delay due to UE scripts even if using SuiteTalk REST? unless you truly don't want/need them to run (I presume SuiteTalk REST has an option to disable)?
i
yeah might be an option to remove the ue scripts rest api context if ever
no worries ill take it from here
thanks!!!
s
good luck, and let us know what your benchmarking reveals!