Tag Archives: rating

Recipe to add AJAX, dynamic ratings in Salesforce using jQuery.


We all like to see our clients rejoice when we create great user experiences (UX) – JavaScript has helped us a lot in achieving this. By considering a scenario in Apex and Visualforce development, I’d like to show you how to add rating (1-5 scale) using jQuery with custom logic to save the relevant ratings in a separate object, and load it dynamically!

Utensils required

  1. Salesforce Environment.
  2. jQuery library.
  3. 2 icons to show the rating.

Ingredients

  1. One parent object (standard or custom, I am using “Account” object).
  2. One child custom object (I have created custom object called “Rating”).
  3. Two Apex Classes (one for the controller and another for test class).
  4. One Inline visualforce page.
  5. Two Static Resources

Demo: click here to taste! Continue reading

Tagged , , , , , , ,