MergeArrangementsTaskStatus Object Members in SuiteScript

The MergeArrangementsTaskStatus object in SuiteScript provides details on the status of merge tasks, including error messages and IDs.

·2 min read·View Oracle Docs

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 NameReturn TypeDescription
MergeArrangementsTaskStatus.errorMessagestring (read-only)Contains an error message describing any failure in the merge task. Valid when status is TaskStatus.FAILED.
MergeArrangementsTaskStatus.inputArrangementsnumber[] (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.inputElementsnumber[] (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`numberstring` (read-only)
MergeArrangementsTaskStatus.statusstring (read-only)Represents the current status of the merge task, using values from the recognition.TaskStatus enum.
MergeArrangementsTaskStatus.submissionId`numberstring` (read-only)
MergeArrangementsTaskStatus.taskId`numberstring` (read-only)

How to Check Task Status?

To create a MergeArrangementsTaskStatus object, use the following syntax:

suitescript
1var mergeTaskState = recognition.checkStatus({
2 taskId: taskStatusId
3});
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:

suitescript
1var mergeTaskState = recognition.checkStatus({
2 taskId: taskStatusId
3});
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.

Source: This article is based on Oracle's official NetSuite documentation.

Frequently Asked Questions (4)

What types of merge tasks does the MergeArrangementsTaskStatus object support?
The MergeArrangementsTaskStatus object supports tasks related to merging revenue arrangements and revenue elements, specifically 'MERGE_ARRANGEMENTS_TASK' and 'MERGE_ELEMENTS_TASK'.
How can I find out why a merge task failed using MergeArrangementsTaskStatus?
You can use the errorMessage property of the MergeArrangementsTaskStatus object to get a description of any failure, valid when the status is 'TaskStatus.FAILED'.
What information does the resultingArrangement property provide?
The resultingArrangement property provides the internal ID of the newly created revenue arrangement and is valid when the status is 'TaskStatus.COMPLETE'.
Can I track the current status of a merge task using MergeArrangementsTaskStatus?
Yes, the status property of the MergeArrangementsTaskStatus object lets you track the current status of a merge task using values from the recognition.TaskStatus enum.
Source: MergeArrangementsTaskStatus Object Members Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in Accounting

View all Accounting articles →