Using Comparable Interface to sort by Date

I have come across the requirement in which I have to sort the list of Apex Class based on Date. If you want to add sorting support for Lists that contain non-primitive types, that is, lists of user-defined types. you must implement the Comparable interface with its compareTo method in your class. To implement the […]

Email Service to Parse CSV

Howdy. I had requirement for parsing CSV in email service, thought I should post it on my blog.So lets get started. Step :1 First you need to create Apex class that acts as an inbound email handler which simply needs to implement the Messaging.InboundEmailHandler interface. The interface defines a single method which is handleInboundEmail. Code […]

Generating random password for contacts

If you have any application in which you want only your salesforce contacts to log in. You can create log in page and authenticate contacts by giving password to them. For that purpose you need set Contact’s password and send it to their email address and show password as encrypted field on layout so that […]

Integration with Salesforce using REST API

REST API provides a powerful, convenient, and simple Web services API for interacting with Force.com. Its advantages include ease of integration and development, and it’s an excellent choice of technology for use with mobile applications and Web 2.0 projects A Lot of people ask about how can we integrate external system with Salesforce without using […]

Required Mark on Input Text

If you are using inputText the red bar doesn’t come with it. You have to consider inputField and make it required to show the red bar. If you want to show red bar with inputtext then you have to use requireInput css. Below is the code snippet.

Custom Cloning of Object using dynamic SOQL

If you want to clone custom object along with its child objects then standard won’t work. Standard cloning only clone the object record itself and does not clone its child objects. In order to fulfil that requirement you have create custom clone button and invoke a webservice. Javascript which needs to be written to call […]

Hierachy Custom Settings in Salesforce

A type of custom setting that uses a built-in hierarchical logic that lets you “personalize” settings for specific profiles or users.The hierarchy logic checks the organization, profile, and user settings for the current user and returns the most specific, or “lowest,” value. In the hierarchy, settings for an organization are overridden by profile settings, which, […]

Conditioning in Visualforce Page

If you want to override Opportunity detail page and show OpportunityLineItem’s detail page underneath the Opportunity page, you can do it easily by using <apex:detail>,<apex:repeat> and <apex:variable> with some conditioning in VF page. <apex:detail> shows the standard detail page for a particular object, as defined by the associated page layout for the object in Setup. So in order to show […]

× Let's Chat!