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.
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 Name | Return Type | Supported Script Types | Description |
|---|---|---|---|
PositionPercent.percentX | number | Server scripts | Percentage of the x dimension. |
PositionPercent.percentY | number | Server scripts | Percentage of the y dimension. |
Creating a PositionPercent Object
To create a PositionPercent object, use the following syntax:
1// Add additional code2...3// myPositionPercent is a workbook.PositionPercent object4var myPositionPercent = workbook.createPositionPercent({5 percentX: 25,6 percentY: 477});8...9// Add additional codeSupported 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
- N/workbook Module
- SuiteScript 2.x Modules
- SuiteScript 2.x
Key Takeaways
- The
PositionPercentobject 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.
Frequently Asked Questions (4)
Is the PositionPercent object available for client scripts?
How do I create a PositionPercent object in SuiteScript?
What are the properties of the PositionPercent object?
Does the PositionPercent object interact with other SuiteScript modules?
Was this article helpful?
More in SuiteScript
- SuiteScript 2.1 Enhancements in NetSuite February Updates
SuiteScript 2.1 now supports async features and PATCH method. Discover the latest API and SuiteProcurement improvements.
- Scheduling Map/Reduce Script Deployments in NetSuite
Learn to schedule map/reduce script submissions, including one-time and recurring options in NetSuite.
- Binary File Support in N/https Module for SuiteScript
SuiteScript enhances capabilities with binary file support in the N/https module, allowing improved data handling in external communications.
- API Governance Units Calculation in NetSuite 2026.1
NetSuite 2026.1 introduces examples illustrating API governance unit calculations for both user event and scheduled scripts.
