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

    Editing exising file in SuiteScript 2.0

    I want to load an existing file and append some data, save it back. Tried following in SuiteScript 2.0. But following code still gives me old file content ( only first line when it was created !). Whats wrong? var fileObj = file.load({ …
    FreeMarker12
    • 115
    • 1
    • 10
    2
    votes
    1 answer

    Netsuite User Event Script: Not all user event types firing

    We have a user event script attached to a sales order in NetSuite, however we are noticing that only the context.UserEventType.CREATE is being called. EDIT, COPY and the others DO NOT catch the sales order manipulations as per spec. Can anyone…
    Coldstar
    • 1,324
    • 1
    • 12
    • 32
    2
    votes
    2 answers

    Find a string in netsuite, and print it

    In netsuite suitescript 1.0, I want to check whether a string has a set of keywords. In javascript there is function called as .includes("Set_of_keywords_to_be_searched"); I tried .includes in netsuite but its giving error. Eg: var str = "Hello…
    Galdiator
    • 117
    • 4
    • 14
    2
    votes
    1 answer

    Suitelet with multiple lists

    I am trying to create a Suitelet to display multiple sets of data. I will have 2 saved searches that I want to just display the results like 2 separate windows on one page. I know that you can display results by using response.writePage(list) where…
    TMann
    • 751
    • 2
    • 11
    • 33
    2
    votes
    1 answer

    Netsuite API Taking long time to response

    i try to getting records based on recordtype and index. Request: {"recordtype":"customer","gu_action":"get_all","size":1000,"index":0} Its Works fine. But Api taking 4-5 minitues to response for every api call. Any idea how to reduce this time? My…
    2
    votes
    2 answers

    Netsuite way to get [currency] from Account table

    Is there any way to get [currency] field from Account table in Netsuite? From record browser both Search Filters and Search Column doesnt included [currency] field. I need to get the [currency] field from bank type account to do some logic. Please…
    Ah Son
    • 75
    • 13
    2
    votes
    2 answers

    How to get contacts associated in a company if the Contact record has empty Company field in NetSuite

    I am creating a script that needs to get the contacts associated to a company. The script needs to work for both Customers and Vendors. You can attach a Contact to a Customer or Vendor from the record screen and by doing this you can attach a…
    Rusty Shackles
    • 2,802
    • 10
    • 11
    2
    votes
    1 answer

    How to set up user to control Saved Search Criteria in NetSuite Suitelet SSv2

    I am trying to set up a Suitelet to give the user the option of adjusting the criteria of a saved search. I have set up search with ID customsearch_ca_export_detail_search__38 and I would like to be able to control the criteria of this search within…
    jdcaliff
    • 143
    • 9
    2
    votes
    1 answer

    I want to create a purchase order after the "approve" button is clicked on a sales order

    I want a purchase order to be generated when a person clicks the approve button on a sales order. I have the script deployed to sales order records and the event type to trigger when the approve button is clicked. However, this code won't create a…
    2
    votes
    2 answers

    Suitescript - How do I access "Related Records" subtab and get/store their associated values?

    I am trying to get the associated values from the related records subtab. For example, I am trying to get the associated bills values (amount billed) on a purchase order. There is no other way to do what I am trying to do besides getting those…
    bluejay92
    • 161
    • 6
    • 21
    2
    votes
    0 answers

    Netsuite Suitelet to mass change group pricing levels for speific group

    Stackoverflow people! This will be my first question here but I have probably viewed your questions or answers within this subject a few times already. Our issue is how hard it is with all the custom pricing we have to change a group of people to a…
    2
    votes
    4 answers

    Is there any way to Disable (or) Remove the Netsuite Standard Edit Button on the View Mode of the Custom Record

    I want to disable (or) Hide the standard "Edit" Button on the View Mode of the Custom Record Type. Instead Of Standard Button i have used custom button to access the edit page of the record to particular users. So i want to disable the standard edit…
    Deepan Murugan
    • 721
    • 2
    • 19
    • 41
    2
    votes
    1 answer

    NetSuite - Date Issues

    My due date returns a date while my current date returns a date and time. I get the error below when trying to call function that needs date/time. How do I construct me due date to include the time? Error: due_date.getTime is not a function var…
    MG2016
    • 289
    • 6
    • 32
    2
    votes
    2 answers

    What's the "official" way to pass variables in SS2.0?

    Run into a kind of silly problem. I want to pass a variable between stages on a map/reduce script. Is it there an "official" or best way to do this (rather than sending it with the returned results). This is my last approach: /** *…
    felipechang
    • 916
    • 6
    • 14
    2
    votes
    2 answers

    SuiteScript 2.0 - set scheduled percentage complete value

    I am trying to convert a script that contains setPercentComplete from nlapiGetContext() function. That allows me to set the percentage complete value. I am not seeing anything in regards to setting this for SuiteScript 2.0 has anyone discovered how…
    Benjamin
    • 429
    • 4
    • 17