Wednesday, October 31, 2018

Global Search an Existing Customer Record Produces No Results Found

1. Locate the customer record using the following steps:

  •             Navigate to Lists > Relationships > Customers
  •             Check the Show Inactives checkbox
  •             View = All

2. Check if the customer is set to inactive.

Solution: Once user confirms the customer is inactive, the following options are available to be able to use global search on this customer.

Option 1: Make the customer active by setting the Inactive checkbox to blank.

Option 2: Enable the Include Inactives in Global & Quick Search preference found at Home> Set Preferences> Analytics tab > Search section. This allows users to use Global Search customer records that are inactive.



Fixed Asset > Reports > Asset Register > Asset Cost shows 0.00 Even If The Asset Has Acquisition Transaction


To resolve this issue, make sure that Acquisition Transaction was not set to Inactive by following the steps below:


1. Navigate to Fixed Assets > List > Assets

2. Click the View link next to the Fixed Asset 

3. Go to Depreciation History tab > Accounting Method Depr. History subtab

4. Click Edit link next to Acquisition 

5. Check the Inactive checkbox. To view asset cost in the Asset Register report make sure that this field is not marked. 



Fixed Assets > Reports > Asset Register > Do not have the option to display Assets from multiple Department and Location


Fixed Assets > Reports > Asset Register   > Do not have the option to display Assets from multiple Department and Location

Solution/ Recommendation:

On Fixed Assets > Reports > Asset Register we do not have the option to display Assets from multiple Department and Location. The Department, Class and Location fields are not multi select. You may attach the customer to issue 215654  should they request for the ability to to select multiple Department and Location on Asset Register Report.

As an alternate solution to display list of Assets from multiple Department and Location, the user may try the following steps:

1. Go to Fixed Assets > Searches > Asset Register
2. Click Edit this Search
3. On the Available Filters tab > Select Asset Fields = Location > Show in Footer = T > Show as Multi Select = T
4. On the Available Filters tab > Select Asset Fields = Department > Show in Footer = T > Show as Multi Select = T
5. On the Results tab user may add, Asset Fields = Location and Select Asset Fields = Department

This search shows the following information although do not show as the same format as the report :
Asset Type
Original Cost
Acquisition Cost
Write Down
Net Book Value



Customize Fixed Asset report

Fixed Asset Register Report Displays Fixed Assets as well as its Cost, Depreciation and Net Book Value. This report is currently not customizable. Enhancement 215590 : Fixed Assets > Reports > Asset Register > Ability to customize the report is addressing this.

As an alternate solution, we may view the information from a Saved Search with the following steps:

1. Navigate to Fixed Assets > Searches > Asset Register - This search shows the Asset ID, Disposal cost, Revaluation as well as Asset Original Cost, Acquisition cost, Depreciation, Write down and Net Book Value. This is also customizable and allows them to add more columns.

2. To change the header click Edit this Search > Results tab > Change custom label and Summary Label

JAVA Code that will Invoke a GET Method to a RESTlet

This article will show users invoke a GET method to a RESTlet in JAVA.

RESTlet Code:

//simple restlet code that will return {"sayhi": "Hello World"}
function restTest(){
var o = new Object();
o.sayhi = 'Hello World! ';
return o;

JAVA Code:

	try {		URL url = new URL("");// external url of the RESTlet that can be found in the deployment of the RESTlet script		HttpsURLConnection urlConn = (HttpsURLConnection) url.openConnection();		urlConn.setRequestMethod("GET"); //set GET method		urlConn.setAllowUserInteraction(false); 		urlConn.setDoOutput(true);     		urlConn.setRequestProperty( "Content-type", "application/json" );// set Content type		urlConn.setRequestProperty( "Authorization", "NLAuth nlauth_account=accountid,,nlauth_signature=password, nlauth_role=3" );// set credentials (role 3 is the Admin role)		int rspCode = urlConn.getResponseCode();// get the response based from the RESTlet (HTTP response)		System.out.println(rspCode);		// read what the RESTlet returns		BufferedReader br = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));		StringBuilder sb = new StringBuilder();		String line;		while ((line = br.readLine()) != null) 			{			sb.append(line+"\n");			}		br.close();		System.out.println(sb.toString()); //RESTlet will return {"sayhi": "Hello World"}	   } 		catch (MalformedURLException e) 		{ e.printStackTrace();}		catch (IOException e) 		{ e.printStackTrace();}

DISCLAIMER: The sample code described herein is provided on an "as is" basis, without warranty of any kind, to the fullest extent permitted by law. Netsuite Inc. does not warrant or guarantee the individual success developers may have in implementing the sample code on their development platforms or in using their own Web server configurations.

Netsuite Inc. does not warrant, guarantee or make any representations regarding the use, results of use, accuracy, timeliness or completeness of any data or information relating to the sample code. Netsuite Inc. disclaims all warranties, express or implied, and in particular, disclaims all warranties of merchantability, fitness for a particular purpose, and warranties related to the code, or any service or software related thereto.

Netsuite Inc. shall not be liable for any direct, indirect or consequential damages or costs of any type arising out of any action taken by you or others related to the sample code


Create a Custom Field that Shows Terms "Days Til Discount Expires" in Customer Record

1. Navigate to Customization > Lists, Records, & FieldsEntity Fields > New
2. Provide the Label
3. Set Type to Integer Number
4. Mark the Store Value field checkbox
5. Mark the Customer checkbox under Applies To tab
6. Set Subtab to Financial under Display tab
7. On Sourcing & Filtering set Source List to Terms and Source From to Days Till Discount Expires
8. Save



Adding of Currency Symbol on a Custom Transaction Body Field with Type= Currency on a PDF.

This can be done by adding the SQL formula below together with the Internal ID of the custom transaction body field with Type= Currency as a new custom element on the PDF Layout.

- XXX is the Field Name.
- YYY is the Field ID of the custom field.

For example:

I. Create a custom transaction body field with Type= Currency.
1. Navigate to Customization > Lists, Records, & Fields > Transaction Body Fields > New.
2. Give it a name (e.g. Currency field (custom))
3. On Type= Currency.
4. Store Value= T
5. On Applies To tab, set Sale= T
6. Click Save.

II. Add a custom element on the Transaction Form PDF Layout.
1. Navigate to Customization > Forms > Transaction Form PDF Layout.
2. Click Customize on Standard Transaction Layout.
3. Click Add Custom Element.
4. On the Element Text field, add the SQL Formula below.

5. Click OK
Note: Place the custom element where you want it to show on the PDF Layout.

6. Click Save

- The user should now be able to see currency symbol right next to the custom field on the printed transaction using layout type= PDF.

Japan > How can customers using Japan edition able to write checks if they wanted to?

In US edition accounts, there is this navigational path in writing checks:
1. Transactions > Bank > Write Checks

In Japan edition accounts, this navigational path has been excluded because ordinary Japanese business transactions do not use checks.
However, this feature can still be used by following the steps below:
1. In the global Search field, enter Write Checks > Click Go button or Select Page: Write Checks
2. If Go button is clicked, click Edit or View link for Write Checks to display the New Check page (If Page: Write Checks is selected, the page for New Check would be displayed immediately)

Provisioning and De-Provisioning a Single Sign On User


Provisioning the Users via SSO

User should have a NetSuite account login and access must be enabled. No additionalrole or permission needs to be added to the user's record.

Once the user logs in to SSO for the first time, it will then be automatically mappedon the account's SSO mapping table.

De-provisioning an SSO User

Create a Support case for users to be deleted on the account's SSO mappingtable. Only an Administrator of a NetSuite account can process this request forsecurity purposes.  
On the Support case, indicate the user's internal id on the NetSuite accountand their user name or email address. 

Support will then process the request, which can take couple of days. Requesterwill be notified once the user has been removed from the SSO mapping table ofthe account.

Using TRIM, LTRIM, and RTRIM for Formula functions

This article gives examples on using some common string functions that can be used for NetSuite search formulas via user interface or script, and on custom formula fields.

TRIM: Removes leading or trailing characters (or both) from a character string

  • Syntax: TRIM([ { { LEADING | TRAILING | BOTH } [ trim_character ]| trim_character}FROM ]trim_source)
  • Examples:
     TRIM('   test   '); //returns 'test'
     TRIM(' '  FROM  '   test   '); //returns 'test'
     TRIM(LEADING '0' FROM '000123');  //returns '123'
     TRIM(TRAILING '1' FROM 'Test1');  //returns 'Test'
     TRIM(BOTH '1' FROM '123Tech111');  //returns '23Test'

LTRIM : Removes all specified characters (on 'set' parameter) from the left side of a string.
If 'set' parameter is omitted, the LTRIM function will remove all trailing spaces on the left from 'char'.

  • Syntax: LTRIM(char [, set ])
  • Examples:
     LTRIM('   test');  //returns 'test'
     LTRIM('000123', '0'); //returns '123'
     LTRIM('123123Test123', '123'); //returns 'Test123'
     LTRIM('abcacccTest', 'abc'); //returns 'Test'

RTRIM: Removes all specified characters from the right side of a string
If 'set' parameter is omitted, the RTRIM function will remove all trailing spaces on the right from 'char'.

  • Syntax:  RTRIM(char [, set ])
  • Examples:
     RTRIM('test   '); //returns 'test'
     RTRIM('test   ', ' '); //returns 'test'
     RTRIM('123000', '0'); //returns '123'
     RTRIM('Test0387', '0123456789');  //returns 'Test'

Customize the vendor sublist of Lot Numbered Assembly Item and Serialized Assembly Item

This article shows how to customize the vendor sublist of Lot Numbered Assembly Item and Serialized Assembly Item.
Customer may require to add field(s) on the vendor sublist of the item record or hide a field.
To add field on the sublist, there are two requirements: a custom entity field and a script.
A custom record is needed to store the information that is being entered on the vendor sublist of the item record. The script set/sgets the value of the custom field from/to the sublist, and create the column on the sublist as well.

Create a custom record that will store the values of the custom fields. Please see the image below:

Create the custom record field:
     Customization > Lists, Records & Fields> Record Types > New 
     Label: (name of custom record)
     Id: _multi_vendor_fields
     Follow other settings shown in the image above.

Create fields in custom record:
    Click the New Field button to create custom field that will link the custom record and item record
    Label: Item
    ID: _item
    Type: List/Record
    List/Record: Item
    Store Value: checked
    Click the New Field button to create custom field that will link the custom record and vendor record
    Label: Vendor
    ID: _vendor
    Type: List/Record
    List/Record: Vendor
    Store Value: checked
    Click the New Field button to create custom field that will store the value of the custom field.
    Label: (name of the field)
    ID: _custom_field_1
    Type:  Free-Form Text (you can choose any type depending on the requirement)
    Store Value: checked

Create the user event script:
   Customization > Scripting > Scripts > New > User Event
   Enter information needed:
   Name: (name of your script)
   Scripts > Script File: (upload the script below)
           > Before Load Function: beforeLoad 
           > After Submit Function: afterSubmit
   Deployements > Applies To: (choose the item record you require customize the vendor sublist).
                  Deployed: Yes
                  Status: Released

var mvfid;

function beforeLoad(){

function afterSubmit(){
var vendors = nlapiGetLineItemCount('itemvendor'); 
    var itemid = nlapiGetRecordId();

    for (var i = 0; vendors != null && i < vendors; i++) {
        var vendorid = nlapiGetLineItemValue('itemvendor','vendor',i+1);
        var customfield = nlapiGetLineItemValue('itemvendor','custpagecustom',i+1);    

        if (checkMVF(itemid, vendorid)){
            var rec = nlapiCreateRecord('customrecord_multi_vendor_fields');
            rec.setFieldValue('custrecord_item', itemid);
            rec.setFieldValue('custrecord_vendor', vendorid);
            rec.setFieldValue('custrecord_custom_field_1', customfield);

function addField(){
    var sublist = form.getSubList('itemvendor');
    sublist.addField('custpagecustom','text','Custom Field');
    var vendors = nlapiGetLineItemCount('itemvendor');
    var itemid = nlapiGetRecordId();

    for (var i = 0; vendors != null && i < vendors; i++) {
        var vendorid = nlapiGetLineItemValue('itemvendor','vendor',i+1);

        if (checkMVF(itemid, vendorid)) {
            var customfield = nlapiLookupField('customrecord_multi_vendor_fields',mvfid,'custrecord_custom_field_1');

function hideSubtlist() { 

function disableField(){

function checkMVF(item, vendor){
    var itemFilters = new Array();
    itemFilters[0] = new nlobjSearchFilter('custrecord_item', null, 'is', item);
    itemFilters[1] = new nlobjSearchFilter('custrecord_vendor', null, 'is', vendor);
    var itemColumns = new Array();
    itemColumns[0] = new nlobjSearchColumn('internalid', null, null);
    var searchresults = nlapiSearchRecord('customrecord_multi_vendor_fields', null, itemFilters, itemColumns);

    if (numRows(searchresults) > 0) {
        mvfid = searchresults[0].getValue('internalid');
        return true;
        return false;

function numRows(obj){
    var ctr = 0;

    for (var k in obj){
        if (obj.hasOwnProperty(k)){
    return ctr;

Fixed Assets>Transactions>Asset Disposal - select Asset Id/Name throws pop up message - Make sure that the Write Off, Disposal, Depreciation, and Asset Accounts have been set and active before proceeding. Disposal may not be possible

Problem:  Fixed Assets>Transactions>Asset Disposal - select Asset Id/Name throws pop up message - Make sure that the Write Off, Disposal, Depreciation, and Asset Accounts have been set and active before proceeding. Disposal may not be possible for the following: (Asset ID - Asset Name)


1.  Navigate to Fixed Assets > Lists > Assets 
2.  View the fixed assets record to be disposed 
3.  Click on Accounts tab
4.  Fill in the following fields:

Write Off Account 
Write Down Account 
Disposal Cost Account 
Asset Account
Depreciation Account
Depreciation Charge Account 

5.  Click Save 

Once the fields have been completed filled proceed to dispose the asset.  The warning message would no longer appear.

Generic Payment : Postive Pay Feature - Payments > Checks > Postive Pay

Generic Payment : Postive Pay Feature - Payments > Checks > Postive Pay

Positive Pay is basically just a reporting feature:  it doesn't create any payments. The principle behind it is that when user send to the bank a list of cheques they have issued. The bank then references this list when they receive a cheque for payment to ensure that the details on the cheque match those that were printed on it when it was issued.

This is a requirement for fraud detection at most US banks and in some other countries. The PP feature basically uses a bank file template to output the information on the cheques within the specified number range.

The feature is benign in that the user cannot initiate payments using it.

Purpose of the Tax Summary within the sales transactions and the related Tax Law that is the basis of the feature

  • The Tax Code Summary capability was implemented to meet the local tax office requirement that Tax Amounts be displayed in the currency of the subsidiary (country for which the tax is being collected) rather than in the currency of the transaction itself. It is suggested to remove the Tax Code Summary selection if this is undesirable in a particular case and utilize the form customization and PDF generation capabilities to implement an alternate presentation.
  • The pertinent tax laws are the following:


Section 5.1 states the following:

5.1 What details must I include on a VAT invoice?
You must show the following details on any VAT invoices you issue:


a sequential number based on one or more series which uniquely identifies the document

the time of the supply

the date of issue of the document (where different to the time of supply)

the name, address and VAT registration number of the supplier

the name and address of the person to whom the goods or services are supplied

a description sufficient to identify the goods or services supplied

for each description, the quantity of the goods or the extent of the services, and the rate of VAT and the amount payable, excluding VAT, expressed in any currency

the gross total amount payable, excluding VAT, expressed in any currency

the rate of any cash discount offered

the total amount of VAT chargeable, expressed in sterling

the unit price

the reason for any zero rate of exemption.



Section 3.4 states:

3.4 Must all the amounts on my invoices be expressed in sterling?
No. You may express the amounts in any currency. But you must express the total amount of VAT due in sterling where there is a positive rate of VAT due in the UK.





Show Parent Department/Class/Location Name together with the child Department/Class/Location name on Expense Allocation Schedule Destination Tab


Edit the Child department name and include the Parent Department's name or initials.

1. Parent = Department A
Child = Sales

2. Parent = Parent B
Child = Sales

on Transactions > Financial > Create Allocation Schedules > Destination tab the child department will show as
1. Sales
2. Sales

If we edit the Child department name (Setup > Company > Department > Edit the Child Department)

1. Child = Department A : Sales

2. Child = Department B : Sales

on Transactions > Financial > Create Allocation Schedules > Destination tab the child department will show as
1. Department A : Sales
2. Department B : Sales


Reset Thermal Printer LP2844 to the Factory Default Values

Thermal printers stores setting that affects how shipping label prints. Sometimes, resetting the printer solves some of the problems so as to start with a clean slate. Normally, you can reset thermal printer by just turning it "Off" then "On". However, some settings that reside in the printer memory are not reset. In this case user may need to reset the printer to the factory defaults.

Here are the steps:

Note: It is required that you have setup your thermal printer first before proceeding with the steps below. See help topic "Printing Integrated Shipping Labels With a Thermal Printer"

1. Open a Notepad. 
2. Type in: 

3. Click save. 
4. Name it as Resetprinter.epl2 
5. Make sure to select "All" in the file types field. 
6. Click save button. 
7. Run this via the associated label.bat file by double clicking it.

This file will send the necessary command to the printer to reset it to factory defaults.

Purchase and Sales By Tax Code Reports throw "Report Execution Error" if VAT/GST Amount Reaches Ten Billion (10,000,000,000.00)

Error is happening to the following saved reports included in the International Tax Reports bundle (ID=14864) :

  •   Purchase By Tax Code (Summary) 
  •   Sales by Tax Code (Detail) 
  •   Sales By Tax Code (Summary) 
  •   Purchase By Tax Code (Detail)

The reports above are saved reports included in the International Tax Reports bundle (ID=14864) 

This occurs if the VAT/GST amount reaches 10,000,000,000.00 the report errors with "Report Execution Error: NetSuite has encountered an error while generating your report. Please click here to notify support." The error log shows "value larger than specified precision allowed for this column". This kind of transaction is most probably entered by mistake. It is very unlikely that a transaction tax will amount to more than ten billion.

To resolve, user needs to search for all transactions where tax amount reaches 10,000,000,000.00 and correct the amount

To create the Saved Search:

1. Navigate to Lists > Search > Saved Searches > New > Transaction   
2. Include these filters under the Criteria tab > Standard subtab:
Posting is true  
Account is any of VAT on Purchases, VAT on Sales, xVAT on Purchases  
Amount is greater than or equal to 10000000000.00
3. Include these fields under the Results tab > Columns subtab:
  • Date
  • Number
  • Name 
  • Amount

4. Preview

Once user has identified all the affected transactions, he can then correct the tax amounts.

Note: This is addressed by enhancement 214243  

Customize a Saved Search Which Automatically Sends Email Alert to Sales Reps When New Sales Order Are Entered

Sales reps regularly monitors newly created orders that are entered under their name. This allows them to respond to their customer's order on a timely basis and also be updated on their sales standing.

To create a saved search email alert which automatically sends an email alert to sales rep for newly sales order created, follow the steps below:

1. Go to Lists > Search > Saved Searches > New > Transactions .
2. Include these filters under the Criteria tab > Standard sub tab:
  • Type is Sales Order   
  • Main Line is true   
  • Date is within today 

3. Include these fields under the Results tab > Columns sub tab:
  • Number                 
  • Name                 
  • Amount 

* These fields will show in the email message. You can add more fields as desired

4. Under the Email Tab mark the Send Email Alerts When Records are Created/Updated checkbox 
5. Go to the Specific Recipients tab and add an employee name where the email copies will be sent (optional)
6. Go to the Recipients from Results tab and add Sales Rep field
7. Go to the Customize Message tab, set the following:

  • From: "John Doe" <> (This represents the From Address for the Emails Alert. Please follow the strictly format including the "" and <> marks. If this field is blank, emails are sent from the email address defined as the From Address for Search Emails at Setup > Company > Printing, Fax & Email Preferences, on the Email subtab)
  • Subject: New Sales Order Submitted Email Alert  

8. In the body of the message, you can follow the template below or create your own based on it:

Dear {salesrep},

A new sales order was created for {name}. Please see the details below:


* The {results} tag will return the search result in the message body.

9. Save

Now, whenever a new sales order is entered, NetSuite will send an email alert to the assigned sales rep.

Unable to Grant Access to International VAT/GST Saved Reports (Related Scripts are Missing)

After installing the International Tax Reports bundle, access to scripts for VAT/GST Saved Reports are not automatically granted to all roles, especially the custom ones. The article Creating or Customizing Roles to Use the International Tax Reports provides the steps on how to include custom roles in the Audience tab of the scripts. However, some customers are not able to grant access to these scripts because it does not show in the Script Deployments page (Customization > Scripting > Script Deployments).

To resolve this:

I. Clear the browser's cache files. This ensures that the page has current data after installing the bundle. 

II. If the scripts do not show still, check if the Server SuiteScript feature is enabled. This is because these scripts are Suitelets which are considered to be "server side" SuiteScripts:
1. Navigate to Setup > Company > Enable Features.
2. Under SuiteCloud tab > SuiteScript section, mark the Server SuiteScript checkbox.
3. Click Save.

Change the logo that is used in the subscription management email sent to customers


1.    Navigate to Setup > Web Site > Set Up Web Site

2.    Click Edit on the Primary Web Site

3.    On Appearance tab > change the logo on the Web Site Logo field

4.    Click Save button


The solution provided above will also affect the Web Site Logo.

Issue 153007: Campaign: Send an opt in message > the logo in the email received by the customer is the logo in the primary webstore