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.
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 SuiteAnalytics
- Class, Department, Location Features in NetSuite 2026.1
Class, Department, and Location features enhance financial processes in NetSuite 2026.1 for improved insights and reporting.
- New HTML Formulas in Search for NetSuite 2025.1
New HTML Formulas in Search introduced in NetSuite 2025.1 enhances security for saved searches. Starting in NetSuite 2025.1, the HTML Formulas in Search feature
- Export Pivot Tables to Excel in NetSuite 2024.2
Export Workbook pivot tables to Excel XLSX format starting with NetSuite 2024.2, enhancing data analysis and reporting capabilities.
- Consolidated Reports and SuiteQL in NetSuite 2026.1
Consolidated reports and SuiteQL enhance data access in NetSuite 2026.1. Discover key integration features.
Advertising
Reach SuiteAnalytics Professionals
Put your product in front of NetSuite experts who work with SuiteAnalytics every day.
Sponsor This Category