Getting Started
Download PDF button

Troubleshooting

11min

Getting an error? Getting a blank invoice? Let's work through some common issues experienced.

Script Not Running

A common script error is when "SSS_INVALID_SCRIPTLET_ID" is returned. Commonly this is because the script deployment has a status that makes the script inaccessble. Set status = Released on the deployment to address this issue.

Text or Logos not showing in Multi-subsidiary orgs

In multi-subsidiary NetSuite orgs sometimes company addresses or company logo's are stored differently than single-subsidiary. The templates either fail outright or may run and just not show a logo or address.

Document image

Document image


The reason for this is that the call to a subisidiary's logo or text elements might need to reference the record on which it resides. Inside of NetSuite this is based on the record you clicked from, but coming from Salesforce it does not exactly know.

To address the issue, you will need to edit the template's XML code either in NetSuite, or by editing the downloaded template file and re-uploading. Don't forget to update the internal ID to match as necessary between Breadwinner setup and the Netsuite file if you're loading new files while testing through this.

First edit to try is prepending "record." before subsidiary in the merge code. This means eg. for Subsidiary Name, change ${subsidiary.name} to ${record.subsidiary.name} as you find it in the XML.

If that doesn't work it may be necessary to create and use formula fields to do the heavy lifting. NetSuite's suitescript can then retrieve the correct logo file or desired text as referenced by the formula provided.

To create replacement formula fields for the template, you will create transaction body formula fields. NOTE: SSN or TIN used for TaxID field, and Subsidiary Logo (Forms) used for the logo URL are sometimes NOT AVAILABLE. If this is the case you must contact NetSuite and open a case requesting access to those fields.

Document image




Document image




Creating a Transaction Body Field to reference text or logo fields

This process is the same as creating custom fields for integrating from NetSuite to Salesforce, with some minor differences. Navigate to Customization -> Lists, Records, & Fields -> Transaction Body Fields -> New

Document image


For text fields such as address or company name, it will be a Free-Form Text Field. Un-check "Store Value", and in apply to click Sale.

Document image


In Validation & Defaulting tab, check "Formula" and enter the old macro formula in the Default Value field. Note that below you can create a text field with source fields and can perform text formatting. If you only wanted the name in this example however, you would just use {subsidiary.name}

Document image


Save the field. You will notice the ID may be different from the name of the field if you did not specify it. In the above screengrab you can see the ID is custbody39. You will reference that ID in the template file you are updating for use with Breadwinner.

HTML




For Images (logos) the process is nearly the same

Create a new transaction body field just as you did for the text field above, however this time select Image in the Type field

The Applies To tab will be the same.

Under Sourcing & Filtering tab, you will select the values as necessary. Notice the values selected below will retrieve the image from Subsidiary (Main) and are pulling the Subsidiary's Logo for forms. You can adjust as necessary for your uses.

Document image


Save the field. You will notice the ID may be different from the name of the field if you did not specify it. In the screengrab for text field above, you can see the ID is custbody39. You will reference the ID in the template file you are updating for use with Breadwinner. In our examples next, that reference is now "custbodysubsidiarylogo"

When the script processes your formula field, it likely can't handle the image as it does in the original template. In this case you need to use the @url directive.

HTML


Finally wrapping the field in an IMG tag and adding the logo's actual pixel dimensions:

HTML
Text




Macro Sections in XML

For some reason it seems that NetSuite developers like to cause confusion. Even though things "should" work they don't, or don't do so seemingly logicallly. If it seems as though logo placement is correct and should be working, and are using a Macro in the XML header, you might try a simple solution. That is to put the URL for the image somewhere in the standard <body> section of the template, even though it's placement is not needed or wanted there.

HTML


This seems to cause the NetSuite script engine to go ahead and process the logo, and once processed it will proceed to run correctly in the macro. Odd.. and unknown why this is the case, but it seems to work on occasion.

But wait, let's do something tricky as you really didn't want an additional line of URL code on your template did you?

HTML