Supported Record Transformations in SuiteScript
Supported record transformations enable automated processes like order management by converting one record type to another.
TL;DR Opening
Supported record transformations allow developers to automate various NetSuite processes by converting records from one type to another. This functionality is invaluable for scenarios like order processing or generating invoices from existing orders.
What Are Supported Transformations?
Using the record.transform method, you can effectively change a record's type while utilizing the existing data from another record. This feature aids in streamlining operations and automating repetitive tasks. For specific transformation types, refer to the section below.
Key Features
- Method Description: Transforms records from one type to another.
- Returns: A transformed record object.
- Script Types Supported: Works with both client and server scripts.
- Governance Limits:
- Transaction records: 10 units
- Custom records: 2 units
- All other record types: 5 units
Parameters for Transformation
The options parameter is critical in defining the transformation specifics. Here are the parameters you need:
| Parameter | Type | Required | Description |
|---|---|---|---|
fromType | string | Required | The current record type being transformed. |
fromId | number | Required | The internal ID of the record to transform. |
toType | string | Required | The record type of the output after transformation. |
isDynamic | boolean | Optional | Sets the transformation to dynamic mode if true (default is false). |
defaultValues | Object | Optional | Name-value pairs for default field values in the new record. |
Errors
You may encounter the following error if any required arguments are not supplied:
- Error Code:
SSS_MISSING_REQD_ARGUMENT- Thrown if a required argument is missing or undefined.
Code Sample
This example demonstrates the basic syntax for transforming a record in SuiteScript:
1var objRecord = record.transform({2 fromType: record.Type.CUSTOMER,3 fromId: 107,4 toType: record.Type.SALES_ORDER,5 isDynamic: true,6});1record.transform({ 2 fromType: 'salesorder', 3 fromId: 6, 4 toType: 'invoice', 5 defaultValues: { billdate: '01/01/2019' } 6});Supported Transformation Types
Here is a comprehensive list of the supported transformations:
| Original Record Name | Original Record Type | Transformed Record Name | Transformed Record Type |
|---|---|---|---|
| Assembly Build | assemblybuild | Assembly Unbuild | assemblyunbuild |
| Build/Assembly | assemblyitem | Assembly Build | assemblybuild |
| Work Order | workorder | Cash Refund | cashrefund |
| Cash Sale | cashsale | Credit Memo | creditmemo |
| Customer | customer | Customer Payment | customerpayment |
| Invoice | invoice | Sales Order | salesorder |
| Job | job | Estimate | estimate |
| Purchase Order | purchaseorder | Vendor Bill | vendorbill |
| Custom Sales Transaction | customsalestransaction | Cash Sale | cashsale |
Note: Certain transformations like creating an Assembly Build for Outsourcing Work Orders are not supported. For detailed guidance on other specific transformations, ensure to check the relevant documentation or consult the NetSuite Help Center.
Key Takeaways
- The record transformation feature automates data flow between different record types in NetSuite.
- Understanding the parameters and governance limits can enhance script performance.
- Utilize the provided code samples as a foundation for your custom transformations.
Source: This article is based on Oracle's official NetSuite documentation.
Frequently Asked Questions (4)
Are there specific scripts that support the record transformation method in SuiteScript?
What are the governance limits for using the record.transform method with different record types?
What parameters are required to use the record.transform method in SuiteScript?
What error might occur if required arguments are missing when transforming a record?
Was this article helpful?
More in Integration
- Natural Language Queries in NetSuite AI
MCP Standard Tools SuiteApp enables AI-driven data tasks in NetSuite, aligned with role permissions.
- Square Connector Integration in NetSuite 2026.1
Discover the Square Connector for seamless integration with NetSuite 2026.1, synchronizing transactions, orders, and inventory effortlessly.
- SuiteTalk Web Services Updates for NetSuite Integrations
SuiteTalk Web Services adds new Item Supply Plan support, enhancing integrations for efficient data management.
- SuiteTalk Web Services Enhancements in NetSuite
Explore the latest enhancements to SuiteTalk Web Services, improving integration and API functionalities in NetSuite.
Advertising
Reach Integration Professionals
Put your product in front of NetSuite experts who work with Integration every day.
Sponsor This Category