Questions tagged [suitescript]

SuiteScript is a JavaScript-based API that gives developers the ability to extend NetSuite beyond the capabilities provided through SuiteBuilder point-and-click customization.

SuiteScript is the NetSuite platform built on JavaScript that enables complete customization and automation of business processes. Using the SuiteScript APIs, core business records and user information can be accessed and manipulated via scripts that are executed at pre-defined events. For example, field change, form submit, before read, before write, or Web requests. They can also be scheduled to run at specific times.

SuiteScript is comprised of several components enabling the most useful customization in SaaS:

  • Suitelets — Extensions to SuiteScript let you build a custom interface that is hosted within the NetSuite framework. Suitelets allow for completely custom HTML, Flash or NetSuite-based front-end development that can be build from scratch or by leveraging revolutionary SuiteScript UI Objects. Suitelets can also serve as the back-end for external HTML interfaces, providing complete flexibility in developing application extensions to NetSuite.

  • SuiteScript UI Objects — Serve as extensions which let you build a custom interface that runs invisibly within the NetSuite framework.

  • Portlet SuiteScript — Scripted Dashboard portlets allow for listing of any NetSuite content on the Dashboard or inclusion of external data-feeds via RSS, HTML or Flash, as well as Web 2.0 mashups (e.g. instant messaging, maps, blogs, more) via embedded Inline HTML fields, or iFrames.

  • Scheduled SuiteScript — Facilitates business process customization via JavaScript extensions and allow for records to be processed as a scheduled batch to automate workflows such as re-assignment of stale leads, drip-marketing or scheduling of collection calls based on days overdue.

  • User Event SuiteScript — SuiteScript can be used to enforce data validation and business rules. User Event SuiteScripts are triggered as users work with records and data changes in NetSuite as they open, edit or save records.

  • Client SuiteScript — Field-level calculations, alerts and business logic are facilitated by SuiteScripts which run within the user's browser as they work with data and records within NetSuite. Additionally Server SuiteScript APIs can be invoked via the Client SuiteScript code to apply business logic beyond a single record.
  • 1434 questions
    4
    votes
    1 answer

    Create a custom library module in SuitScript 2.0?

    I am trying to create a custom profiler library to load into my SuiteScript 2.0 scripts. Its path is /SuiteScripts/profiler.js and my Suitelet is in /SuiteScripts/suitelet.js Here how I am trying to load it into my…
    4
    votes
    1 answer

    SuiteCloud IDE Validator Ignore List

    In the SuiteCloud Eclipse IDE for NetSuite, what is the Ignore List setting under Preferences > NetSuite > Validation? Is it a single file that behaves like, say, a .gitignore? Or is it an explicit list of files to ignore? I suspect this setting is…
    erictgrubaugh
    • 8,519
    • 1
    • 20
    • 28
    4
    votes
    4 answers

    Script Execution Instruction Count Exceeded error in Netsuite

    I have a schedule script which does some calculation and update custom header field on a Sales Orders, which runs every 30 mins. With the increase number of order's in Netsuite, I started receiving error saying "An unexpected error has…
    Vijay Joshi
    • 90
    • 1
    • 6
    4
    votes
    1 answer

    Netsuite Suitescript API - Searching Transaction records returns duplicates

    I am attempting a basic search query of the 'transaction' records (I have also attempted this with 'salesorder' with similar results). The query has no filters, and requests only the internalid as a search column, but for some reason the results…
    Chris Barcroft
    • 562
    • 5
    • 12
    4
    votes
    3 answers

    How to set NetSuite system date in the future or past for testing?

    Is it possible to temporarily change the system date in NetSuite for purposes of testing date triggered scripts? If not is there a way to overload all NetSuite date functions so that a future or past date could be simulated for a given user in the…
    Rich Bianco
    • 4,141
    • 3
    • 29
    • 48
    3
    votes
    2 answers

    "nlapiTriggerWorkflow" is not defined - Oracle Netsuite

    I tried to trigger a workflow programatically, nlapiTriggerWorkflow(recType, recId, workflowId, actionId, stateId) But I am getting, "nlapiTriggerWorkflow" is not defined both in console and in script debugger. Why do I get this error?
    3
    votes
    0 answers

    Can anyone suggest a workflow maintaining Netsuite SDF with Git VCS?

    We are trying to incorporate Netsuite SDF with Git. Do we have any standard process flow for this? We need to find the best practices which streamlines the below actions -> Creation & Maintaining Netsuite SDF project with multiple…
    3
    votes
    1 answer

    How to Select value By SuiteQL That I can filter Multiple Select Field

    I had one simple table ItemMapping, 2 Field, one Field is single Item List Field SingleSelectField With value "A", Other for Multiple Item List Field MultiSelectField with Value ("B", "C", "D"). I Wanna get This mapping relationship By "B", I tried…
    Tyrion Huang
    • 71
    • 1
    • 12
    3
    votes
    2 answers

    Is it possible to use Node.js in NetSuite/SuiteScript?

    I am wondering if it is possible to reference node modules in SuiteScript. For example, I am aware that I can create a third party library in the file cabinet and reference the moment.js file. However, is it possible to do an npm install moment on…
    3
    votes
    2 answers

    How do you select line items to fulfill when transforming a netsuite sales order to fulfillment?

    Trying to transform a NetSuite sales order using var fulfillment = record.transform({ fromType: record.Type.SALES_ORDER, fromId: currentRecord.id, toType: record.Type.ITEM_FULFILLMENT, isDynamic: true }); getting the error…
    drewski
    • 33
    • 1
    • 3
    3
    votes
    6 answers

    SuiteScript 2.0: How can I update the externalID through Script

    I'm trying to create a script file on NetSuite using SuiteScript 2.0 to update the External Id of the classification records. For some reason, NetSuite updates all fields but externalId. I want to create this script to update the externalIds because…
    3
    votes
    0 answers

    Password custom field type (nlapiEncrypt)

    I've created a custom field password and would like to prompt a user to input their password for certain files. In Suitescript 1.0 encrypting a password is easy as nlapiEncrypt(pass, 'sha1');. But for Suitescript 2.0 the closest I could get to a…
    MarthaF
    • 187
    • 2
    • 17
    3
    votes
    3 answers

    How do I connect to an external API using Suitescript?

    I am trying to use Suitescript to connect to a MediaWiki API. I can't seem to find any examples specific to NetSuite. I understand the concept but I don't know what methods to use specifically. I am developing a RESTlet.
    Arie White
    • 43
    • 1
    • 3
    3
    votes
    1 answer

    How to justify Arabic Text in Advanced PDF(HTML)?

    i have made an Arabic printout in Advanced PDF, the text printing is not JUSTIFIED. var tb4 = '' tb4 += '' tb4 += '
    ' tb4 += '

    4N335
    • 267
    • 2
    • 29
    3
    votes
    3 answers

    How to convert xml to JSON in suitescript 2.0

    I have an XML response that i want to convert it to JSON, i'm currently usingg XPath var responseNode = xml.XPath.select({ node : xmlDocument, xpath : '//SOAP-ENV:Envelope' …
    1 2
    3
    95 96