Additional Changes to Hidden Files

What is Changing?

The stack property of Error instances and the .toString() method on functions will be functionally discontinued in hidden files. The change will take place in NetSuite 2025.1, with an estimated date of June 2025. The stack property of an Error instance (i.e., Error.stack) will no longer show the trace of a function if it is a part of a hidden file. Usage of functionName.toString() where functionName is part of a hidden file will result in an error. Files are considered hidden if any of the following is true:

  • The file record in the File Cabinet has the Hide in SuiteBundle preference enabled.
  • Your SuiteApp has a hiding.xml file in the Installation Preferences folder with the “HIDING” defaultAction set to “HIDE.”
  • Your SuiteApp has attribute files under File Cabinet > SuiteApps > com.netsuite.project > .attributes where the hideinbundle field is set to ‘T’.

Required Actions

As a script owner, if you use

functionName.toString()

or Error instances’ stack property in a hidden file, you must remove such usages to prevent the script functionality from breaking in target accounts. As a possible workaround, replace all

.toString()

usages by copying and pasting the function code directly. Do not expect hidden functions to be returned as part of the trace with

Error.stack

Remove such usages from your business logic. Once you have made changes to affected files and confirmed that your projects are operating as expected, push upgrades to your managed bundles and SuiteApps. If you have unmanaged bundles or SuiteApps, please instruct your customers to upgrade to the latest version, by June 2025. The change will take place in 2025.1 accounts starting June 2025.

Leave a comment

Your email address will not be published. Required fields are marked *