Range Object Members

Explore Range Object Members in SuiteScript, detailing date-time range properties for effective data handling.

·2 min read·View Oracle Docs

The Range Object in SuiteScript allows developers to handle date or date-time ranges effectively. The object comprises two primary members vital for understanding date boundaries in workflows.

What is the Range Object?

The workbook.Range object represents a date or date-time range. The dates are formatted according to user preferences in their account and can be returned after executing a pivot.

What are the Members of the Range Object?

Below are the members available for the workbook.Range object:

Member NameTypeDescriptionSupported Script Types
Range.endstringThe end date or date-time of the range.Server scripts
Range.startstringThe start date or date-time of the range.Server scripts

Member Descriptions

  • Range.end: This property retrieves the end date or time of the specified range. It is returned as a string and adheres to the user's date formatting preferences. Modifying this property after object creation will result in a READ_ONLY_PROPERTY error.

  • Range.start: Similar to Range.end, this property provides the start date or time of the range. It is also formatted as a string, reflecting the user's account settings.

Supported Script Types

Both members of the Range object are compatible exclusively with server scripts, making them useful within the context of backend operations.

By understanding these properties, developers can effectively manage and utilize date ranges in their SuiteScript applications, ensuring accurate data manipulations that align with user requirements.

Additional Resources

For further information, explore the N/workbook Module and SuiteScript 2.x Modules.

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

Key Takeaways

  • The Range object is essential for handling date-time ranges in SuiteScript.
  • Key members include Range.start and Range.end, both of which return date-time strings.
  • Understanding these properties enhances data manipulation in SuiteScript workflows.

Frequently Asked Questions (4)

Are the Range.start and Range.end properties writable in the Range Object?
No, both Range.start and Range.end properties are read-only. Attempting to modify them after object creation will result in a READ_ONLY_PROPERTY error.
In which scripting environment can the Range Object be utilized?
The Range Object and its members are supported exclusively within server scripts, making it suitable for backend operations.
How are the dates formatted in the Range Object members?
Dates for both Range.start and Range.end are formatted according to the user's date preferences in their NetSuite account settings and are returned as strings.
Can the Range Object be used in client scripts?
No, the Range Object is only designed for use in server scripts, as specified in the supported script types for the members.
Source: Range 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 Platform

View all Platform articles →