I think I am missing something simple... I am per...
# suitescript
s
I think I am missing something simple... I am performing a record.load on a sales order. I want to send this as JSON to an external http as a POST. That is all working fine. But I want to add data to that before it sends. The normal method appears to be to simply add an element like jsontosend.newelementname = 'newelementvalue'; ..but it comes out as undefined if I write it to debug. What am I doing wrong?
b
Share the code
Without code, my guess is that you dont understand how .toJSON works
m
I would exercise caution with stringifying an internal NetSuite object. AFAIK NetSuite does not document the json format, and could potentially change it at will and break your code.
💯 1