ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

NSOA

by rmorrissey23 ALL

No description provided

Details

Installs

  • Total 115
  • Win 74
  • Mac 28
  • Linux 13
Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 29 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
bitbucket.​org

sublime-nsoa-user-scripting

A Sublime Text package containing helpful tools for NetSuite OpenAir User Scripting.

New in this Release

Version 2.0 of the NSOA User Scripting package includes some major enhancements, including the ability to generate auto-completions directly from your account specific WSDL URL, as well as a handy right-click context menu for viewing and pasting API object fields directly from your WSDL. Lastly, you can open PDF documentation guides quickly from the command palette, right-click context menu, or the Tools > NSOA menu.

Installation

Package Control

You can install this package using Package Control from wbond.net.

  • Press ctrl+shift+p (Windows/Linux) or command+shift+p (OS X) to bring up the Command Palette (or use Tools > Command Palette menu)
  • Type to search for the Package Control: Install Package command
  • Search packages for NSOA and hit enter to install
  • NOTE: You may need to restart in order to use this package

Manual

Clone or download the contents of this repo into your Sublime Text Packages folder.

  • OS X: ~/Library/Application\ Support/Sublime\ Text\ 3/Packages
  • Windows: %APPDATA%\Sublime Text 3\Packages
  • Linux: ~/.config/sublime-text-3/Packages

After Installing…

After installing this package, make sure you configure your User settings file. The most important piece of this is to set your server and port settings, which are used to create the generic WSDL URL. If unset, the package will fall back on the production server WSDL URL (Note: if you develop on QA or sandbox, this may mean that your WSDL data will not contain the most recent API objects and fields).

{
    // This should hold the server you are connecting to.
    // Valid options are: "production", "sandbox", "demo", "qa"
    "server": "",

    // This optionally holds the port used to connect to
    // the above server (e.g. 1443).
    "port": ""
}

What's Included

Screenshots

Quick Tour: Commands

nsoa_commands.gif

Quick Tour: Completions

nsoa_completions.gif

Quick Tour: Account-Specific WSDL

nsoa_account.gif

Quick Tour: Context Menu

nsoa_context.gif

Theme: Centurion

Color Scheme: Tomorrow Night

Font: Source Code Pro

Syntaxes

  • JavaScript (NSOA)

Commands

  • NSOA: Load Generic WSDL
  • NSOA: Load Account-Specific WSDL
  • NSOA: Open Quick Reference Card
  • NSOA: Open SOAP API Guide
  • NSOA: Open User Scripting Guide
  • NSOA: Remove All WSDL Data

Completions (Default)

  • NSOA.context
    • remainingTime
    • remainingUnits
    • isTestMode
  • NSOA.form
    • error
    • getAllValues
    • getLabel
    • getValue
    • getOldRecord
    • getNewRecord
  • NSOA.meta
    • alert
    • log
    • log-debug
    • log-error
    • log-fatal
    • log-info
    • log-trace
    • log-warning
  • NSOA.wsapi
    • add
    • delete
    • disableFilterSet
    • modify
    • read
    • upsert
    • whoami
    • enableLog
    • remainingTime

Snippets

// attribute
{
    name: "${1:limit}",
    value: "${2:100}"
}

// function
function ${1:useCamelCase}(type) {
    try {

        $0

    } catch(e) {
        NSOA.meta.log('error', 'Try/catch error: ' + e);
    }
}

// header
/**
 * Copyright NetSuite, Inc. 2014 All rights reserved.
 * The following code is a demo prototype. Due to time constraints of a demo,
 * the code may contain bugs, may not accurately reflect user requirements
 * and may not be the best approach. Actual implementation should not reuse
 * this code without due verification.
 *
 * ${2:Short description of script file}
 *
 * Version    Date            Author           Remarks
 * 1.00       ${1:@date }     Ryan Morrissey
 *
 */


// read_error_check
function readErrorCheck(readResult) {
    if (!readResult || !readResult[0]) {
        NSOA.meta.log('error', 'No read objects returned.');
        return;
    } else if (readResult[0].errors !== null && readResult[0].errors.length > 0) {
        readResult[0].errors.forEach(function(err) {
            var fullError = err.code + ' - ' + err.comment + ' ' + err.text;
            NSOA.meta.log('error', 'Error: ' + fullError);
        });
        return;
    } else {
        return readResult;
    }
}

// read_request
{
    type       : "${1}",
    method     : "${2:equal to}",
    fields     : "${3}",
    attributes : [${4}],
    objects    : [${5}]
}

// update_error_check
function updateErrorCheck(updateResult) {
    if (!updateResult || !updateResult[0]) {
        NSOA.meta.log('error', 'No update objects returned.');
        return;
    } else if (updateResult[0].errors !== null && updateResult[0].errors.length > 0) {
        updateResult[0].errors.forEach(function(err) {
            var fullError = err.code + ' - ' + err.comment + ' ' + err.text;
            NSOA.meta.log('error', 'Error: ' + fullError);
        });
        return;
    } else {
        return updateResult;
    }
}

License

LICENSE

Changelog

CHANGELOG

Issues

You can log issues from the menu on the left, or by clicking here.