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

    NetSuite Client Script pulling credit card information

    I have a client side script that I'm trying to get to access the ccnumber field on transactions. I'm using nlapiGetFieldValue('ccnumber') which pulls the number with everything but the last 4 digits hidden. I have been searching the developers guide…
    kayduh
    • 308
    • 1
    • 5
    • 22
    2
    votes
    2 answers

    How get fist set of thousand records and next set of thousand records using for loop in Netsuite 'N/search Module'

    I want to process first set of thousand records and then next set of thousand records from the search results obtained from the Search Results . i'm getting the first set of thousand records using the method available in suitescript 2.0…
    Deepan Murugan
    • 721
    • 2
    • 19
    • 41
    2
    votes
    2 answers

    First Date and Last date in current month in javascript

    var firstDay = new Date(date.getFullYear(), date.getMonth(), 1); var lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0); Can Somebody please explain this code why we give 1 in firstDay and in and +1,0 in the lastDay What it will…
    ashbaq1
    • 45
    • 1
    • 8
    2
    votes
    3 answers

    How to Reschedule the Schedule Script in Netsuite using SuiteScript 2.0 version

    I want to reschedule the schedule script , when the schedule script usage before hitting the governor limits. schedule script in Netsuite has 10,000 units. In SuiteScript 1.0 version, rescheduling is acheived by "nlapiScheduleScript() api " but in…
    Deepan Murugan
    • 721
    • 2
    • 19
    • 41
    2
    votes
    2 answers

    Suitescript Loading item records from Multiple Select Field

    What I have is a multiple select field that has a list of items that our customers' use. Some of our customers are using different hardware under the same category. I have a field in the Customer page which is a multiple select field and I am…
    Nathan Gill
    • 23
    • 1
    • 3
    2
    votes
    1 answer

    Including custom modules in SuiteScript 2.0

    I am trying to reference a custom user module in a SS2.0 index script like so: /** * @NApiVersion 2.x * @NScriptType Restlet */ define([ 'N/record', 'N/error', "SuiteScripts/MyFolder/src/My_Controller", 'N/crypto', Which works fine in sandbox.…
    Coldstar
    • 1,324
    • 1
    • 12
    • 32
    2
    votes
    2 answers

    Custom function in suitelet's client script for SuiteScript 2.0

    I am using NetSuite's SuiteScript 2.0 & currently I am working on Suitelet Forms. I have a case in which I am adding a button on my Suitelet form by using Form.addButton({id:'search',label:'Search',functionName:'customSubmit'}); I have attached a…
    Mohit Kumar
    • 51
    • 1
    • 5
    2
    votes
    1 answer

    NetSuite - updating external Id issue

    I tried updating the external Id on a customer record as I had set that value with the incorrect ID. However, upon an import it fails with the error message - This entity already exists. Are we not able to update external IDs?
    MG2016
    • 289
    • 6
    • 32
    2
    votes
    1 answer

    How to know meaning of parameter in NetSuite

    I'm new to SuiteScript but gonna built script. I loaded record which internal id is 'item fulfillment' and then using getField function tried to output result of 'shipstatus' field. I know shipstatus is standard field NetSuite supports. It outputs…
    Jin
    • 924
    • 1
    • 9
    • 34
    2
    votes
    2 answers

    What is the SuiteScript 2.0 equivalent to nlapiXMLToPDF()

    Does anyone know where I can find documentation on the SuiteScript 2.0 version of the nlapiXMLToPDF() command? It's not in the Help Center at all as far as I can tell
    Coldstar
    • 1,324
    • 1
    • 12
    • 32
    2
    votes
    2 answers

    How to create a Customer Refund for a customer with Credit Memos?

    When I create a new Customer Refund with a selected Customer, I now get an error of INVALID_KEY_OR_REF Invalid paymentmethod reference key VISA. This code use to work before the latest 2016 R1 upgrade. // create the Customer Refund record …
    Russ Petersen
    • 765
    • 1
    • 9
    • 29
    2
    votes
    1 answer

    How to save a reference value to another record in NetSuite

    I've created a custom Transaction Body Field named "Created From" of type List/Record - Transaction That I want to be have like the native NetSuite Created From fields. I have added this custom field to the Customer Refund form and when entering…
    Russ Petersen
    • 765
    • 1
    • 9
    • 29
    2
    votes
    4 answers

    netsuite transform a sales order to cash sale

    I'm trying to transform a sales order in netsuite to a cash sale using nlapiTransformRecord. According to the docs this should be posible as it is an allowed transform, but I can find no examples of this specific transform anywhere. Here's an…
    ceridian
    • 51
    • 1
    • 5
    2
    votes
    1 answer

    Netsuite - Set line item value for department

    I am trying to make custom mass update on netsuite with JS script but its not working. Code: function updateDepartment(rec_type, rec_id) { var transaction = nlapiLoadRecord(rec_type, rec_id); transaction.setLineItemValue ('item','department',…
    2
    votes
    2 answers

    Suitescript to return a the vendor prices for a selected item

    Good evening all, and Merry Christmas!! I feel like I'm bumping my ass at the sky on this... I know the vendor prices for each item are in a sublist under each item, but I can't for the life of me figure our how to retrieve said information. I've…
    Steve Reeder
    • 980
    • 16
    • 42