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
- Salesforce Environment.
- jQuery library.
- 2 icons to show the rating.
Ingredients
- One parent object (standard or custom, I am using “Account” object).
- One child custom object (I have created custom object called “Rating”).
- Two Apex Classes (one for the controller and another for test class).
- One Inline visualforce page.
- Two Static Resources
Demo: click here to taste! Continue reading