Questions tagged [suitescript2.0]

SuiteScript 2.0 is the second version of the NetSuite SuiteScript API. SuiteScript 2.0 and SuiteScript 1.0 coexist at the moment, but cannot be used within the same script.

API Reference

991 questions
2
votes
2 answers

SuiteScript 2.0 file.load method does not accept relative path of a .xml file

I have developed a Suitlet script that, in particular, loads an .xml file for further processing using the file.load method with an absolute path. I want to use a relative path, but when I do so, it won't work. Basically, I'm providing the file.load…
2
votes
1 answer

Id field throwing INVALID_FLD_VALUE in SuiteScript

When creating a new sales order in Suitescript and setting a sublist value for item, an error of INVALID_FLD_VALUE is thrown. The value I'm passing is the internal id for the item, I have tried with multiple items' internal ids, both with and…
Bsharp
  • 41
  • 1
  • 6
2
votes
1 answer

N/query column definition

I'm trying to get transaction data using the N/query module: require([ 'N/query'], function(query) { var trxQuery = query.create({ type: query.Type.TRANSACTION }); trxQuery.columns = [ trxQuery.createColumn({ fieldId:…
Ava Lon
  • 31
  • 4
2
votes
1 answer

Get the shipping and billing address of a customer in SuiteScript

I am trying to get the default shipping and billing addresses for a customer in SuiteScript. var shipaddress = null; var billaddress = null; //Find the default billing and shipping addresses var add_Count =…
Tom Hanson
  • 873
  • 10
  • 39
2
votes
1 answer

RCRD_DSNT_EXIST while creating user event script with aftersubmit function

I'm trying to write a user event script which loads the current record and populates a line item value through search after submit record. But, it is giving an error RCRD_DSNT_EXIST, even though the record exists. function afterSubmit_SO(type){ …
2
votes
1 answer

How do I render an N/ui/message banner into a form from the server side?

I have a suitelet which displays a form created with N/ui/serverWidget, and I'd like to display a message at the top of the form. However, all of the N/ui/message documentation says that it is for client-side scripting only. Is there a way to…
Wolfgang
  • 3,470
  • 1
  • 20
  • 36
2
votes
2 answers

Netsuite USAGE_LIMIT_EXCEEDED error on suitelet

I have created a suitelet script in which the line items in assembly build are set in the suitelet multiplied by quantity. i.e. if there is quantity 2 then two lines will be setting in suitelet for that item. suitelet opens by clicking save. The…
Saurabh More
  • 383
  • 4
  • 25
2
votes
1 answer

Is there any way of printing Check boxes in Advanced PDF? (i mean the checkboxes itself not its value)

I want to make an advanced PDF printout in NetSuite. I want to print checkboxes (checked and unchecked) based on the values they have. I have no issue with the conditions, its just how to print the check box on Advanced pdf Printout?
4N335
  • 267
  • 2
  • 29
2
votes
1 answer

SuiteScript 2.0 search filters are throwing an UNEXPECTED _ERROR

I am trying to match a mobile number and/or email number to a customer file. I have created a function to do this for me. When I add the filters to the search I get an UNEXPECTED_ERROR thrown. function getCustomerByMobilePhoneAndOrEmail(mobile,…
Tom Hanson
  • 873
  • 10
  • 39
2
votes
1 answer

Is it possible to print the line number with JavaScript to Console or Execution Log on NetSuite?

While debugging, I would check the Execution Log on NetSuite. I uses log.debug('title', 'message') format to show log. Can the line number which the error happens be also logged? Thus we can easily know where the error is. Thanks.
skyline
  • 443
  • 9
  • 31
2
votes
2 answers

How can I use relative module path for client script by @NAmdConfig? SuiteScript 2.0

I would like to load non-AMD modules (jQuery and blockUI) using @NAmdConfig for client script, but my code occurs error in browser. Uncaught Error: Module does not exist: ../../lib/jquery-blockUI.js If I use absolute path instead of relative path,…
Kenji
  • 76
  • 8
2
votes
1 answer

Changing the email body for transactions sent as a PDF attachment

When a Sales Order is emailed to a customer with Email Preference set to PDF, the body of the email reads: Please open the attached file to view your Sales Order. To view the attachment, you first need the free Adobe Acrobat Reader. If you don't…
Badger
  • 301
  • 3
  • 15
2
votes
1 answer

How to write TypeScript SuiteScripts?

If one wanted to write SuiteScript 2.0 using TypeScript, would it need to be transpiled to ES5 to work in Netsuite? Does anyone know what the best options are if SuiteScripts need to be written in TypeScript? Is there an npm module for such a…
J.J.
  • 1,128
  • 2
  • 23
  • 62
2
votes
0 answers

How to generate GUID automatically in Suitescript

How to generate GUID automatically in my suitelet(which is used for encryption & decryption). Currently i am calling another suitelet manually by opening the link , which has a form to generate GUID and then i manually harcoded that value in my…
hem
  • 195
  • 1
  • 15
2
votes
1 answer

Netsuite: how to add a custom link to the Nav Bar or Header

Is there any way to customize the Nav Bar or the Header to have a custom link? The use-case is that I have a JIRA issue collector that is driven by javascript. I would like the user to provide feedback from the page they are having issues.…
gillyspy
  • 1,578
  • 8
  • 14