Skip to main content


Showing posts from 2013

Simulating SSO concept using axiom as IDP (An app on heruko) and Salesforce

SSO(Single SIGN ON) is a very vital concept and as a fresher to IT industry many of us struggle to understand the definition and importance. The aim of the blog post is to help you to  understand what SSO is and how easy it is to configure in salesforce.

SSO (Single Sign On) allows the end users to provide their credentials once and obtain access to multiple resources. The key point of the concept is that the users are not prompted for their credentials anew on access to participating resources until the
    active  session is terminated. 

     The participating resources are typically related, but still remain independent. 

    Specifically, each system may have own authorization system, providing system-specific      roles to the end users.

 We will be using an IDP simulator axiom on heruko to simulate federated SSO concept  with salesforce as the service provider .

There are four  ways we can have single sign on with salesforce and get authenticated .

Delegated SSOFederated SSOOAUTHJIT SS…

Using Change sets Effectively For Enterprise Application Deployment For Projects

Deployments in can be a headache specially if you are new to platform ,in fact you may mess up if you use changesets and have no experience before doing this or if you have come up from java/.NET background where you have used ANT for deployments and now asked to use change sets of salesforce

The aim of this blog-post is share some of the tips and tricks for using the changeset effectively for deployment.

So i assume here that we generally go through salesforce document and we are ready after going through salesforce document to explore some tips and tricks that i generally use for deployments when using change set

The above links is must read before you start reading the tips i have for using changesets effectively

Problem 1:The field level security and permissions of objects and fields are not obeyed once i …

Battling CPU time out limit in apex sfdc

As per winter 14 release a new Limit was introduced for apex transactions which was brought in instead of number of script statements (2,00,000 script statement was maximum script statements allowed ).If you are guessing its CPU time out limit i am blogging on are right .Its this new feature which asks for developer to be more smart and more thoughtful in designing and approaching any apex design going forward 

One question that quickly came to my mind when this was announced is what will happen to previous code which took more than 10s (Please note for synchronous transactions 10 seconds is the CPU limit ) ?

I found answer to this in my favorite community that i spent lot of my time in(Yes its the

Read the technical  discussion that went deep to exploring OS concepts in computer science .So the answer why the previous code wont break is because salesforce analyze…

Oauth Google With using apex

In this short blogpost lets explore oauth along with a classic example of connecting salesforce and google and fetching auth token from the google using on demand salesforce emerging platform language apex 

There are already excellent client libraries to help you started with oauth 2.0
The above link is really nice one to explore more code in your faviourate language .Now coming to salesforce we have excellent blog post that teaches oauth in depth and i call it as sfdc oauth bible 
Here is the link:
The above URL teaches lot of stuff in a very lucid and very unique style .Thanks to the author .
In this blog post we will connect sfdc and Google and obtain oauth token from the google .This oauth token can be used to fetch personalized  data from Google using the Google API's(I will love to do one more blog post where an example of data fetched from Google will be shown)

Using OAuth 2.0 t…

Using MavensMate and SublimeText For Apex and Visualforce Development

Recently i tried the mavensmate open source IDE for the mentioned in the site and was quite impressed on windows .It hardly took time for me to understand and start using it .Thanks to excellent UI and its support with sublime text editor .

Let me document few initial settings i did to get this up and running and there is lot to speak on how to use this .I will highlight major points in this blog and that should be good enough to start using this .

Lets begin with how to set this up

For IOS and Linux i have no experience configuring this but looks like documentation for the same is very clear in User Guide

For windows i did configure it and was stuck at a place and i will elaborate at this step so that some one dont pull out hair searching and googling lot 

Following things needed to be downloaded

1)Git Download
2)Sublime Text 3
3)MavensMate.exe file

One by one we need to download the above and keep installing on windows machine .Please note i have provided the link .And hence click…

OutputPanel Usage In Visualforce Page

Salesforce has a provided with a very important tag ,apex:outputPanel. Recently I answered a question on stackoverflow that motivated me to write this small post.
The above link opens the documentation about this tag .This blogpost i have explored its exact use cases to use this tag
Conditionally render a section of block of html element in a visualforce can be achieved with this tag as this tag has render attributes .
     2. A very interesting case is if the element is not rendered initially then on Re-rendering the panel nothing rerenders .The following blog below from Bob demonstrates on how to resolve this .Again the outpanel is the rescue

   3.A common requirement that comes sometimes is to align the command button to the center of the screen.The apex:pageblockButton can be used but in some cases we have buttons without pagebl…

Fun With New HTML5 Tag Support in Visualforce

Winter 14 release notes are up and i am sure many of you would have glanced it .The most exciting feature is support for some html 5 components in the visualforce ,which open lot of opportunities for developers working on the platform to provide robust UI to the end customer using the platform.

Many times customers have been asking for features like auto suggest(auto complete),calendar widgets,Phone field validation or email validation on the form element.I don't say we   never gave this functionality to the customers ,we still were able to give these cool features but with help of jquery UI plugins ,some work arounds (like creating fields of input field to bring calendar on vf),or using any other open source UI or javascript library to achieve these functionality.

Now with this new winter 14 release some of our pains to use these libraries for small functionality like auto complete is easily achievable through native tag support provided in the visualforce page.

The release notes ha…

Aggregate SOQL Functions in SFDC Pros and Cons

"Aggregate query does not support queryMore(), use LIMIT to restrict the results to a single batch"
I was lately working on some reporting requirement on salesforce which was possible only through visualforce and as soon as i heard the business scenario i was confident enough that my solution will be simplified if i stick to the Aggregate Function in SOQL SFDC.
I knew i had huge data in my org and never thought using Aggregate function will lead me to below error
"Aggregate query does not support queryMore(), use LIMIT to restrict the results to a single batch"
This error motivated me to blog this article and share some experience on when to make use of these aggregate query and when not in apex .
If you are confident that the data in a object  can exceed 20000(approximate figure) rows i would prefer avoid these and instead prefer using loops and making page read only at-least and writing my own logic to sum and count .
The read only attribute gives the power to exc…

From Administrator To Advanced administrator of Salesforce CRM and Applications

Recently salesforce came with BETA exams for the advanced administrator and this provided me an opportunity to clear this exam free of cost.To know more about what BETA exams are and how they can be useful in getting yourself certified please read the below article 


The aim of this blogpost is  to give an idea of what are the areas candidates must go through to gain this valuable certification.Please dont ask for exam dumps or any other material as these are not ethical and also whats the use of attending an exam just by going through dumps .

Please make a habit of going through study guide and make sure you go through all the videos mentioned in the study guide(All videos are  not free and you may need partner portal access to watch .Ask your organisation if they have one ) .Also search for topics mentioned in  study guide in salesforce help and training portal .

Let me ease some task by providing links to the study guide and help and training portal


Fun With Maps In Apex

Maps are my favorite collection types .The Reason why its very essential to use Maps in apex  classes or triggers is it makes life simple for writing bulkified apex class or trigger .

Read more on Maps in below article from salesforce

Apex we all know runs on an multitenant  architecture .The resources are shared and hence we have governor limits in apex .The advantages of proper usage of maps will help  to  reduce script statements,No of queries for a single context of class or trigger execution,avoiding query on a single object twice .

As a fresher to salesforce  we are unaware of various techniques that we can employ to reduce the script statements and reduce heap size of collection like Lists,Maps and Sets.

You can read some nice articles in developerforce and get familiar with some of common techniqu…

Tips On Passing Advanced Developer Salesforce Certification Programming Assignment

As promised as per my previous blog i am sharing my experience on how to clear the advanced developer programming assignment and essay exams to obtain the Advanced Developer Certification.

One of the basic things i would like to mention is ,this you will not have it  overnight as the demand for the course is very high and there are limited slots available in each quarter .One has to be very sharp to quickly register for the exam on the dates mentioned in the Small negligence  will cause you to wait for another 2 to 3 months .

The assignments are distributed nearly after a month once you have registered .So this gives ample amount of time to revise your apex and visualforce skills.

Once the assignments are distributed you will have nearly a month time to complete your assignment and i would suggest reading the whole pdf that comes with assignment more than thrice atleast to make sure you understand the logical requirements and the hidden aspects of the assign…

Fun with Angular Js and Visualforce Page

Recently i authored a visualforce page just to demonstrate the use of angular JS (Javascript framework from google ).It was very good experience working with Harshit Pandey.

The idea was just to demonstrate how easily even with getters concept of visualforce one can bind data to the angular JS script

The page gives functionality of sorting ,pagination and searching all in a single UI.The UI is done through twitter bootstrap plugin.

The page code can be found below

The controller code is very simple and its just returning JSON object

The demo link is at

The same post is posted by Harshit in a friendly format .You can find at following link

Thanks and Happy Coding !

Using CSS in pdf for page numbering with API 28.0 (@page CSS properties)

Generating PDF in salesforce is very easy with renderAs="pdf" attribute of apex page tag.For those of you needing sample on how to achieve this ,the below link points in right direction to get started and create some professional documents using some CSS power and Visualforce tags

With API 28.0 my designed visualforce pages stopped showing the pagenumbers and other CSS attributes using style with @page annotations .

Here is the code that i tried in sample page to figure the issue with less code

This code yielded a pdf with no page number and hence conclusion that the @page CSS style properties are not working in API 28.0
Now the question arises like why it works in API 27.0 and not in API 28.0 .To understand this i read enhancements that came in API 28.0 on visualforce .I inserted html tag at start in API 27.0 and found again that @page attribute was not working.Hence injection …

Mobile Application Development On Touch Platform-Part 3

This is in continuation with my previous posts .This post basically covers the difference between local and server side implementation approach for developing cross platform hybrid  mobile application on touch platform.

An hybrid mobile application is cross platform and generally use phonegap that comes bundled with mobile SDK to develop the application. Web developers familiar with the javascript will find it very friendly to learn and develop hybrid mobile application.
The following table below summarizes the difference and comparison between local(javascript on local device and using ForceTK/RemoteTk  library) and server side(Visualforce with Javascript Remoting) approach:

Local/ServerSide Hybrid mobile application development on touch platformFeaturelocal Approach using mobile packs(Backbone js/angulur js/jquerymobile)Server side Approach using Visualforce page DatabindingForceTK or RemoteTK,Javascript modal functions for angular js or backbone js library functions Javascript Remoti…