Skip to main content

Posts

Showing posts from March, 2011

Loading animation on Visualforce

Maybe its just be but even if you build the most amazing system in the world, it won't be awesome if it is not visually pleasing or beautiful UI. No font should not be uneven, or the images should not haywire. Everything should be in order. Perfect.

A simple script can save you a long email, informing you that a million dollar system is broken because it does nothing when users click the buttons. If you have a long processing happening in the background, its not good to assume your users are psych to know whats happening in background (if only we could see data packets send one by one).  If you do not show them that something is happening, they will end up clicking the button again and again, sending multiple request to the server. Worst case scenario your system will be returned back with a thank you note that excel sheet was better, this is broken. Have no fear, I am here.

If you have been following this blog for some time, I hope you do, you will know that 'Please wait'…

Social Landslide

We all live in a social world, where everyone knows someone, somewhere. A few days ago I wanted to determine the exact followers of my blog and the numbers were vast, I had around 150+ followers using google reader, 300 around using facebook and 450 around on twitter. Most of these followers overlapped each other. feedburner told me, amidst this chaos the total reach of my blog is 200 people per day on an average. So basically there was no way to determine the exact number of followers.

This actually got me thinking about the social scenario nowadays. An average person has joined more than one social network. The social scenario nowadays is completely cluttered and decentralized. We have many tools for the trade, while facebook connects me to my friends, flickr helps me share my albums. A colleague in office casually passed around a information, 'Did you add me on orkut? I uploaded some pictures on my Singapore trip on it.'

It was chaos, for I am already added on his Facebook, …

Dynamic Approval Process on Salesforce

Ever come across the need of a large approval process where you do not know who the approver of the next stage will be? We all do don't we?

In a recent project requirement, I had to work on a big approval process. My basic requirement was:

1. One approval process for child object
2. Once child is approved, it should trigger the master object approval process

Both the approval process had around 5 steps and the approvers where determined by the role hierarchy and the region of the submitter.

Yikes is it?

Pre-requisites:
For this recipe, you need
1. Basic knowledge of APEX and trigger
2. Basic knowledge of Approval process
3. Aspirin (just in case you miss a step and have to debug it!!!)

So lets begin with the Child Object Dynamic Approval process.

Steps for Child Object Dynamic Process
1. Create two fields on the child object. These fields will not be shown on Page Layout.
       i) Approval_step__c: Text field to determine which step the approval is.
       ii) Next_approval__c: A us…