Debugging and Bundling SSP Applications in NetSuite

Debug and bundle your SSP applications seamlessly with effective SuiteScript logging and SuiteBundler packaging methods.

·2 min read·View Oracle Docs

Debugging and packaging an SSP application is crucial for maintaining robust web store customizations in NetSuite. This process allows developers to ensure their scripts run successfully and can be easily shared across NetSuite accounts.

Debugging Your SSP Application

Once your SSP application is active, debugging is essential to optimize functionality. You can debug your application by executing SuiteScripts and monitoring the Script Execution Log.

Debugging Methods

There are two primary methods for debugging SSP applications written in SuiteScript 2.0:

  1. Using the N/log Module: This method loads the logging module for more detailed logging.
  2. Without Loading the N/log Module: This method relies on global logging capabilities without module imports.

Debugging Using the N/log Module

Here is how you can effectively utilize the N/log module:

suitescript
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: '+x
8 });
9 testLog.debug({
10 title: 'debug log',
11 details: 'value of x is: '+x
12 });
13 testLog.emergency({
14 title: 'emergency log',
15 details: 'value of x is: '+x
16 });
17 testLog.error({
18 title: 'error log',
19 details: 'value of x is: '+x
20 });
21%>

Debugging Without Loading the N/log Module

If you prefer not to load the N/log module, the following example showcases basic logging.

suitescript
1<%@NApiVersion="2.x"%>
2<%
3 var x = 'value';
4 log.audit({
5 title: 'audit log',
6 details: 'value of x is: '+x
7 });
8 log.debug({
9 title: 'debug log',
10 details: 'value of x is: '+x
11 });
12 log.emergency({
13 title: 'emergency log',
14 details: 'value of x is: '+x
15 });
16 log.error({
17 title: 'error log',
18 details: 'value of x is: '+x
19 });
20%>

Bundling Your SSP Application

To share and install your SSP application across different NetSuite accounts, utilize the SuiteBundler. This tool enables you to package your customization easily and deploy it in other environments efficiently.

Important Tips:

  • Always test your application thoroughly before packaging.
  • Monitor error logs during the debugging phase to understand any issues with script execution.

By following these steps, you can ensure your SSP application is debugged effectively and prepared for bundling to facilitate smooth installations in multiple accounts.

Key Features:

  • Efficient logging methods to troubleshoot your applications.
  • Easy packaging and sharing with SuiteBundler.

Who This Affects

This information is particularly relevant for:

  • Developers working on SuiteCommerce applications.
  • Administrators overseeing the customization and deployment of SSP applications.
  • Technical teams responsible for debugging and troubleshooting.

Key Takeaways

  • Debugging is critical for successful SSP application performance.
  • Use N/log for enhanced logging capabilities.
  • Package applications easily with SuiteBundler for installations in other NetSuite accounts.

Frequently Asked Questions (4)

How can I debug a SuiteCommerce SSP application using SuiteScript 2.0?
You can debug a SuiteCommerce SSP application using the N/log module to write logs for different levels such as audit, debug, emergency, and error. Alternatively, you can log directly without loading the N/log module, using generic log functions.
What happens to existing script deployments when updating bundles with SSP applications?
As of version 2019.1, updates to bundles containing SSP applications do not overwrite existing script deployments in the target account. They also do not update relevant Log Level and Status fields.
Do I need a specific feature flag enabled to use SuiteBundler for SSP applications?
The article does not mention the need for a specific feature flag to use SuiteBundler for SSP applications. You can package your SSP application using SuiteBundler to include it in other NetSuite accounts.
Is it possible to package and distribute SSP applications across different NetSuite accounts?
Yes, it is possible to package and distribute SSP applications across different NetSuite accounts using SuiteBundler. This process ensures that your SSP Application record and all associated files are included in the bundle and replicated in the target account.
Source: Debug and Bundle an SSP Application 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 SuiteScript

View all SuiteScript articles →