2012 in review

The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

600 people reached the top of Mt. Everest in 2012. This blog got about 7,800 views in 2012. If every person who reached the top of Mt. Everest viewed this blog, it would have taken 13 years to get that many views.

Click here to see the complete report.

Netsuite PHP Toolkit Documentation

Recently Netsuite has uploaded the Netsuite PHP Toolkit version 2012_2. This version is very mature compared to its predecessors.

Now the code is distributed in different classes that makes it possible for IDEs and Documentation generators to parse it. So I decided to generate the documentation and upload it so that anyone can view it. So here the link

http://tellsaqib.github.com/NSPHP-Doc/

Hope it helps

New Data Centers for Netsuite Accounts

As of September, 2012 Netsuite has started hosting different accounts to different data centers. That means if you are developing SuitTalk Apps for multiple accounts then you have to make sure that you are using correct URL for these.

These two articles can help you make necessary changes in your code

https://system.netsuite.com/help/helpcenter/en_US/Output/Help/SuiteFlex/SuiteScript/SSScriptTypes_UsingtheRESTrolesServicetoReturnUserAccountRoleandDomain.html

https://system.netsuite.com/help/helpcenter/en_US/Output/Help/SuiteFlex/WebServices/STP_getDataCenterUrls.html

Although Netsuite PHP Toolkit 2012_2 has built-in methods to get the URLs but if you are not using that then below is the Sample PHP class that can be used to access Netsuite Rest Roles Service

class AccountsGrabber {

private $curl;

public function __construct($email, $password) {
 $this->curl = curl_init();
 curl_setopt($this->curl, CURLOPT_HTTPHEADER, array(
 'Authorization: NLAuth nlauth_email=' . $email . ', nlauth_signature=' . $password
 ));
 }

public function __destruct() {
 curl_close($this->curl);
 }

public function getAccounts() {
 $url = 'https://system.netsuite.com/rest/roles';
 curl_setopt($this->curl, CURLOPT_URL, $url);
 curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, TRUE);
 $result = curl_exec($this->curl);

return json_decode($result);
 }
 }

New features added to Suitecoder

If there were an Olympic coding event, I have no doubt that I would be representing my country in it :)

Jokes apart, lately I had been working to add certain useful features to suitecoder and today these features have been made live.  I really hope that these features would make life easier for all the suite-coders around.

Below is list of new features added

File History

Many suitecoder users asked for SVN feature so that they can view the file Revisions.  So now whenever you save your file using suitecoder a copy is stored that you can view/compare with your current version.

File History (SVN) Feature

Enhanced Intellisense

Intellisense Example 1

Intellisense Example 2

Intellisense is enhanced so that you will be having a minimum need to consult to Netsuite Documentation. Standard parameters that are provided to Netsuite are now a part of intellisense.

Other features

  • Now pressing Control-S within the editor saves the file. No need to click the Save button every time.
  • Each revision history can be labelled so that you can easily find revisions.
  • Latest version of Code mirror is used.

You can view the complete list of features here.

Netsuite API Explorer

Good things come in small packages. Netsuite API Explorer is one of those good things (I hope so :) )

Being a part of Suite-Coder, API Explorer helps Netsuite Developers to get used to Netsuite API.  As the Netsuite API is very extensive so you may use it as a quick reference guide. It will really help you in the developing Suite scripts.

Don’t believe me? Check yourself https://suitecoder.appspot.com/static/api.html

Intellisense in SuiteCoder

I hope you have previously heard of SuiteCoder. It’s an online Code Editor where you can edit your Netsuite Files.

Yesterday I have released a new patch of the app with few minor enhancements and an exciting new feature, INTELLISENSE. Yes now you don’t have to type all the common JavaScript function names, your local variables or Netsuite API Functions when editing your code on SuiteCoder. just press “Control-Space” keys to get the intellisense options.

So please go ahead and explore the new world of Coding For the Cloud in the Cloud. 

Good aspects of Netsuite Development

Netsuite woes, frustrated, difficult, Poorly documented. These are the words we commonly see on Netsuite development related forums and posts. But there are aspects of Netsuite Development which are very incredible. In this post I will highlight few of those.

Client Side Scripting

Most of the SuiteScript API functions are available on client side that means we can run the same code both on server-side and client side. There are whole programming languages relying on this feature. This feature also gives the ability to test and debug server side code on your browsers.

As you can see in the image below, I have opened a Edit Customer page and in Firebug Console I can access the current Customer through functions like nlapiGetFieldValue. Also I can use functions like nlapiSearchRecord to test the code in the browser console.

NS Console

Transaction Handling

Programatically handling the Transaction is very awesome.  All the line items of a transaction can be accessed as separate transactions. Different type of transactions (Sales Orders, Cash Sales or Cash Refunds) can be accessed separately or can be accessed at the same time as transactions.

Field Customization

We can add custom fields to Netsuite entities/transactions at almost any level and these custom fields will be shown/handled in the same ways as the original fields.

Follow

Get every new post delivered to your Inbox.