Beruflich Dokumente
Kultur Dokumente
Pre-Class
Setup Guide
©2000 - 2011 NetSuite Inc.
Any reproduction or distribution of any part of this document without the prior
written permission of NetSuite Inc. is strictly prohibited.
NetSuite Inc.
2955 Campus Drive, Suite 100
San Mateo, CA. 99403-2511
Module 00
Configure your Development Environment
Scenario Install the Eclipse IDE for JavaScript Web Developers, v3.6 or
higher.
Note: The training class uses Eclipse as the IDE for developing
SuiteScript; but as a participant, you’re not limited to using Eclipse.
The only requirement for developing JavaScripts is a text editor, so
even Notepad will work. We strongly recommend though that you
use Eclipse if you’re not too experienced with developing JavaScripts.
The instructions contained in this document include installation of
Aptana and NetSuite plug-ins for Eclipse, enhancing your script
development productivity.
You can also use an older copy of Eclipse (prior to v3.6), but take
note the Aptana plug-in works best on v3.6 or higher.
Duration 15 – 25 minutes
Note: Eclipse needs a Java runtime environment (JRE) to run. If your computer
doesn’t have a JRE yet, go to the Free Java Download page
http://www.java.com/getjava/ and install it.
Note: You need to download either the 32-bit or 64-bit version, depending of
your Windows system. If you’re not sure what version you need, go to
the Windows System Properties to check. Links to the Linux and Mac
versions are available if you click on the Details link or the version
Exercises Page 3
name. This could also be available on the dropdown menu beside the
Eclipse version number.
3. Click on the green download icon or the server name to initiate the download.
4. Save the zip file to a temporary directory. The file is more than 100MB, so it may
take a while depending on your internet connection.
5. Unzip the file into your desired location. It is suggested that you unzip the file to
the root directory of your C drive (Windows). A folder named eclipse is created
wherever you extract the zip.
The Aptana Studio 2 plug-in enhances your JavaScript development experience with
Eclipse by adding features such as code completion, syntax highlighting, code
formatting, etc.
Page 4 SuiteScript
7. The first time you start Eclipse, you are prompted to set a workspace directory.
You can keep the default or change to some other directory.
8. Running Eclipse for the first time displays the Welcome tab.
Exercises Page 5
9. Go to Help then click on Install New Software…
11. On the Add Repository window, type in the plug-in Name and Location then
click OK.
Name : Aptana Studio 2
Location : http://download.aptana.com/tools/studio/plugin/install/studio
Page 6 SuiteScript
12. On the Install window, select Aptana Studio and click Next.
Note: It may take several minutes for the system to move to the next step.
13. Keep clicking Next until the software starts to install. Click I accept when
prompted to review the user license.
Exercises Page 7
14. In case you are prompted for a security warning, click OK.
The NetSuite plugin is used to immediately upload a script file to the file cabinet
without the need to login to the NetSuite application. Though not required, this helps
make development faster.
Note: The steps in installing Eclipse plug-ins are the same; the only thing that
changes is the name and the Repository URL.
18. On the Add Repository window, type in the plug-in Name and Location:
Name : NetSuite
Location : http://suitesource.netsuite.com/site/NetSuiteEclipsePlug-in/site.xml
Page 8 SuiteScript
20. Keep clicking Next until the software starts to install. Click I accept when
prompted to review the user license.
Installing the NetSuite plugin also automatically adds the SuiteScript API file to Aptana
(used for code completion), but downloading the latest file from NetSuite makes sure
that it’s updated.
22. Download the latest SuiteScript API (nlapihandler.js) from
https://system.netsuite.com/app/common/scripting/nlapihandler.nl?downloadapi=T.
Note: This link does not require you to be logged into a NetSuite account.
If you have access to a NetSuite account prior to class, you can access the same
file by navigating to the File Cabinet (Documents > Files > File Cabinet) and
Exercises Page 9
selecting SuiteScript API:
26. Click on the References view, then click on the Global References section to
expand it.
Page 10 SuiteScript
Exercises Page 11
27. Click on the green plus icon and select the SuiteScript API file that you’ve just
downloaded.
Page 12 SuiteScript
Note: If you installed the NetSuite plug-in before you updated the SuiteScript
API file, you will see a SuiteScript Library entry. Uncheck this as this
may be an older version of the SuiteScript API.
1. Netbeans IDE
NetBeans is a full-fledged IDE similar to Eclipse with versions for Linux and Mac.
There is no NetSuite plugin for Netbeans though.
For more information about Netbeans, visit
http://netbeans.org/features/javascript/.
3. Notepad++
Unlike Eclipse and Netbeans, Notepad++ is not an IDE but an advanced text
editor. The advantage of using Notepad++ is that it’s light and perfect for doing
quick changes to the script. There’s even a portable version that you could put
on your USB flash disk and run anywhere.
Exercises Page 13
00 - 02: Setting up a Client-Side Debugger
Note: You don’t need to install all the debuggers, only the
debuggers for the browsers you’ll be using during the training.
Duration 5 – 10 minutes
1. Open up your Firefox browser and go to the Tools menu then click on Add-
ons.
2. In the Add-ons window, click on the Get Add-ons and type Firebug in the
search box. Hit the enter key to perform the search.
3. Select Firebug and click on the Add to Firefox… button to install it.
Page 14 SuiteScript
Note: FlashFirebug in the above screenshot is not the correct add-on!
Note: If Firebug is not the top option, then check if it’s already installed on your
browser by clicking on the Extensions option on the top part of the window
then checking if Firebug is already listed. If it’s not yet installed, go back to
the Get Add-ons section and click the See all results or Browse All Add-
ons links to download it from the Mozilla Add-ons webpage.
Exercises Page 15
5. Restart Firefox when prompted.
6. If the installation was successful, the Firebug icon should appear on the lower
right hand corner of your Firefox browser.
8. Click on the down arrow beside the Script tab then select Enabled.
Note: This is true of Internet Explorer 8 and later versions. Internet Explorer 7
and earlier versions requires a separate download, and the debugger differs from the
following instructions.
Page 16 SuiteScript
Note: The webpage you’re debugging needs to be refreshed for the debugger to
catch the running scripts.
Chrome also has a built-in debugger that’s ported to the bottom of the browser,
similar to Firebug.
1. Click on the wrench icon on the upper right hand corner of the browser. Navigate
to Tools then click on Developer tools.
Exercises Page 17
2. Click on the Scripts tab to view the loaded scripts.
Safari also has a built in JavaScript debugger that can be launch from the Develop
menu. It’s also ported to the bottom of the browser and looks very similar to the
Chrome Developer tools.
1. Enable the Develop menu by clicking the gear icon on the upper right hand
corner of the browser and selecting Preferences.
Page 18 SuiteScript
2. In the Preferences window, navigate to the Advanced tab then enable the
Show Develop menu in menu bar option.
3. Navigate to the Develop menu and click on the Start Debugging JavaScript
option.
NOTE: If the menu options don’t appear, try pressing the <Alt> key.
Exercises Page 19
4. Click on the Scripts tab to view the loaded scripts.
Page 20 SuiteScript