Position Percent Object Members in SuiteScript

The Position Percent object members provide percentage definitions for x and y dimensions in SuiteScript, enabling precise layout customization.

·2 min read·View Oracle Docs

TL;DR Opening

The Position Percent object in SuiteScript defines layout positions using percentage values for both x and y dimensions. It is essential for developers creating dynamic and responsive webpage elements in NetSuite.

Overview of Position Percent Object

The PositionPercent object represents a position defined through the percentages of x and y dimensions. Utilizing workbook.createPositionPercent(options), developers can easily create position objects to employ in styling elements on a webpage. This feature is particularly useful for enhancing user interfaces in various NetSuite applications.

Object Members

The PositionPercent object contains the following properties:

Member NameReturn TypeSupported Script TypesDescription
PositionPercent.percentXnumberServer scriptsPercentage of the x dimension.
PositionPercent.percentYnumberServer scriptsPercentage of the y dimension.

Creating a PositionPercent Object

To create a PositionPercent object, use the following syntax:

suitescript
1// Add additional code
2...
3// myPositionPercent is a workbook.PositionPercent object
4var myPositionPercent = workbook.createPositionPercent({
5 percentX: 25,
6 percentY: 47
7});
8...
9// Add additional code

Supported Script Types

This object is compatible exclusively with server scripts. For more information on the script types, refer to the SuiteScript 2.x Script Types.

Related Topics

Key Takeaways

  • The PositionPercent object facilitates layout customization in SuiteScript.
  • It includes properties for defining percentages along x and y dimensions.
  • Suitable for use in server scripts, it enhances flexibility in UI design within NetSuite.
  • Utilization of the workbook.createPositionPercent() method is required to instantiate this object.

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

Frequently Asked Questions (4)

Is the PositionPercent object available for client scripts?
No, the PositionPercent object is compatible exclusively with server scripts.
How do I create a PositionPercent object in SuiteScript?
You can create a PositionPercent object using the workbook.createPositionPercent method, supplying the percentX and percentY values.
What are the properties of the PositionPercent object?
The PositionPercent object contains two properties: percentX and percentY, both of which are numbers representing the percentage of the x and y dimensions, respectively.
Does the PositionPercent object interact with other SuiteScript modules?
The article doesn't specify any direct interactions, but it mentions the N/workbook module as a related topic, suggesting possible integration in UI customization.
Source: PositionPercent 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 →