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.
Source: This article is based on Oracle's official NetSuite documentation.
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 Platform
- Style Object Members for Workbook API in NetSuite
The Style object provides customizable properties for workbook formatting in NetSuite, enhancing report and visualization functionality.
- Asynchronous HTTP Requests with SuiteScript Promises
Use SuiteScript to send asynchronous HTTP requests with promises for efficient error handling and response processing.
- Setting Sublist Field Values in SuiteScript
Set values for sublist fields in SuiteScript using the setSublistValue method. Understand required parameters and error handling.
- In This Help Topic
Explore N/log module guidelines, log levels, and script execution logs for efficient logging in SuiteScript.
Advertising
Reach Platform Professionals
Put your product in front of NetSuite experts who work with Platform every day.
Sponsor This Category