FieldGroup Object Members in SuiteScript 2.1 Reference

The FieldGroup object in SuiteScript 2.1 manages UI field groups and their properties in NetSuite Suitelets.

·2 min read·View Oracle Docs

The FieldGroup object is a critical component of the NetSuite SuiteScript 2.1 framework, specifically designed for managing field groups within Suitelets. This object allows developers to define how groups of fields behave in the user interface (UI), including features like collapsibility and visibility.

Key Properties of FieldGroup Object

Property NameProperty TypeDescription
isBorderHiddenBooleanDetermines if a border appears around the field group.
isCollapsibleBooleanIndicates whether the field group can be collapsed.
isCollapsedBooleanDefines if the field group is displayed collapsed by default.
isSingleColumnBooleanControls whether the field group is shown in a single column layout.
labelstringThe label that represents the field group in the UI.

Practical Tips

  • Naming Conventions: It's recommended to prefix custom UI elements with custpage to avoid internal naming conflicts.
  • UI Consistency: Utilize the FieldGroup to maintain a coherent layout for user inputs, improving usability and ease of navigation.

Example Usage

Here's an example of how to define and use a FieldGroup in a Suitelet:

javascript
1function onRequest(context) {
2 var form = serverWidget.createForm({title: 'Sample Form'});
3 var fieldGroup = form.addFieldGroup({id: 'custpage_sample_group', label: 'Sample Field Group'});
4
5 // Set properties
6 fieldGroup.isCollapsible = true;
7 fieldGroup.isCollapsed = false;
8
9 // Add fields to the group
10 form.addField({id: 'custpage_field1', type: serverWidget.FieldType.TEXT, label: 'Field 1'});
11 form.addField({id: 'custpage_field2', type: serverWidget.FieldType.TEXT, label: 'Field 2'});
12
13 context.response.writePage(form);
14}

Conclusion

Using the FieldGroup object effectively enhances the usability of custom Suitelets. By defining clear grouping logic and leveraging its properties, developers can create intuitive interfaces that align with NetSuite's user experience standards.

Who This Affects

This content is particularly relevant for:

  • Developers: who are designing user interfaces using Suitelets.
  • Administrators: who may need to define custom forms and workflows.

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

Key Takeaways

  • The FieldGroup object allows for customizable field grouping in Suitelets.
  • Key properties include isBorderHidden, isCollapsible, and label.
  • Following naming conventions helps minimize conflicts within the UI.

Frequently Asked Questions (4)

Do I need to prefix custom FieldGroup IDs with 'custpage' in SuiteScript 2.1?
Yes, it is recommended to prefix custom FieldGroup IDs with 'custpage' to avoid internal naming conflicts in the NetSuite UI.
Can a field group be displayed collapsed by default in Suitelets?
Yes, you can control whether a field group is displayed collapsed by default using the 'isCollapsed' property of the FieldGroup object.
Is it possible to hide the border around a FieldGroup in Suitelet?
Yes, you can use the 'isBorderHidden' Boolean property to determine if a border appears around the field group.
How can I arrange fields in a single column layout within a FieldGroup in Suitelets?
You can arrange fields in a single column layout by setting the 'isSingleColumn' property of the FieldGroup object to true.
Source: FieldGroup 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 General

View all General articles →