Define JSON Object Structure for NetSuite Records
Learn how to define a JSON object structure to represent NetSuite records effectively, including custom fields.
To use the data in a NetSuite record, you must determine how to represent the record as a JSON object. For example, a custom record containing a set of questions and answers may have the following structure:
-
record name -
customrecord_q_and_a -
custom field -
custrecord_q_and_a_queston -
custom field -
custrecord_q_and_a_answer
A JSON object representing this custom record would look like the following:
{ "question": "A String with the question" , "answer": "A String with the answer" , "createdAt": "2016-03-31"}This example only requires name/value pairs representing each custom field and its value. However, depending on the complexity of the record you need to represent, a JSON object can be more complex. For example, a JSON object can contain arrays or nested objects.
After defining the formal structure of a JSON object, you can define the backend model that accesses the NetSuite record. See Create a Backend Model for more information.
Related Topics
- Services and Backend Models in Custom Modules
- Create a Backend Model
- Create a Service to Handle HTTP Requests
General Notices
Frequently Asked Questions (4)
Does the JSON object structure for representing a NetSuite record support nested objects?
Do I need to define a backend model after creating a JSON object for a NetSuite record?
What is required to search and filter records in a backend model using SuiteScript?
How can validation be implemented in a backend model for a NetSuite record?
Was this article helpful?
More in Platform
- Configuring Sass in NetSuite Extensions: Complete Guide
This guide covers how to configure Sass in NetSuite extension's manifest.json file and ensure proper deployment. Manual Edits
- Deploy and Local Distribution Directories in SuiteCommerce
Deploy and local distribution directories in SuiteCommerce manage file organization for deployments and local server setups effectively.
- Step 1: Create a Custom [Module].ServiceController
Documentation article about Step 1: Create a Custom [Module].ServiceController Step 1: Create a Custom [Module].ServiceController
- Set Up a Custom ServiceController for SuiteCommerce Advanced
Step-by-step guidance for configuring a Custom ServiceController in SuiteCommerce Advanced for seamless integration with backend services.
Advertising
Reach Platform Professionals
Put your product in front of NetSuite experts who work with Platform every day.
Sponsor This Category