Skip to main content


Showing posts from 2014

Custom Star Rating Component Using Visualforce In Salesforce

Have you ever met with a requirement where you had to Rate list of records in salesforce and store the ratings related to Individual user and then do an average rating based on rating for all users for the records ?The records that I refer  to may be your custom objects ,or leads or may be your Accounts or opportunities .Providing ability to Rate records is one of the common requirements if you are building a site where you showcase your products .Salesforce knowledge article provides this facility but the solution we will do here will be rating custom object or standard object and we assume you don't use knowledge module for your purpose .

Our approach will be to use a simple plugin that I liked very much and special thanks to the actual author who has developed this plugin Kartik Visweswaran.I salute his work and my work is just integrating his work with salesforce Visualforce Page .

Lets get started with simple demo that he has hosted on his site ,the demo link is as below


Learn how to use Salesforce Communities Designer for Self Service Portal

Salesforce community portal have been in use for long time, but was limited in offering pleasant features and specially custom configuration. To introduce as new feature, lot of additional works needs to be done, both from development and design perspective, which include using HTML, CSS and Javascript on top of Visualforce.

Clearly powerful user-experience and clean user interface adds high user engagement. In person, we have spend weeks to leverage an impactful customer experience with Salesforce Communities

Salesforce introduced community designer and have fascinated me in person, I have been working on this platform for about three year, and I find this tool be very productive. I teamed up with +Harshit, and decided to write this blog post here explaining how to Salesforce Community Designer Tool released in Winter'15.

To explain a functionality, I am choosing a business scenario, covering business activity in an financial institution, and covering mundane activities like re…

Journey from blogger To author

Sorry for not being so much active here but I have a strong reason that I am sure you will forgive me .I am excited to inform I was given an opportunity to author a book on explaining administration essentials of CRM .I have completed the book and I am eager to get some feedback from readers .

It was not easy job working on this after office hours but this was true unique experience and challenge .

Who This Book Is For

This book is targeted at expert administrators or professionals who are new to Salesforce and want to learn the various features supported by the platform in a short space of time. The book can also be used by professionals preparing for Developer and Administrator certification exams from Salesforce.

What You Will Learn

Understand how licensing, profiling, and security settings are set for usersPerform data modeling and use Salesforce components such as workflows, approvals, validations, layouts, and record types to solve business problemsGet to know the repo…

Invoking Apex Callouts through Visual Flows

Few weeks back I was attending a Webinar on AdvancedFlow From SFDCBill(Product Manager Flows .I was quite surprised to discover flows are very powerful feature provided by the platform for the administrator to configure the business logic .

My friendRakesh has been blogging lot of use cases of flows for Salesforce 1 and using chatter objects .You can refer his blog for more details on the work he has done .I have learned lot from those and I am thankful to him for sharing his experience with visual flows through his blog

One of the things that came was invoking callouts or webservices through flows and SFDCBill was able to communicate the design that one needs apex and process plugin for invoking callouts directly from the flow .I did a quick online search to see if this has been demonstrated  and was not able to get some good resource so i thought of sharing a sample tutorial on how to invoke …

Refreshing Parent Window of Inline Visualforce Page from Child Window Opened from Inline Visualforce Page

The problem statement is From Inline Visualforce We need to open a Child window and then from that child window we need to refresh the Parent window of the Child window or redirect Parent window of the child window .

Last night ,I was struggling on how to redirect the Parent Window from the child window that was opened from the Inline window 
I tried hard on how to solve this ,but finally last resort was to post the query on salesforce stackexchange .The below is the link for the same
The error was due to Javascript security of web browser .
I tried the below script on the child window
<script> function test(){ alert('hello');'https://googleflowauth-dev-'; } </script>
Unsafe JavaScript attempt to initiate navigation for frame with URL 'https:/…

Won Summer Hackathon Bangalore Contest

So here is the good news .Last night we were declared winner of Summer Hackathon Challenge conducted in my city (Bangalore).To know more you can visit the link.First of all let me very clear that I am nothing without my team .It was complete Team work right from Idea to Implementation .

Let me take some time to Introduce you to my fellow colleagues who have worked and taught me so much and I am just a small part .

+MUKUL goel+rashmi t

Mukul  you can contact him with email  

Rashmi  you can contact her with email

I have never been to Hackathon before and this was really something I thought i should give a try .Nervous I was but when we formed a Team and Started Building ,Confidence level Picked up.

Thanks to Salesforce and BeMyApp .They had organised the event very well .All that we needed to concentrate was to have a working demo of our application on final day of submission.

First Day -When so many Ideas emerge its important to be a good listene…

Fun with maps in apex-Part 2

This is an extension of my previous blog on Fun with Maps .So from years of coding now on apex we realize we do lot of repetitive  coding ,The code statements keep repeating but objects ,fields and org keep changing .

So here my problem statement was ,I was using the logic of forming a Map of ParentId and List of Child Records frequently for different triggers and different visualforce classes .Something like below as mentioned in the previous blog.

Here is the sample code that kept on repeating for me
The Object kept on changing for various triggers and classes in my org but the basic logic remained same of forming a collection of Map<Id,List<Sobject>>

Repeating code is never a good pattern and felt need to write an utility that can take care of this .Here is my utility class that can be used ti generalize the concept of collecting parentId and the list of child records (List<childrecord>)

The advantage of this pattern is we dont have to code this logic again and … Certified Technical Architect - Multiple Choice exam

First of all really sorry for not being active on my blog for quite some time and you will find the reason behind the same was my schedule was hectic and I also decided its right time for me to attend Certified Technical Architect - Multiple Choice exam.

I am glad that i cleared this exam today and thought of sharing some learning's here :)

Its been almost three years on platform and I was involved in wide variety of work ,mostly now on Integration's and Data Migration  Salesforce Projects .So I thought its right time for me to start preparing for at least multiple choice exams as I had confidently submitted the Self Evaluation  and I was informed I am good to go for Next Round .

Again Please don't mail and ask me for dumps as this is against my ethics .Having said that I would definitely provide some insights on what topics one must primarily concentrate while preparing for this Exam .

The Study guide can be obtained from the Certification Website .Now what top…

Opportunity_hd Not Found Error

Have a look at above screenshot and it says Opportunity_hd not found while deployment .

The cause of this issue is due to Opportunity History Trending Not Enabled in the Destination Instance .This is a weird error and I am posting so that this may help all who encounter this to resolve themselves

Business Process and Support Process In Changesets Salesforce

The BusinessProcess metadata type enables you to display different picklist values for users based on their profile.It extends the Metadata metadata type and inherits its fullName field. Multiple business processes allow you to track separate sales, support, and lead life cycles. A sales, support, lead, or solution process is assigned to a record type. The record type determines the user profiles that are associated with the business process. For more information, see “ Managing Multiple Business Processes ” in the Salesforce online help.
So now the query is how to deploy this Business Process and Support process Via the changesets in SFDC? If you see the component list you wont see the BusinessProcess in components to Add to the changeset.This is pretty weird as the metadata API for same is exposed in Salesforce . Mnaually creating hundreds of process in each Instance can be time consuming and Tedious and Using Eclipse or Ant for this for an admin or Business analyst can be a huge exerci…

Getting Information of logged In Users Community using apex

Salesforce communities allows you to connect your partners,employees and customers directly to the business process.

Salesforce communities Improve customer service and reduce support costs with Communities 
for Service.

Through this blog post my simple aim to is throw light on apex classes that are available to fetch information about logged in User community.

So lets have a look on how to approach the code to find community-Id and then use the community ID to get information about the users community and user detail

So lets explore the above code and find what all details one can infer from this code
CommunityHelper.getCommunityInfo().urlPathPrefix  ---This is sample on how you can use to get urlPathPrefix and this can be effective in using for various URL navigations .

The above link is really handy to figure what all info one can obtain from getCommunityInfo() class .

The return will …

Parsing An XML Data With DOM Parser In Apex

Parsing the XML data in Apex is always pain and there are already very good blogs and links that really help us to design the strategy for parsing XML data of various complexities .

The above blog from Abhinav one of our MVP of sfdc dev commmunity is informational and i suggest everyone to read this on how to use fast XML DOM.

There is a cookbook article as well on how to effectively achieve the parsing of XML using DOM parsers

One has to know two system classes a)Document Class b)XMLNode Class

Now the question then ,why I am I writing this blog when already there are so much information on web as how to do it.The reason is even after reading all the documents in net ,i struggled to parse an XML as none of the blogs speak on how to parse when we have namespace in the XM…

Encrypting the XML response from External System In Custom Field Using AES 256 Algorithm

Encrypting the data via crypto classes in apex language is fun and below are the few articles links on developer force that really help us understand better.

Having read the above document one can easily be of opinion thats its too easy with few lines of code to encrypt data using AES 256 and also same can be stored in a field via an apex trigger .It is not so simple when it comes to storing this data into the custom field .

From the above code ,the problem arises when we start thinking on how to store the encrypted  blob data into the field of object .We dont have any field of data type blob in sfdc and thats were my problem  began and hence this blog for people looking for solution around how to store the blog in a Long Text Field and then how to decrypt the same .

The above code will trigger an exception as below

System.StringException: BLOB i…


*********** MAXIMUM DEBUG LOG SIZE REACHED ***********

Many Times i get frustrated when i want to log something and see the values in debug log and when i encounter an error saying MAXIMUM DEBUG LOG SIZE REACHED.

We all know the log levels in SFDC can be configured and hence setting filters as below in debug logs help to solve the problem

Database : NONEWorkflow : NONEValidation : NONECallouts : NONEApex Code : ERRORApex Profiling : NONEVisualforce : NONE
The above stackexchange link helps to identify how to solve the problems .
But when it comes to the TEST classes sometimes when there are too many test methods even filtering as shown above does not help much .How do we solve the problem then ?
One solution is to comment out all other test methods except the method that's giving trouble or suspected of cause of error .Hence we will be able to display logs for only the method and debug the result .