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

NSOA

by rmorrissey23 ALL

No description provided

Details

Installs

  • Total 118
  • Win 74
  • Mac 29
  • Linux 15
Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 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 1 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.