MeasureValue Object Members in SuiteScript for Workbooks

MeasureValue object members provide a structured way to define measures and values in SuiteScript workbooks for data analysis.

·2 min read·View Oracle Docs

TL;DR Opening

The MeasureValue object members in SuiteScript enable developers to work with measures and their values in workbooks, enhancing data management and reporting capabilities within NetSuite. This is particularly useful for creating custom analytical views and reports.

What is the MeasureValue Object?

The MeasureValue object represents a measure and its associated value, which can include various data types such as numbers, strings, or booleans. This functionality is crucial for developers writing server scripts that leverage workbook capabilities within NetSuite.

MeasureValue Object Members

The MeasureValue object provides the following members:

Member NameReturn TypeSupported Script TypesDescription
MeasureValue.measureworkbook.MeasureValueServer scriptsThe measure to use for the measure value.
MeasureValue.valuestring, number, boolean, workbook.Record, workbook.Currency, workbook.Range, workbook.DurationServer scriptsThe value associated with the measure value.

Error Handling

When working with the MeasureValue object, be mindful of the following error:

  • Error Code: READ_ONLY_PROPERTY
    • Thrown If: You attempt to set the value of the measure property after the workbook.MeasureValue object has been created.

Supported Script Types

The MeasureValue object is supported exclusively in server scripts. For more information on script types, refer to the SuiteScript 2.x Script Types documentation.

Who This Affects

  • Developers: Useful for those creating reports and analytics components in NetSuite using SuiteScript.
  • Administrators: Helpful in configuring data and reports that leverage workbook functionality.

Key Takeaways

  • The MeasureValue object includes members to define measures and their values.
  • It supports various data types, enhancing flexibility in reporting.
  • Developers should handle read-only properties appropriately to avoid errors.

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

Frequently Asked Questions (4)

Can the MeasureValue object be used in client scripts or only in server scripts?
The MeasureValue object is supported exclusively in server scripts.
What data types can the MeasureValue.value member hold?
The MeasureValue.value member can hold data types such as string, number, boolean, workbook.Record, workbook.Currency, workbook.Range, and workbook.Duration.
What error might occur if I try to set the measure property after creating the MeasureValue object?
The error code 'READ_ONLY_PROPERTY' will be thrown if you attempt to set the measure property after the MeasureValue object has been created.
Does the MeasureValue object support all SuiteScript 2.x script types?
No, the MeasureValue object supports only server scripts in SuiteScript.
Source: MeasureValue 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 Integration

View all Integration articles →