Sunday 28 August 2016

Printing a Sales Order

To print a single sales order:
1.     Go to Transactions > Sales > Enter Sales Orders (Administrator).
2.     On the Sales Order page, complete the information as appropriate.
3.     Click Save & Print.
NetSuite opens the printout for your sales order in an Adobe application document.
4.     Click the printer button in the Adobe application frame.
5.     If you wish to print multiple copies, specify the number on the print message that appears.
6.     Click OK.
You can also print sales orders by going to Transactions > Sales > Enter Sales Orders > List (Administrator) . On the Sales Orders page, click Print next to the sales order you want to print.
If you enter multiple sales orders before printing, you can print all the sales orders at once. Check the To Be Printed box on each transaction you enter.
To print multiple sales orders:
1.     Go to Transactions > Management > Print Checks and Forms (Administrator).
2.     On the Print Checks and Forms page, click Sales Orders.
3.     In the Form field, choose the transaction form you want to use to print these orders.
4.     Check the Allow Reprinting box to be able to reprint previously printed transactions.
When you check this box, all documents appear at the bottom of the page in segments.
5.     Check the box in the Print column by each sales order you want to print.
6.     Click Print.
If you have not enabled the Download PDF Files preference on the Set Preferences page, a preview of your sales orders pops up in the default Adobe application.
If you have enabled the Download PDF Files preference, you must first save your sales orders and then open them with the Adobe application.
7.     Click the printer button in the Adobe application frame.
8.     If you want to print multiple copies, specify the number on the print message that appears.
9.     Click OK.​


Saturday 27 August 2016

Create a Standard Netsuite Record Using Restlet API

Create a RESTlet with the following piece of code.

// Create a standard NetSuite record
function createRecord(datain)
{
    var err = new Object();
   
    // Validate if mandatory record type is set in the request
    if (!datain.recordtype)
    {
        err.status = "failed";
        err.message= "missing recordtype";
        return err;
    }
   
    var record = nlapiCreateRecord(datain.recordtype);
   
    for (var fieldname in datain)
    {
     if (datain.hasOwnProperty(fieldname))
     {
         if (fieldname != 'recordtype' && fieldname != 'id')
         {
             var value = datain[fieldname];
             // ignore other type of parameters​
             if (value && typeof value != 'object') 
             {
                 record.setFieldValue(fieldname, value);
             }
         }
     }
    }
    var recordId = nlapiSubmitRecord(record);
    nlapiLogExecution('DEBUG','id='+recordId);
   
    // returns the created record in JSON format​
     var nlobj = nlapiLoadRecord(datain.recordtype,recordId);
    return nlobj;
}​

 Step 1 : Upload the script
















Step2 : Deploy the script

















































Remember to put the status to released if you want to access the end point externally. If you're in test mode then select "Testing" as the status. In "Testing mode" your API can't be accessed  outside. You also has to select the "Role" and "Employee" in order to give them to access your API.

Step 3 : Endpoint Generation








Step4 : How to access this API

    url = 'https://rest.na1.netsuite.com/app/site/hosting/restlet.nl?script=166&deploy=2'
    authorization = 'NLAuth nlauth_account=111111,nlauth_email=email@email.com,nlauth_signature=password,nlauth_role=correctRole' 
    req = urllib.request.Request(url)
    req.add_header('Authorization', authorization)
    req.add_header('Content-Type','application/xml')
    req.add_header('Accept','application/json')  
    // call the end point with appropriate playload with above headers in a POST call

Saturday 13 August 2016

How to use JQuery in Netsuite

All organizations have their unique need and everyone wants to implement something different, thus where customization comes in to picture.
Netsuite allows not only to leverage the core functionality of CRM & ERP but much more with customization.
 jQuery is included by default on all NetSuite pages.You can access it in any Client scriptbut it is not available for server-side scripts. Note that you have to reference it using jQuery instead of $.
 e.g.  jQuery('#myElementId').hide();
If your intended Jquery function isn't available in Netsuite then you can make a reference to the CDN/Filecabinet, where you have physically place your library scripts.

​​For Client/Serverside use :

In the 'OnPageInit' function, we are first adding the 'jquery.min.js' (google CDN) and then we are using 'setTimeout' method for doing a time out of few seconds before adding the 2nd script.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function OnPageInit() 
{ 
    AddJavascript('http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js', 'head'); 
    var t = setTimeout("AddJavascript('https://system.netsuite.com/core/media/media.nl?id=253&c=TSTDRV896291&h=c3fc87f394f396552e09&_xt=.js', 'body')", 3000); 
    AddStyle('https://system.netsuite.com/core/media/media.nl?id=254&c=TSTDRV896291&h=50d488b82c3c3ed7263c&_xt=.css', 'head'); 
} 

function AddJavascript(jsname, pos) 
{ 
    var tag = document.getElementsByTagName(pos)[0]; 
    var addScript = document.createElement('script'); 
    addScript.setAttribute('type', 'text/javascript'); 
    addScript.setAttribute('src', jsname); 
    tag.appendChild(addScript); 
} 

function AddStyle(cssLink, pos) 
{ 
    var tag = document.getElementsByTagName(pos)[0]; 
    var addLink = document.createElement('link'); 
    addLink.setAttribute('type', 'text/css'); 
    addLink.setAttribute('rel', 'stylesheet'); 
    addLink.setAttribute('href', cssLink); 
    tag.appendChild(addLink); 
}



This is because, when the page gets loaded it will first download the 'jquery.min.js' script might take some time, for this reason when the second script 'jquery.alert.js' gets loadedit might show 'jquery undefined' error. To avoid this we can use the 'setTimeout' to delay the adding of the 'jquery.alert.js' script in the page's DOM. After that the CSS is also added to it. In this code we have hosted the 'jquery.alert.js' and 'jquery.alert.css' in the Netsuite's 'File Cabinet' folder.

Friday 5 August 2016

Netsuite Customization

Well, all organizations have their unique need and everyone wants to implement something different, thus where customizations comes in to picture.
Netsuite allows not only to leverage the core functionality of CRM & ERP but much more with customization.

Object level customization :
  • Lists & Fields :  These all are basically comes under object level customization. Lists allows you to create a list of values that you can use by attaching to anyof the record and it will be appear as a dropdown with your created set of list values in that record.
          e.g : Say, I want a list of product category to group different items based on category.
          T-shirts,Hoodies,Shirts,Trousers etc.
  • Fields : Customizing fields basically refers to creating fields on an existing record thus allocating some place to store your data for which NetSuite does not provide a native field type.
e.g : Say, I have a vendor and he wants to display his T&C in the webstore on the T&C page.   Since NetSuite does not provide a native storage for storing this information, we could  create a custom field of some type (depends on requirement) that would store with each vendor to accommodate his T&C.

Form level customization :
Forms are basically the UI interface in NetSuite where you enter and access data in more generic and user-friendly way. You can customize how your forms should look like, in what order your fields should appear on your forms. You also can group fields on the form to modularize it and there are lots more you can achieve.

e.g: Creating several customer forms, so that one form could be used by your sales department to quickly enter the customer data they have, and another form could be used by your marketing department to gather extra data about customers and make marketing decisions, with each form having a layout that is specifically customized to accomplish the primary goal of the users who use that form.

Record level customization :
Record customazation allows to capture your unique bussiness requirement for which Netsuite doesn't provide any interface. You can create fields, customize forms and you can have total control over your custom record.

e.g: Say, You're implementing an Employee Leave management in Netsuite. You can create a custom record and define certain fields which can accomodate your business requirement.

Or say, you want to maintain a log for your script execution details. You can create a custom record with specific field types to cater your business needs.

Mass Updates:
Mass updates allows you to perform a large number of updates across a set of records in an easily time saving manner. Mass updates can be run as a onetime event or can be run on a recurring schedule.
Imports and Exports:
Imports & Exports are not new in data management, it is the primary way of data exchange in many business systems. In Netsuite, this data can range from employees, customers, and vendors lists, to lists of transactions and journal entries, to imports of custom records. The file will need to be in a CSV (comma separated values) format, and you will have to use NetSuite’s import tool to perform the import by specifying the correct mappings for the appropriate fields.

Integrations:
Many times a business needs to integrate with another external business systems to achieve its functional requirements. Netsuite integrations provides a flexible solution for multi tenant cloud based on premise data exchange between multiple cloud based systems such as Salesforce, Magento, Wordpress, Outlook,Bedrock data and many more. For integration between two external system/application Netsuite offers different methods. The first is SOAP(XML based approach) and the second one is REST(Restlet Netsuite version of server side Javascript). These are both web standards, and are both widely supported.

Workflows: 
Netsuite Workflow or Suiteflow enables you to automate the way of the application behaviour. Earlier, administrators had to use SuiteScript to provide automation in Netsuite(Before Workflow). Workflow can give you an appropriate way to set up complicated workflows with a graphical interface.

This can allow you to set up various workflows for different activities, like subscription updates. Workflow can also allow users establish reminders, customer notifications, tasks and sales processes (follow up tasks, mandatory data entry, rep notifications) and customer support processes (inactivity reminders, service level agreement enforcement and escalations).

The new graphical interface can easily automate almost every process. Another excellent feature while building a workflow is the Release Status field. This is visible on the Workflow Definition Page. With this Netsuite Workflow feature, you can define whether you want workflow to run in released mode, testing mode or not run.

When a workflow is just in testing mode, it will only run when the workflow owner allows it to run. In such cases, there won’t be any interruptions. A user can even use the Execution Log to notice certain actions and transitions which can or can not be executed during the run of the workflow.

Some of the key benefits of NetSuite Workflow are below:

Boost System Performance
Suiteflow has been popular for context multi-select feature. It can be used to stipulate different conditions under which the user should execute an action. For example, if the user creates a customer record, workflow used to perform this action may also print the copy for the sale rep’s files or send an email to the sales rep.
On the other hand, if the user is importing a batch containing over 100,000 customer records with a CSV import tool, he may not want the workflow to generate an email or print copies. With context multi-select from workflow, you can easily stipulate appropriate conditions under which certain actions need to be taken. It allows unnecessary workload on the network and servers.

Save Time
Workflow condition builder can be very useful in making individual workflows very useful in multiple situations. For example, instead of constructing many different workflows for submission of expense reports to various department heads, only one workflow can be used with multi-select conditions. The workflow would automatically choose the right approve on the basis of department or some other criteria.

Faster Troubleshooting
The logging tool includes more details like action parameters, events triggered, results of condition evaluations and more. Even when you’ve disabled logging, the errors will still be logged to provide extensive information on workflow execution. Both developers and business analysts troubleshoot with log viewer.

Build Reusable Workflows
With Netsuite Workflow, users can easily create individual workflows which can be reused whenever required. In other words, you can also avoid creating one huge workflow with many duplicate processes. This tool also makes sure workflow components can be matched and mixed. Therefore, a single workflow component can be easily used by various other record types and workflow actions.
In order to make processes more efficient and productive, Netsuite Workflow can be one of the best tools for a business organization.

SuiteScript: 
SuiteScript is the NetSuite platform specfic 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.

Bundles:
Bundles are basically a way of packaging set of customized objects,scripts and forms,so that one can install it into some other NetSuite account. If you want some logic  be executed as part of bundle installation and/or update, you can write a installation script. A bundle installation script can contain triggers to be executed before install, after install, before update, and after update.

Netsuite Functional Areas

When it comes to NetSuite, there are numerous functional areas of the system, and an entire article could easily be written about each one, I will only cover each of them at a high level here. If you would like to learn more about any of these areas you can check out the Where to go from here article in this series.

Accounting:  Since NetSuite started out as an accounting system it has strong and highly evolved support for accounting and inventory management. Almost anything you could want to do with accounting and inventory management is supported with NetSuite, though sometimes it may be supported in different ways than in legacy accounting systems. The more adaptable your business is to a modified business process, the easier it will be to use the NetSuite native way to perform accounting functions rather than what you may be used to. The most specific example I can think of is the chart of accounts. Rather than using a traditional numbering system (which you can still use if you really must), the recommendation is to segment accounts by department and class, and though many companies do still use account numbering, it is not a necessity. There are also functions that NetSuite can perform but only in the upper level editions or with add-on modules. A couple of examples of this are Multi-Book Accounting which is available only when you have the Advanced Accounting module, and the use of subsidiaries or multiple legal entities which is available only in OneWorld, NetSuite’s highest level product.

Reports, Saved Searches and Dashboards:  The center point of having one integrated system, such as NetSuite, is being able to get meaningful information from the data you put into the system allowing you to make data driven business decisions. NetSuite provides several methods to access the data you have put in the system. Inside of NetSuite those methods are Reports, Saved Searches and Dashboards. Saved Searches and Reports are often confused in NetSuite, and perform similar functions; however Reports typically support a larger number of ways to edit the aesthetics of the way the data looks, whereas Saved Searches are generally better when dealing with data that you want to export. Though they both support the ability to export data and customize the view, there are different ways you do this in each. Reports and saved searches also differ in the data they expose, as there are times when fields are not available in one but are in the other. When you first login to NetSuite you will notice a dashboard that is made up of portlets, which are windows into various data views. These data views are created in a number of ways, including from reports, saved searched, key performance indicators, RSS/Atom data feeds, and even custom scripts among other methods; meaning that you can use your dashboard to get a good view of your business and your world if it is setup correctly. In fact in my experience the dashboard is one of the most commonly overlooked areas of NetSuite that could be very powerful but is never really implemented that way.

Procurement:  NetSuite has full support for purchasing and procurement, and the full purchasing process including purchase orders and a built in or custom purchase order approval process. That being said, the built in purchase order approval process is limited, and setting up a custom approval process can be complex and time consuming depending on what you are looking to do, though this tends to be the case with a lot of the customization of NetSuite. In addition to managing procurement NetSuite can also manage vendors and those vendor relationships, including such things as the terms you get with the vendor and any other custom information you want it to by adding custom fields.

Customer Relationship Management:  For many ERP systems, CRM or Customer Relationship Management has always been a sort of Achilles heel. Those systems can do almost, but not quite, everything, including the critical task of managing relationships with new or potential customers. Well the good news is that NetSuite does not have that problem. It actually has very robust CRM capabilities, and they flow through almost every area of the system. CRM in general though is not something where a one size fits all approach works, and while the out of the box NetSuite CRM is adequate, it is not really what I would call great and in some areas is barely what I would call good. For this reason you should count on customizing the CRM platform and this will take some time and planning, how much time and planning really depends on what you want to do, and how complex your business processes are. Sales and Service which are also a part of CRM are actually pretty good out of the box, generally however they will also need some customization. There is a lot you can customize with them, though this is typically a case where less is more and the less customization you can do and get the system working the way you want it the better off you will be. This is true for most but not all organizations though. Also the customization you need to do to make the sales and service portions of the system work will largely be covered when you perform your implementation with your implementation consultants.

Marketing:  Marketing and marketing automation does exist in NetSuite, but it is probably a little more limited than what a marketing manager will be used to. You can customize the system to deliver a lot more in terms of marketing automation, but it will take time and effort. Still there are some unique things that can be done with an integrated system that would be much more difficult in a non-integrated one. Some examples include being able to see a true ROI (Return on Investment) for marketing campaigns that can be reported on in real time, and being able to correlate marketing email or drip marketing campaigns with website hits; though the second example assumes that you have put come customizations in and use a NetSuite powered website.

Project Management:  In the last few years NetSuite as a company has made tremendous progress with the NetSuite platform to allow for better management of projects inside the system. Those projects can now be managed natively, and they look and feel similar to Microsoft Project. This is sufficient for many businesses; however for companies who are entirely project based there may be some functionality that is lacking. These companies however tend to use a separate system for project management alone and that system in many cases can be setup to integrate with NetSuite. There are also add-ons that can help with some project management functionality such as Open Air. Of course with this project management comes task management, and those tasks can be linked to projects, or can stand alone. Tasks can be, and generally are, linked to customers, or support requests or other records in NetSuite allowing management a better view of where their employees’ time is being spent.

Human Resources:  NetSuite has support for Employee Records and data that would traditionally be kept in an HRIS (Human Resources Information System), though this area typically must be customized to function the way most companies want it to. The small customizations tend to be adding data fields, where the largest customizations have to do with security of the data. In NetSuite the Administrator role and whoever has this administrator role has the ability to access anything and everything. There is a lesser administrator role that can be used titled the System Administrator; however this role generally must be customized before it is used. There are ways that you can control access even with the Administrator role such as using two factor authentication though and this is generally enough since one person may have the role, but does not have a security token as that is held by someone else in the business. There are also third parties with software that can perform HRIS and integrate with NetSuite, including NetSuite’s own TribeHR. Even if you do not use NetSuite as your HRIS having all of your employees listed in NetSuite is a good idea since it is those employees who are then used to create user accounts, and since you can still do things such as create organizational charts with the SuiteOrg add on bundle.

Website and Ecommerce:  If you are using NetSuite to manage your inventory, your price lists, your accounting and other pieces of your business it makes sense to use it as your web store as well; this way when customers browse your site they immediately see what is available and when they place an order your accounting and fulfillment teams immediately see it. NetSuite offers many capabilities to use the system as your web store, however it is typically more difficult to configure and somewhat more limited than other web store and shopping cart systems such as Magento or WordPress with the correct plug-ins. Much like everything else in NetSuite you will need to weigh the benefits and costs for yourself to determine if it’s worth it to use this part of the system. I can say from personal and professional experience that the website and web store are two of the pieces of NetSuite that are often not used due to a number of reasons ranging from a business that already has a web administrator who does not want to change or lose his or her job, to a business that just likes how things already work and do not want to make changes, to a business that has complexities in their website that cannot be duplicated using NetSuite, to many others. Making a decision not to use NetSuite to power your website and ecommerce is not necessarily a bad idea, but you should at least know the component is there.

File and Document Storage:  NetSuite offers a file cabinet and document storage, but I can say right off the bat that this is one of the more limited areas of the system. The default amount of space that you are provided with for your entire company is typically only 10GB, so only slightly more than what you get from Dropbox, Google or OneDrive (formerly SkyDrive) for free. Adding additional storage is expensive as well, and there are no benefits such as file versioning. Without resorting to third party applications or programming something yourself, the web interface and email are the only ways to upload files, though there is a free bundle you can install that allows for drag and drop uploads. The file system in the file cabinet operates pretty much the way you would expect it to, it is a nested tree structure similar to the Windows, Mac or Linux file systems. Documents can be associated to other records in the system and that can be pretty powerful if used correctly, and documents can be shared in the system. These last two are actually the only reason I can see to use the file cabinet in NetSuite at all, other than for storage of information NetSuite needs such as images for a NetSuite hosted website. The business reasons for storing documents in NetSuite tend to present themselves after implementation though, for example you may want to store customer contracts with customers. While the file cabinet is limited, it and NetSuite were never meant to store your companies’ general documents or replace other systems such as shared drives or Dropbox.

Custom Data:  Almost every company in existence creates some type of custom information, and NetSuite’s extensibility is great at handling this. You can create custom fields to hold pieces of information in NetSuite, but you can also create entire custom records which are comprised of many custom fields which allow you to track all sorts of information that is either specific to your company or that the NetSuite designers never even thought of. You can also write scripts and workflows around these records to allow actions to happen deterministically for the records, thus automating business processes. One example I can think of that I have done in the past is creating records to allow tracking of contracts for a legal department in a business. Not only can you store a copy of the contract in NetSuite, but you can track key information such as who is affected by the contract and when the contract expires, and can take action based on that information such as sending email to the people affected several months before the contract expires. This example is actually not incredibly complex to setup though it does require some programming skill. Overall the ability to easily extend the system is one of the most powerful features of NetSuite.

Integrations:  NetSuite also can integrate with a number of other systems as well, meaning that the NetSuite system is extensible. One key example is the ability to use a small Outlook add-on from NetSuite to connect email, contacts, tasks and calendaring from Microsoft Outlook to NetSuite. This add-on is not perfect though and is client based so there is some administration required, but it is at least given no charge. Another example is the ability to purchase and use the ODBC connector for NetSuite which allows a one way data export from NetSuite, where the data can be moved into other database systems or even Excel. Lastly there are a few standards based connections to move data into and out of NetSuite, those are SOAP and REST. Keep in mind to use the API’s you will need experience in system integration so this is not something a typical power user or even administrator can do, but it is good to know these areas exist.

Of course this list of areas in the system is not all inclusive, though it does cover the major pieces.  NetSuite is also adding functionality on a regular basis which is currently twice a year based on their version release schedule. NetSuite also has enough market traction that a cottage industry has been built up around the system and there are add-ons for many types of business processes. These add-on modules either provide functionality that does not exist in NetSuite, replace functionality that is already in NetSuite with better functionality, or provide extended functionality for what NetSuite can already do. Some modules are simple to install, and take no more than a few hours, and some modules take weeks or months to install, configure, learn and begin to use correctly, but the fact that the system is so easily extensible should provide some level or assurance to businesses looking to use NetSuite


Tuesday 2 August 2016

Working with SuiteCloud IDE

1. Logging in to a Project Account from SuiteCloud IDE

You can log in to a project account directly from SuiteCloud IDE
To log in to a Poject Account:

  • Launch SuiteCloud IDE
  • Right-click a file or a project in the NS Explorer pane and select Netsuite > Log in to Project Account
A browser opens the Choose Role page of the NetSuite account associated with the file or project.

2. Changing Poject Settings in SuiteCloud IDE

You can change the settings of a project such as accounts, roles, SuiteScript version, and file cabinet folders.
 To change Project settings :
  1. Launch SuiteCloud IDE
  2. Right-click a project in the NS Explorer pane, and select Netsuite > Change Project Settings to open the change Project Settings window.
  3. Select an Account
  4. Select a Role
  5. Select a SuiteScript Version the SuiteScript version determines the libraries used for code completion and code validation
  6. Select a File Cabinet Folder
  7. Click OK


While working with Netsuite it is very essential to have a good vocabulary of the Netsuite Schema structure and Netsuite Object Internal Ids. Below link provides the complete Netsuite Schema Object details and Record internal id.

Netsuite Record Browser