EmailMergeResult Object Members in SuiteScript
The EmailMergeResult object encapsulates email merge results, including email body and subject for server scripts.
The EmailMergeResult object serves as a key component within the N/render module for SuiteScript, allowing developers to manage email merge results effectively. This object provides essential properties such as the email body and subject, making it simple to control and utilize email distributions in automated scripts.
Overview of the EmailMergeResult Object Members
Properties
| Property Name | Type | Description |
|---|---|---|
| EmailMergeResult.body | string (read-only) | Contains the body of the email distribution in string format. |
| EmailMergeResult.subject | string (read-only) | Contains the subject line of the email distribution in string format. |
How to Use the EmailMergeResult Object
To create and return an EmailMergeResult object, you use the render.mergeEmail(options) method. Below is a sample of how to create an email merge result:
1// Sample SuiteScript code to create an EmailMergeResult2var mergeResult = render.mergeEmail({3 templateId: 1234,4 entity: {5 type: 'employee',6 id: 627 },8 recipient: {9 type: 'lead',10 id: 4111 },12 supportCaseId: 2, 13 transactionId: 271,14 custmRecord: null15});This sample demonstrates setting the necessary options, such as templateId, entity, and recipient, to successfully generate the email content you need.
Related Resources
For further details, check out the N/render module documentation and look into advanced scripting techniques using the TemplateRenderer object to enhance your email merge capabilities.
Who This Affects
This information is valuable for:
- Developers creating automated email communications
- Administrators managing scripts and templates within NetSuite
Key Takeaways
- The
EmailMergeResultobject is essential for handling email distributions in SuiteScript. - It includes properties for the email body and subject, both read-only, which simplifies mail generation.
- Utilize the
render.mergeEmail(options)method to create the object effectively.
Source: This article is based on Oracle's official NetSuite documentation.
Frequently Asked Questions (4)
How do you create an EmailMergeResult object in SuiteScript?
What properties are available in the EmailMergeResult object, and what do they contain?
Can the properties of the EmailMergeResult object be modified directly?
Is the EmailMergeResult object applicable to both WMS and standard NetSuite environments?
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