Posts

AngularJS in visualforce Pages With Data

Why This Post? In my  Previous post  , We have gone through AngularJS setup , Here is the our next step towards it . We will use few angularJS tags to make data search very easy over visualforce page. Here is the sample code for same with explanation in comments. <!- Visualforce Page Start--> <apex:page >     <script>         <!- AngularJS static resource inclusion -->         <apex:includeScript value="{!$Resource.AngularJS}"/>                       <!- Registers the area for which angularJS would work-->             var app = angular.module('myApp',[]);             <!- Creates a controller and bing with above area-->             app.controller("AccountController", function($scope) {       ...

AngularJS in Visualforce Pages Setup

About AngularJS : As we know AngularJS is one of the powerful javascript framework among various javascript frameworks, which simplifies our front end javascript, It uses MVC architecture to break down front end code . Front end code refers to all our HTML,javascript,CSS code . There are lot of good things about this framework, so i thought to learn this and use in my visualforce pages .                                                                               AngulasJS teaches HTML new tricks . Why this Post? Now a days our end users using salesforce asks us for Jazzy UI , moreover they want to say that they are not happy with traditional visualforce pages .Either they are not happy with page load times, transition between multiple pages ,UI/UX,Responsive nature of page,or their reps ...

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...

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...