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
- Common SuiteScript Errors and Solutions for NetSuite
Common NetSuite script errors include INVALID_SCRIPT_DEPLOYMENT_ID and SSS_AUTHORIZATION_HEADER_NOT_ALLOWED. Learn effective solutions.
- Set Sublist Field Values in SuiteScript 2.x for Record Management
Set sublist field values in SuiteScript 2.x for effective record management using standard and dynamic modes.
- Setting Field Values in SuiteScript for Effective Record
Learn to set field values in SuiteScript effectively, troubleshooting common errors and understanding data types.
- SuiteScript 2.1 Enhancements and API Updates in NetSuite
SuiteScript 2.1 enables execution of 2.0 scripts and supports PATCH method for enhanced API capabilities.
Advertising
Reach SuiteScript Professionals
Put your product in front of NetSuite experts who work with SuiteScript every day.
Sponsor This Category