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
    3
    votes
    3 answers

    using Underscore in SuiteScript 2

    I am writing a script in SS2 and I ran into doc that stated that I should do the below. I have done this and the paths are right but it doesn't seem to see underscore as it comes back as undefined, when trying to use it. Any help with this would be…
    jk121960
    • 843
    • 14
    • 45
    3
    votes
    1 answer

    Netsuite Transaction Saved Search: Item Join?

    I'm trying to get all of the items associated with a purchase order. I've created the saved search in the UI, but I need to pass the PO's internal ID to get the correct list of items. I tried doing this in suitescript, but I can't find the correct…
    shawleigh17
    • 1,147
    • 4
    • 22
    • 42
    3
    votes
    3 answers

    How to access 'Abbreviation' field of a custom list in NetSuite custom lists

    I have a custom list that is used as a matrix option of Inventory item. Its 'Color'. This custom list has an abbreviation column. I am creating a saved search on item and using Color field(join) and trying to access 'Abbreviation' field of…
    3
    votes
    2 answers

    Enable SuiteScript 2.0 in Netsuite

    When I try to create a new script record in NetSuite, it doesn't allow me to select API Version 2.0. It just says "Select 1.0 Script Type". Do I simply have to put in the SuiteScript 2.0 annotations at the top of a 1.0 script, or is there a setting…
    Noah Hall-Potvin
    • 187
    • 1
    • 10
    3
    votes
    2 answers

    Display of "is not a valid internal id" in Netsuite Suitescript 1.0 when creating a Search on a particular record

    I have created a search in Netsuite using Suitescript 1.0 for searching a particular "Account" using its account number. When I save the following script file, an error is being displayed in "filters[0]" line in the code below, where it says…
    3
    votes
    2 answers

    NetSuite sFtp of files

    Hi I need to use the NetSuite sFtp Capability to create a file from a saved search and ftp'it to another server. I am wondering after the data that is returned how can I create the file and pass it to the FTP object? It will be a form of csv, can I…
    jk121960
    • 843
    • 14
    • 45
    3
    votes
    1 answer

    Performing a Sum or Grouped Query in SuiteScript 2.0

    Can any give a solid example of how to perform a grouped or summed query, ie "How many sales orders has Jane Smith done this month" in suitescript 2.0. The NetSuite Help Center examples and docs for 2.0 are so scattered and half-baked imho. Any help…
    Coldstar
    • 1,324
    • 1
    • 12
    • 32
    3
    votes
    2 answers

    SuiteScript 2 Http requests with Call Back

    Hi I need to interact with an external device to transfer data over http. I know there are limitations on SuiteScript 1, but what about SuiteScript 2? Is there a way to make an HTTP request with payload and call back in 2.0 thanks for your help in…
    jk121960
    • 843
    • 14
    • 45
    3
    votes
    2 answers

    How to perform SubmitFields onto a custom record in SuiteScript 2.0?

    To perform SubmitFields onto standard Netsuite Records (i.e. Purchase Orders) it is something like this: var poId = context.key; var id = record.submitFields({ type: record.Type.PURCHASE_ORDER, id: poId, values: { …
    C.Neal
    • 319
    • 3
    • 12
    3
    votes
    2 answers

    How to Add New Custom record Item in netsuite using webservices?

    I have created a new custom record called "XYZ" and i created all the fields into it. Now i can add new entry on that Custom record using GUI but how do i do similar action using webservices. What methods needs to be summoned to add new item in…
    octopus
    • 155
    • 3
    • 13
    3
    votes
    6 answers

    How do I change a line item of a sales order using SuiteScript 2

    OK, this works in SuiteScript 1, but for some reason I can't get it to work with SuiteScript 2. What am I missing? Client side (on field changed/on line changed) or server side (on submit), I can't alter the lines on a sales order, e.g. set a custom…
    Gordon Truslove
    • 109
    • 1
    • 1
    • 10
    3
    votes
    1 answer

    NetSuite: Getting the shipcity from a salesorder in SuiteScript 2.0

    If I load a sales order using the code below, how do I get the shipcity. Note that if you dump the object (salesOrder) you will see that there is NO shipcity. Whats strange is that shipzip, shipstate and shipcountry have their own fields but…
    Coldstar
    • 1,324
    • 1
    • 12
    • 32
    3
    votes
    2 answers

    Does anyone know where to find a SS2.0 JSDOC definition library?

    Does anyone know or has a JSDOC definition library I can use for SS2.0?? The current one I have for SS1.0 looks like the one below, and I use it to plug into my IDE and get autocompletion. /** * Loads an existing saved search. The saved search could…
    felipechang
    • 916
    • 6
    • 14
    3
    votes
    1 answer

    What is the SuiteScript 2.0 equivalent to nlapiPrintRecord()

    Does anyone know where this method is located in 2.0. If NetSuite would put a link in the 1.0 docs for nlapiPrintRecord() to the 2.0 implementation, I wouldn't have to ask Stack community
    Coldstar
    • 1,324
    • 1
    • 12
    • 32
    3
    votes
    2 answers

    NetSuite: Using SUITESCRIPT 1.0 inside of SUITESCRIPT 2.0

    Is it possible to use SS1.0 inside of a SS2.0 file? Are there some annotations I have to add or is it even possible?
    Coldstar
    • 1,324
    • 1
    • 12
    • 32