ANS-1525 · CUSTOM FIELDS, RECORDS & FORMS

NetSuite: How ‘Only Show Last Subentity’ Affects Server Values

NetSuite preferences that simplify display names for subentities and subitems can unexpectedly alter the values returned by server-side scripts.

Short answer

The NetSuite preferences 'Only Show Last Subentity' and 'Only Show Last Subitem' (Home > Set Preferences) simplify displayed names to only the child. This setting also impacts server-side functions like nlapiGetFieldText(), which will return only the child's name. Developers must account for this behavior in scripts, as parent names will be omitted.

Scenario

NetSuite users may enable preferences to display only the last subentity or subitem in lists, simplifying the user interface. However, this display setting can lead to unexpected behavior when server-side scripts attempt to retrieve the full text value of these fields. Scripts expecting a 'parent : child' format may instead receive only the 'child' portion, causing logic errors.

Solution

NetSuite provides user preferences, accessible via Home > Set Preferences, titled 'Only Show Last Subentity' and 'Only Show Last Subitem'. When either of these preferences is enabled, the system modifies how entity and item names are displayed. Instead of the full hierarchical name, such as '[parent] : [child]', only the '[child]' portion will be visible in the user interface.This display setting has a significant impact on server-side script execution. Specifically, when a server-side script utilizes the nlapiGetFieldText() function to retrieve the text value of a field affected by these preferences, it will return only the '[child]' name.Developers must account for this behavior in their NetSuite scripts. It is crucial not to assume that field text values will always include the parent entity or item name when these preferences are active. Code should be robust enough to handle scenarios where only the child name is returned.

Expert NetSuite Support

Need help with this NetSuite issue?

Custom Fields, Records & Forms consulting and configuration support

Talk to a consultant