Position Percent Object Members in SuiteScript 2023.2
Position Percent object members define percentage values for x and y dimensions in SuiteScript for dynamic 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
- Common SuiteScript Errors and Solutions for NetSuite
Common NetSuite script errors include INVALID_SCRIPT_DEPLOYMENT_ID and SSS_AUTHORIZATION_HEADER_NOT_ALLOWED. Learn effective solutions.
- Setting Field Values in SuiteScript for Effective Record
Learn to set field values in SuiteScript effectively, troubleshooting common errors and understanding data types.
- SuiteScript 2.1 Enhancements and API Updates in NetSuite
SuiteScript 2.1 enables execution of 2.0 scripts and supports PATCH method for enhanced API capabilities.
- Enhancements to SuiteScript User Role Context Clarification
SuiteScript updates clarify the user and role contexts for script executions, improving deployment understanding and management.
Advertising
Reach SuiteScript Professionals
Put your product in front of NetSuite experts who work with SuiteScript every day.
Sponsor This Category