Posts

Showing posts from August, 2014

A Quick Salesforce OAuth 2.0 Usage Demonstration

Image
A little Background :- As we know,now-a-days almost every Enterprise app(specially over web) has implemented OAuth 2.0 security framework.In salesforce development practice , there are integration scenarios with various kinds of applications. eg. Salesforce to linkedIn , Salesforce to Facebook, Salesforce to Twitter, Salesforce to Google, Salesforce to Salesforce, Salesforce to any On Premise Application Integration or other way around. Generally we have to deal with Oauth 2.0 framework. Objective :- I will demonstrate salesforce Oauth 2.0 by connecting two salesforce dev orgs .We will use various authentication flows like web-server,user-agent,username-password etc. Assumptions :- 1. Dev Org 1 is behaving as client application. 2. Dev Org 2 is our lovely salesforce org. 3. OAuth 2.0 framework is a guard here which needs Acess token and it will treat Dev1 Client org in Dev2 Org as guest. Note:- Dev org 1  ultimate goal  is to get acess token to get entry into Dev org

Display Salesforce Records into hierarchical View

Image
Objective:-  Display Salesforce records into hierarchy view. Example:-  Consider an example of a custom object "Product__c" which has a self lookup relationship to itself . Now we have to display all the products in hierarchy View. Here is an example of fictitious Electronic Product Hierarchy . Problem Statement:-  There are two main challanges here. 1.  Salesforce database does not support Hierarchical SOQL queries.  2. Lack of native visualforce component to display hierarchy data or adjacency list  data . Possible solutions:-  There are two possible solutions from my understanding. Here is a little explanation for both solutions. 1. Use of  Google visulization API org chart  component to display hierarchy :-  Here we query database and prepare data nodes, then we simply supply these nodes to Google Visulization API org chart.Rest,this API is enough intelligent to display hierarchy view.     2. On demand hierarchy view:  Display a small subset of