MergeArrangementsTaskStatus Object Members in SuiteScript
The MergeArrangementsTaskStatus object in SuiteScript provides details on the status of merge tasks, including error messages and IDs.
The MergeArrangementsTaskStatus object encapsulates the current status of a submitted merge task in SuiteScript. It includes various properties that provide insight into the task's success or failure, and is particularly useful for managing tasks related to revenue recognition.
What Properties are Available in MergeArrangementsTaskStatus?
The following members are part of the MergeArrangementsTaskStatus object:
| Property Name | Return Type | Description |
|---|---|---|
MergeArrangementsTaskStatus.errorMessage | string (read-only) | Contains an error message describing any failure in the merge task. Valid when status is TaskStatus.FAILED. |
MergeArrangementsTaskStatus.inputArrangements | number[] (read-only) | An array of internal IDs for the revenue arrangement records to merge. Applicable when the task type is TaskType.MERGE_ARRANGEMENTS_TASK. |
MergeArrangementsTaskStatus.inputElements | number[] (read-only) | An array of internal IDs for the revenue elements to merge, applicable when the task type is TaskType.MERGE_ELEMENTS_TASK. |
MergeArrangementsTaskStatus.resultingArrangement | `number | string` (read-only) |
MergeArrangementsTaskStatus.status | string (read-only) | Represents the current status of the merge task, using values from the recognition.TaskStatus enum. |
MergeArrangementsTaskStatus.submissionId | `number | string` (read-only) |
MergeArrangementsTaskStatus.taskId | `number | string` (read-only) |
How to Check Task Status?
To create a MergeArrangementsTaskStatus object, use the following syntax:
1var mergeTaskState = recognition.checkStatus({2 taskId: taskStatusId3});4 5if (mergeTaskState.status === 'PENDING') {6 // Additional code can be added here;7}Error Handling Sample
Utilizing the errorMessage property can provide insight into task failures:
1var mergeTaskState = recognition.checkStatus({2 taskId: taskStatusId3});4 5if (mergeTaskState.status === 'ERROR') {6 log.debug('Error Message: ' + mergeTaskState.errorMessage);7}Conclusion
The MergeArrangementsTaskStatus object is crucial for developers working with revenue arrangements and is part of the broader N/task/accounting/recognition module which supports Server scripts. This object allows developers to track and manage the merge tasks effectively.
Frequently Asked Questions (4)
What types of merge tasks does the MergeArrangementsTaskStatus object support?
How can I find out why a merge task failed using MergeArrangementsTaskStatus?
What information does the resultingArrangement property provide?
Can I track the current status of a merge task using MergeArrangementsTaskStatus?
Was this article helpful?
More in SuiteScript
- SuiteScript 2.1 Enhancements in NetSuite February Updates
SuiteScript 2.1 now supports async features and PATCH method. Discover the latest API and SuiteProcurement improvements.
- Scheduling Map/Reduce Script Deployments in NetSuite
Learn to schedule map/reduce script submissions, including one-time and recurring options in NetSuite.
- Binary File Support in N/https Module for SuiteScript
SuiteScript enhances capabilities with binary file support in the N/https module, allowing improved data handling in external communications.
- API Governance Units Calculation in NetSuite 2026.1
NetSuite 2026.1 introduces examples illustrating API governance unit calculations for both user event and scheduled scripts.
