Inner Query in Query Locator Bad Practice

Recently came across one code which had inner query in QueryLocator. For example some one has put that in Start method of Batch apex. To give exact example of Query in Start Method of Batch,

I think this is not the right way of doing query. To get into the reason why, i think […]

How to get KeyPrefix of sObject in Salesforce

Every record in Salesforce has an ID which is used to uniquely identify the record. Each ID value is globally unique. The first three digits represent the object type. For example, the Account object uses the 001 prefix; the Note object uses the 002 prefix, Contact uses 003, Users 005, Opportunity 006 etc. We can […]

Dynamic Styling in Visualforce Page

This post is about how dynamically you can display the colour of the field on Visual force page. Here is the example below which will showcase all the opportunities in red which are of amount < 100000 and rest would be in Green. You can find the live demo here.