Debugging and Bundling SSP Applications in NetSuite
Debug and bundle SuiteCommerce SSP applications with SuiteScript 2.0, utilizing the N/log module, and SuiteBundler for packaging.
Debugging and bundling SuiteCommerce SSP applications are crucial for ensuring seamless operation and customization. After creating your SSP application, you can debug your SuiteScripts through the Script Execution Log on the SSP Application record and also use SuiteBundler to prepare your application for installation in other NetSuite accounts.
How Can You Debug Your SSP Application?
You can use two approaches in SuiteScript 2.0 to debug your web store customizations:
Debug using the N/log Module
The N/log module provides an easy way to write logs for different log levels. Here’s an example of how to implement it:
1<%@NApiVersion="2.x"%>2<%@ require path="N/log" alias="testLog"%>3<%4 var x = 'value';5 testLog.audit({6 title: 'audit log',7 details: 'value of x is: ' + x8 });9 testLog.debug({10 title: 'debug log',11 details: 'value of x is: ' + x12 });13 testLog.emergency({14 title: 'emergency log',15 details: 'value of x is: ' + x16 });17 testLog.error({18 title: 'error log',19 details: 'value of x is: ' + x20 });21%>Debug without Loading the N/log Module
You can also log without specifically loading the N/log module:
1<%@NApiVersion="2.x"%>2<%3 var x = 'value';4 log.audit({5 title: 'audit log',6 details: 'value of x is: ' + x7 });8 log.debug({9 title: 'debug log',10 details: 'value of x is: ' + x11 });12 log.emergency({13 title: 'emergency log',14 details: 'value of x is: ' + x15 });16 log.error({17 title: 'error log',18 details: 'value of x is: ' + x19 });20%>How to Bundle Your SSP Application?
To package your SSP application for use in another NetSuite account, utilize SuiteBundler. When creating a bundle, you can include your SSP application record and all associated files:
- Access the Bundle Builder from your NetSuite account.
- In step three, select the SSP Application to include it in your bundle.
- When the bundle is installed in a target account, it will replicate the original SSP Application record along with all its files, ensuring easy accessibility.
- Note: As of version 2019.1, updates to bundles containing SSP applications don’t overwrite existing script deployments in the target account, nor do they update relevant Log Level and Status fields.
Related Topics
- Create a SuiteScript 2.0 SSP Application Record
- Upload SSP Application Files to the File Cabinet
- Set Execute as Role Permissions for .ss and .ssp Files
- Select Default SSP File
- Make SSP Application Available on System Domain
- Sample SSP Application Code (SuiteScript 2.0)
Source: This article is based on Oracle's official NetSuite documentation.
Key Takeaways
- Utilize the
N/logmodule for flexible logging in your SSP applications. - Debugging can also be accomplished without loading specific modules.
- Use SuiteBundler to package and distribute your SSP applications cross-accounts.
- Script deployments from bundles do not get updated in target accounts as of 2019.1.
Frequently Asked Questions (4)
How can I debug a SuiteCommerce SSP application using SuiteScript 2.0?
What happens to existing script deployments when updating bundles with SSP applications?
Do I need a specific feature flag enabled to use SuiteBundler for SSP applications?
Is it possible to package and distribute SSP applications across different NetSuite accounts?
Was this article helpful?
More in SuiteScript
- Scheduling Map/Reduce Script Submissions in NetSuite
Learn how to schedule map/reduce scripts for one-time or recurring submissions in NetSuite, enhancing automation and efficiency.
- API Governance Units Calculation in NetSuite 2026.1
NetSuite 2026.1 introduces examples illustrating API governance unit calculations for both user event and scheduled scripts.
- Binary File Support in N/https Module for SuiteScript
SuiteScript enhances capabilities with binary file support in the N/https module, allowing improved data handling in external communications.
- Attach and Detach Operations in NetSuite 2026.1
Attach and detach operations for record relationships in NetSuite enhance data management and connectivity.
