Recommended reading for anybody working with Netsuite:
-
SuiteScript overview: https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/article_163726005075.html#subsect_164988373340
-
Overview of different suiteScript types: https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_158379074356.html
-
Overview on RESTLets specifically: https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_4387799403.html
Netsuite data schema browser:
https://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2016_1/schema/record/account.html
⇒ RESTLets are most relevant to Nango, but some very advanced integrations might also require other types of scripts
Good reading for people writing RESTlet
Understand dynamic
and standard mode
: https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_1524156901.html#bridgehead_1524158046
Records browser (lists all objects & fields available in Restlet with their internal id):
https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2023_2/script/record/account.html
N/Record reference:
Sublist items can also have subObjects nested in them (e.g. addresses in the addressbook sublist).
Example of how to write & edit these: https://stackoverflow.com/questions/37262428/how-to-set-an-address-on-customer-using-suitescript-2-0
⇒ Note that these calls required dynamic mode on the object!
When sending data via a restlet the order of the JSON keys is very important! The incorrect ordering can cause an API to fail with an unhelpful response from the Netsuite API, unfortunately.