Enhancing Script Execution Logs for Custom Tools in NetSuite 2026.1
Learn how to optimize custom tool scripts with new execution log features in NetSuite 2026.1.
As of NetSuite 2026.1, developers can leverage an enhanced logging feature for custom tool scripts, significantly improving script monitoring and troubleshooting. This article outlines how to update existing custom tool scripts and their associated SuiteCloud Development Framework (SDF) objects to take advantage of these capabilities.
Updates for Custom Tool Scripts
To ensure your custom tool scripts benefit from enhanced execution logs, implement the following updates:
JSDoc Tag Addition
- Add the JSDoc tag
@NScriptType CustomToolto your custom tool script. This tag informs NetSuite that your script should be treated as a custom tool, enabling the new logging features associated with this script type.
Asynchronous Entry Points
- Declare entry point functions as asynchronous. By marking your methods with the
asynckeyword, you enhance their ability to handle operations that require waiting for resources, such as API calls, thus yielding better script performance and log accuracy.
Updates for SDF Object XML Definitions
In addition to script modifications, adjustments are necessary for the corresponding SDF object XML definition files:
- Rename the object from
tooltotoolset. This change aligns object nomenclature with functionality improvements introduced in the new version. - Change the script ID prefix from
customtool_tocusttoolset_. Maintaining proper naming conventions ensures clarity and consistency across your development projects. - Rename the attribute
exposeto3rdpartyagentstoexposetoaiconnector. This change reflects the enhanced connectivity options available for integrations with external systems.
Key Takeaways
- Implement the @NScriptType CustomTool tag to activate logging features for your scripts.
- Declare entry point methods as asynchronous for optimal script functionality.
- Update SDF object names and prefixes to maintain compatibility with the latest enhancements.
- Renaming the exposeto attributes helps clarify their purpose in the context of integrations.
By applying these updates, NetSuite developers can maximize their ability to monitor script execution and troubleshoot issues efficiently, aiding in delivering robust custom tool functionalities. For more detailed guidance on updating your custom tools, refer to the documentation on updating custom tools.