Join Object Members for SuiteAnalytics in NetSuite
Join object members in SuiteAnalytics encapsulate joined records, enabling complex data retrieval across multiple record types.
Joining records in SuiteAnalytics allows developers to create complex datasets by leveraging the relationships between various record types. This article details the members of the Join object used in datasets, providing essential details for effective implementation.
What Are Join Object Members?
The Join object encapsulates a joined record that is used within a dataset. Each join can pull data across various record types, which is vital for generating comprehensive reports and insights.
Join Object Members Overview
Here are the key members of the dataset.Join object:
| Member Name | Return Type / Value Type | Supported Script Types | Description |
|---|---|---|---|
Join.fieldId | string (read-only) | Server scripts | The ID of the field on which the join is performed. |
Join.join | dataset.Join (read-only) | Server scripts | The child join, if applicable in a multilevel join. |
Join.source | string (read-only) | Server scripts | The internal ID for the source record type of the join. |
Join.target | string (read-only) | Server scripts | The polymorphic target of the join. |
Creating Joins in SuiteAnalytics
To utilize the Join object, you must first create a join using the dataset.createJoin(options) method. Here are some examples of how to create various types of joins:
Basic Join Creation
// Create a basic Joinvar myNameJoin = dataset.createJoin({ fieldId: 'name'});Inverse Join Creation
// Create an inverse Joinvar myInverseJoin = dataset.createJoin({ fieldId: 'phone', source: 'contact'});Polymorphic Join Creation
// Create a polymorphic Joinvar myPolymorphicJoin = dataset.createJoin({ fieldId: 'phone', target: 'entity'});Multi-level Join Creation
// Create a multi-level Joinvar myMultiLevelJoin = dataset.createJoin({ fieldId: 'phone', join: myNameJoin});Loading and Auditing the Joined Dataset
You can load a dataset that includes a join and inspect its properties through logging:
1var myDataset = dataset.load({2 id: myDatasetId // Replace with a valid ID value for your account3});4var myJoin = myDataset.columns[0].join;5 6log.audit({7 title: 'Join fieldId = ',8 details: myJoin.fieldId9});10log.audit({11 title: 'Join source = ',12 details: myJoin.source13});14log.audit({15 title: 'Join target = ',16 details: myJoin.target17});18log.audit({19 title: 'Join join = ',20 details: myJoin.join21});Conclusion
Using join operations effectively in SuiteAnalytics allows access to a broader range of data, enabling deeper insights and better reporting capabilities.
Source: This article is based on Oracle's official NetSuite documentation.
Key Takeaways
- The Join object encapsulates complex data relationships within datasets.
- It supports various join types, including basic, polymorphic, and multi-level joins.
- Understanding join properties is essential for effective data retrieval and reporting.
Frequently Asked Questions (4)
How do you create a polymorphic join in SuiteAnalytics?
Can multi-level joins include multiple child joins in SuiteAnalytics?
What is the purpose of the `Join.source` member in SuiteAnalytics?
Is it possible to audit properties of a joined dataset in SuiteScript?
Was this article helpful?
More in General
- Payment Date Prediction Feature in NetSuite
Payment Date Prediction in NetSuite utilizes machine learning to enhance financial planning by predicting invoice payment dates.
- NetSuite Ship Central Enhancements for Packing & Shipping
NetSuite Ship Central features enhance packing and shipping operations for improved efficiency and accuracy.
- Generative AI Features in NetSuite 2026.1
Discover new generative AI features in NetSuite 2026.1, enhancing reporting, search, predictions, and development productivity.
- Field Service Management Enhancements and Bug Fixes for 2026
Overview of the 2026 Field Service Management SuiteApp updates showcasing enhancements and bug fixes.
Advertising
Reach General Professionals
Put your product in front of NetSuite experts who work with General every day.
Sponsor This Category