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.

·3 min read·View Oracle Docs

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:

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%>

Debug without Loading the N/log Module

You can also log without specifically loading the N/log module:

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%>

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/log module 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?
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 →