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
    2
    votes
    1 answer

    Transform sales order into Fulfillment

    Here's the code I use to transform the sales order to fulfillment. It doesn't seems to work. var objRecord = record.transform({ fromType: record.Type.SALES_ORDER, fromId: newOrder.id, toType:…
    mana
    • 1,075
    • 1
    • 24
    • 43
    2
    votes
    2 answers

    Suitescript 2.0 MapReduce Script

    I am very new to SuiteScript so I might be posting a lot of questions out here and hope you can all help. My first question is why is my saved search not passing values on my MapReduce script? My code is below. function getInputData() { …
    Brad D.
    • 47
    • 1
    • 8
    2
    votes
    1 answer

    Replace existing sublist subrecords in NetSuite SuiteScript 2.0

    I've been wrestling with this for a while now. It may be a bug in NetSuite, but thought I'd consult the SuiteScript ninjas before conceeding to that idea. Here is the scenario: I have a sales order with a line for a lot numbered inventory item that…
    brendonparker
    • 838
    • 8
    • 19
    2
    votes
    3 answers

    How to access Country list in Netsuite?

    I am using SuiteScript 2.0 in Netsuite. The list of countries are available in Setup > Company > Countries. As of current version, I have not found a way to get list of Countries and State/Province drop downs added in custom Suitelets. How Can I…
    balaraman
    • 397
    • 1
    • 7
    • 21
    2
    votes
    2 answers

    Localization in NetSuite suitescript - how do I go about writing my suitelet or client script to support multiple languages?

    How do we handle multi language requirements in our customisation? We can use suitescript API nlapiGetContext().getPreference('language') to retrieve the user preference. My question is - what is the best practice to store the localized…
    Binoy Samuel
    • 144
    • 8
    2
    votes
    3 answers

    How to limit search result in SuiteScript (1 or 2)?

    Is there a way to limit the amount of records returned via SuiteScript? I use the following method, but the search still gets all results. I am breaking out of the iteration of the results if I've hit the max I'd like to return. I can't find…
    ehcanadian
    • 1,738
    • 1
    • 15
    • 23
    2
    votes
    3 answers

    Netsuite Suitescript: How to retrieve records based on last modified date?

    I am trying to retrieve records in Netsuite via SuiteScript. I would like to use the lastmodifieddate column to fetch record after a certain timestamp. I am currently doing: var filters = [new nlobjSearchFilter('lastmodifieddate', null,…
    reggieble
    • 21
    • 1
    • 6
    2
    votes
    2 answers

    Get Sublist row data

    How can I retrieve all data from a form's sublist? Ie, ideally retrieve all rows in the sublist as a array of objects. /** * @NApiVersion 2.x * @NScriptType Suitelet * @NModuleScope SameAccount */ define(['N/ui/serverWidget', …
    sazr
    • 24,984
    • 66
    • 194
    • 362
    2
    votes
    2 answers

    NetSuite SuiteScript Performance Logging

    Are there any logs in NetSuite that provide information regarding SuiteScript performance? For example, when I save a purchase order, I'd like to be able to see all of the SuiteScripts that executed (including SuiteScripts from 3rd party bundles)…
    angrycrab
    • 830
    • 1
    • 9
    • 23
    2
    votes
    1 answer

    How to create a vendorpayment record from a NetSuite 2.0 restlet?

    I'm trying my hand at a 2.0 restlet. This is more or less my first experience with SuiteScript 2.0. I'm trying to create a vendorpayment record. I've been able to create a vendor record without an issue, but when I try with vendorpayment, I get…
    user2233949
    • 2,053
    • 19
    • 22
    2
    votes
    1 answer

    SuiteScript 2 can send pdf statements

    I am having a hard time getting a statement to render in SS2, I had found an answer is SS1 and hadn't used it sometime back but it doesn't seem to work in ss2. I am using the SS2 render.statement method but I am getting an…
    jk121960
    • 843
    • 14
    • 45
    2
    votes
    1 answer

    Issue Searching NetSuite - nlapiSearchRecord

    I am having trouble understanding what this error means. org.mozilla.javascript.EcmaError: ReferenceError: "nlapiSearchRecord" is not defined. (/SuiteScripts/PreventDuplicateCustomer.js#35) I am attempting to create a script which searches for a…
    Coova
    • 1,818
    • 5
    • 36
    • 63
    2
    votes
    2 answers

    How do I decode a BASE64, PCKS-8 representation of a private key in NetSuite or javascript?

    I'm working on a suitescript to integrate NetSuite with the Walmart Marketplace APIs. And, as the another OP here says it right their documentation pretty much says if you don't use Java you're on your own. I'm looking for a way to do the same…
    2
    votes
    1 answer

    What is the 'Primary Information' field group id in NetSuite?

    In my User Event script I am adding a field to the form and I would like to add it to the Primary Information field group. What is the internal id of the group? I've tried primaryinformation but that's not correct. I can't see a method of iterating…
    ehcanadian
    • 1,738
    • 1
    • 15
    • 23
    2
    votes
    1 answer

    Netsuite schedule a saved search and HTTP POST?

    I'm new to Suitescript and Netsuite automation in general. What I want to do is very basic. I want to schedule a saved search to execute every few hours and then post the resultant XML to an HTTP target. I have a bundle that does this for a…