Author Archives: greysalesforce

Quickly add fields to Existing Object without using standard wizard

Salesforce has a basic wizard to add fields in an object but it is a time consuming process when we are planning to add multiple fields per object (e.g. more than 15 fields).There is another process called as “Schema Builder”. By using the Schema Builder, user can easily add fields in a short span of… Read More: Quickly add fields to Existing Object without using standard wizard »

Mass Transfer Custom Object Records from One User to Another

Salesforce provides the ability to mass transfer records from one user to another user. This feature is currently available for some standard Salesforce objects like Accounts and Leads as well as all the custom objects. Only users with administrator rights can transfer records from one user to another user. To transfer the user, follow the… Read More: Mass Transfer Custom Object Records from One User to Another »

Remove None option from a Picklist in Salesforce

The standard salesforce picklist field displays a None option at the top of the picklist options by default. We didn’t want to display this option on our picklist field. There is no direct way of removing the None option from the picklists. In order to do this, we had to make two changes. The first… Read More: Remove None option from a Picklist in Salesforce »

Make Custom Object available for Salesforce Report

While working with reports in Salesforce, we wanted to create a custom object report in Salesforce. While trying to do this, we were unable to find the custom object in the Report Type Section. The solution is that we need to select the “Allow Reports” option in the Custom Object definition for that custom object.… Read More: Make Custom Object available for Salesforce Report »

Dependent class is invalid and needs recompilation error

We had a trigger active and working fine for the past one year. This trigger would create a task and opportunity; as well as send an email based on certain business rules when the customer gave any kind of feedback online at the Salesforce portal. Some days back, we started getting the following error:This was… Read More: Dependent class is invalid and needs recompilation error »

Adding flags to records in an object

It is possible to use images for different records of a Salesforce object to draw the user’s attention to a specific record. Let us take an example of the Case object in Salesforce. We can use different flags to define different priorities of any case. Looking at the flags will allow the users to immediately… Read More: Adding flags to records in an object »

View all currently active sessions in a Salesforce Organization

A new feature released by Salesforce in the Spring’14 release allows the user to view all currently active sessions in Salesforce. This is a very helpful feature that allows the administrator (or anyone with View Setup and Configuration setting enabled) to view list of all the currently active users in the Salesforce organization. This feature… Read More: View all currently active sessions in a Salesforce Organization »

Delete multiple records from custom object in Salesforce

While working with Salesforce custom objects, we inserted a bunch of records in that object during testing. We wanted to bulk delete the records from the custom object using the standard Salesforce view screen that is shown below – However, we can only delete one record at a time using this screen.  It is not… Read More: Delete multiple records from custom object in Salesforce »

Prevent page redirection on Apex Command Button through JavaScript

We had a requirement to add client side validation on Apex Command Button but the page was getting redirected after successful validation. So, we tried the following JavaScript code to prevent the page redirection but it didn’t work.We then found a solution to stop redirection by adding the following code at the Command Click Event.… Read More: Prevent page redirection on Apex Command Button through JavaScript »