New Attach and Detach Operations in REST Web Services - NetSuite
New attach and detach operations in NetSuite 2026.1 allow record relationships with REST Web Services, enhancing data integration.
Starting in NetSuite 2026.1, new attach and detach operations have been introduced in the REST Web Services framework. This capability enables users to establish or remove relationships between different record instances within NetSuite, significantly enhancing the efficiency and flexibility of data management.
Key Features of Attach and Detach Operations
The attach and detach operations are pivotal for managing relationships between records. Key aspects include:
-
Record Types Supported: Currently, you can use these operations specifically for contact and file records.
-
URL Structure: To execute an operation, you incorporate the record type and IDs directly into the URL. For example:
/services/rest/record/v1/customer/660/!attach/contact/106This URL structure indicates that you are attaching a contact record (ID 106) to a customer record (ID 660).
-
HTTP Method: These operations require the POST HTTP method.
-
Optional Parameters: When attaching a contact record, it’s possible to specify optional attributes such as the role assigned to the contact. The request body can be empty if no attributes are set, and it should be formatted as
application/json.
Example Usage
Attaching a Contact Record
To attach a contact record to a customer, use the following:
POST .../services/rest/record/v1/customer/660/!attach/contact/106
Content-Type: application/json
{
"role": {
"id": "-10"
}
}
You can also perform this operation with an empty body:
POST .../services/rest/record/v1/customer/660/!attach/contact/106
Content-Type: application/json
{}
Attaching a File Record
Similarly, to attach a file record to an opportunity, you can use:
POST .../services/rest/record/v1/opportunity/379/!attach/file/398
In this scenario, you can also use an empty body since no additional parameters are required.
Detach Operation
The detach operation follows the same URL structure but uses the !detach command. For example:
POST .../services/rest/record/v1/customer/660/!detach/contact/106
Who This Affects
- Developers: Enhancements in integration capabilities, allowing for more dynamic record management.
- Administrators: Improved data structure and relationship management, making administration tasks more efficient.
- Users: Overall, users will benefit from better-defined data relationships, leading to streamlined processes and accuracy in reporting.
Key Takeaways
- New attach and detach operations enable flexible relationships between record instances in NetSuite.
- Supports contact and file records, facilitating enhanced integration and data management.
- Configured via REST Web Services using clear URL structures and POST requests.
- Optional attributes can be defined during attach operations for tailored data management.
- This release enhances user interactions and data visibility across NetSuite’s platform.
Frequently Asked Questions (4)
Which record types support the new attach and detach operations in NetSuite 2026.1?
How can I attach a contact to a customer using REST Web Services?
What HTTP method is used for the attach and detach operations?
Are there optional parameters available when performing attach operations in NetSuite?
Weekly Update History (1)
Updated Araxis Merge Diff File for the 2025.2 Endpoint with the information that the Araxis diff file for endpoints 2025.1 and 2025.2 is now available.
View Oracle DocsWas this article helpful?