Salesforce Integration with Nodejs based applications using Canvas

How to use Canvas Signed Request Authentication with web based applications like Nodejs & how to use Canvas LifeCycle Handler Class

Salesforce provides many ways to integrate with external systems like SOAP, Rest, Bulk API, User Interface API and so on. One of useful way to integrate any existing web applications with Salesforce is using Canvas.

For sake of this post, I’m using Nodejs application and complete source code can be found here , on my Github repository. It can be deployed on Heroku easily, however I used my local computer to run canvas. That also proves point that integration is happening via Browser and therefore canvas application can be hosted on premise and not necessarily on DMZ layer.

Step 1 : Create Connected App in Salesforce

Enable OAuth in Connected app and provide any Callback URL. Canvas app does not use callback URL however we DO NEED scope.

Next step would be enabling canvas app itself connected app along with locations where we would be using it.

Continue reading “Salesforce Integration with Nodejs based applications using Canvas”

Why to use Bower for your web developement

Author posted by Jitendra on Posted on under category Categories Node.js, Web Technology and tagged as Tags , , with 2 Comments on Why to use Bower for your web developement

What is Bower
It is client side package Manager and Great tool to manage all you web dependencies like JavaScript libraries and other assets.

Bower
Bower

What can be done from Bower
Web sites are made of lots of things — frameworks, libraries, assets, utilities, and rainbows. Bower manages all these things for you.

# registered package
$ bower install jquery

# GitHub shorthand – download repository SOQLBuilder from user Jitendra on Git
$ bower install JitendraZaa/SOQLBuilder

# Git endpoint
$ bower install git://github.com/user/package.git

# URL
$ bower install http://somewebsiteURL.com/script.js

Continue reading “Why to use Bower for your web developement”

How to use PostgreSQL in Nodejs

Author posted by Jitendra on Posted on under category Categories Node.js, Web Technology and tagged as Tags , , , , , with 11 Comments on How to use PostgreSQL in Nodejs

I have written many articles on Node.js and AngularJs. In this article, I will demonstrate how to use PostgreSQL with Node.js and deploy on Heroku. I think you already smelled that this is one of starting article which will finally merged with Salesforce to create some cool application.

Assuming you already have some background knowledge on Node.js and Heroku, If not please visit previous articles of this blog or my Slideshare account. Using Angularjs is totally optional and you can use library like JQuery or plain JavaScript.

To connect PostgreSQL, we need “pg” module.

PostgreSQL in Node.js
PostgreSQL in Node.js

Continue reading “How to use PostgreSQL in Nodejs”

Dreamforce 2014 Session – create web based IDE for Salesforce

In Dreamforce 2014, I got chance to present demo of creating online IDE for Salesforce using Tooling API. I used Node.js as a language to communicate with Salesforce API on Heroku Platform.

Demo

  1. Simple Editor

Complete source code (Github)

  1. Simple Editor
  2. Editor with Ace framework

Dont forget to share your feedback.

Below is the presentation slide I used

Creating Salesforce Query Builder in Node.js and AngularJs using Salesforce REST API and OAuth2 with Heroku Button

In this post, we will be creating a Salesforce Query (SOQL) Builder. It uses Google’s Angularjs MVC Javascript library and REST API provided by Salesforce. For Authentication, it uses OAuth2.

Node.js is used as a primary language and hosted on Heroku. If you want to directly deploy to your Heroku Account, You can use Heroku Button on this Git Repository.

We have many tools available online for Query builder, However none of them were satisfying me so though to create my own tool.

This Node.js application is used for building SOQL with following features :

  • Toggle between API name and Label Name
  • Search Objects or Fileds needs to build SOQL (In my case, it was primitive. I had more than 70 Objects and many of those objects has 300+ fields)
  • Checkboxes to select fields (No need to hold control button to select multiple fields)
  • Automatic Query Builder at Right side of page
  • Shows API count used by application
  • Search returned records
  • Sorting on Table Headers
  • Pagination

Note : You will need to create “Connected App” in Salesforce to allow OAuth as explained in this post.

Live Demo of application

Continue reading “Creating Salesforce Query Builder in Node.js and AngularJs using Salesforce REST API and OAuth2 with Heroku Button”

Create Node.js Application using Eclipse and deploy to Heroku – Video Tutorial

In Below video, I have explained how to create basic Node.js application in Eclipse with help of Egit and Heroku plugin and deploy to Heroku.

Please read below two articles, to get familiar of Plugins and how to setup :

  1. Salesforce + Git + Eclipse + EGIT = Better and Distributed Source Control
  2. Creating First Application in Heroku using Eclipse

Continue reading “Create Node.js Application using Eclipse and deploy to Heroku – Video Tutorial”