A Tip A Day #36 – Display Image from Rich Text Field in VF Page

This post is a part of the daily blog series  A Tip A Day, daily dosage of learning! Day #36 - Display Image from Rich Text Field in Visualforce Page I have a field of type Text Area (Rich)  called Product in a Contact object.  And I upload a picture to the field for one …

A Tip A Day #18 – Rollup Summary Decimals in Database

This post is a part of the daily blog series  A Tip A Day, daily dosage of learning! Day #18 - Rollup Summary Decimals in Database Lets say you have a rollup summary field of decimal on your master object record which is a SUM of currency field of your child records. Scenario: For a child …

7 Ways to Lock a Record in Salesforce

In this blog post, I'd be discussing the different ways to lock a Salesforce record in UI.  By lock, I mean, the user shouldn't be able to edit the field values of the record.  I have identified 7 ways to lock a record using configuration and coding. There is a general requirement that the Business doesn't …

Salesforce Code Scanner – Health Check

As a Salesforce Developer, have you ever worried about the code in your Salesforce org and wanted to check if: the code you have written/existing code is in line with the best practices? you have followed the coding guidelines suggested by Salesforce? there are any loop holes in the code that could cause severe security …

Visualforce Pagination with Dynamic Search

This post has a working example of dynamic search in a Visualforce page and the results shown with pagination. There are 4 field search criteria including date fields too which makes it more interesting.  The results upon clicking Search will display below the Search section with 4 buttons to paginate.  The Next/Last Page buttons grey …

Wrapper Class Multiple Value Sorting

Came across a scenario where I had to sort a wrapper class.  Normal list sorting is simple, list.sort(); would help.  But for a wrapper class, it's not straight-forward but it isn't that hard.  Below is a simple wrapper class without sorting - this wrapper has 2 columns : Area and AD. global class AreaWrapper{ public String …