What are all the common errors we face during deployment in Salesforce?

1. Dependent class needs recompilation.

2. Depend class is missing.

3. Average code coverage is less.

4. Method not found.

5. Test classes are failing.

6. Variable not found.

7. Fields are missing.


How to deploy Validation Rules using Apache ANT tool in Salesforce?

Sample Package.xml:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata"> 
<members>Object Name.Validation Name</members>


Use API names for Object Name and Validation Name.


Reset Security Token does not appear Salesforce

If you face this issue, go to your profile and check the Login IP Ranges.

If the Login IP range is from to, Reset Security Token does not appear.


How to deploy Rename Tabs and Labels changes in Salesforce using Apache ANT tool?




INSUFFICIENT_ACCESS_OR_READONLY, insufficient access rights on object id

We will face "INSUFFICIENT_ACCESS_OR_READONLY, insufficient access rights on object id" because of Sharing Settings.

To overcome this issue, check the below

1. OWD, Sharing Rules and Role Hierarchy of the object in which you are trying to update the record.

2. Owner of the record which you are trying to update.

3. Check the trigger logic and check OWD, Sharing Rules and Role Hierarchy of the related objects records which are getting updated.

Even though trigger runs in System Mode, Sharing Settings will be checked. Only CRUD and FLS will not be checked against the user.


Salesforce Spring '15 Enhancements Overview

Question to Case

Question to Case allows administrators to escalate Chatter questions directly from a feed.
Escalate to Case option is used.

Create New Task publisher action

Create New Task publisher action allows users to create tasks directly from a Chatter feed.

Lightning Process Builder

Lightning Process Builder is a workflow tool that allows administrators and developers to automate busines processes using a Visual Interface.

General Enhancements

Publisher Actions renamed to Quick Actions.
Publisher Actions section renamed to Actions in the Publisher.
Enable Publisher Actions option renamed to Enable Actions in the Publisher.

Manager Groups

Manager Groups allow users to share records up or down their managment chain.

Import My Accounts & Contacts

Import My Accounts & Contacts allows users to get their account and contact information from 16 data sources into Salesforce.

Duplicate Management

Duplicate Management helps maintain clean and accurate data. Doesn't require Data.com license.
Triggered when the record is saved.


How to get converted Contact Id after Lead conversion in Salesforce?

Sample Query:

SELECT Name, ConvertedContactId FROM Lead WHERE ConvertedContactId != null


How to create package in Salesforce?

1. Go to Setup --> Build --> Create --> Packages.

2. Click "New' button.

3. Click "Add" button to add the components.


What is the minimum and maximum size for Batch Apex in Salesforce?

Minimum size for Batch Apex in Salesforce is 1.

Maximum size for Batch Apex in Salesforce is 2000.

To know more about Batch Apex in Salesforce, check the below link



1. Default is 200.

2. If you specify the batch size more than 2000, it will consider as 2000.


How to deploy Home Page Custom links using Apache ANT tool in Salesforce?


<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">


How to find number of pending batch jobs in Salesforce?

Sample Code:

List<String> batchStatuses = new List<String> {'Holding', 'Queued', 'Preparing', 'Processing'};
List<AsyncApexJob> listPendingJobs = [SELECT Id FROM AsyncApexJob WHERE Status IN: batchStatuses];

listPendingJobs.size() gives the number of pending batch jobs in Salesforce


Most Recent component in Salesforce Service Cloud console

1.Got to Setup --> Build --> Create --> Apps.

2. Select a Salesforce console app.

3. Click Edit.

4. In Choose Console Components, add Most Recent Tabs to Selected Items.

5. In Align Custom Console Component, choose whether the component will appear in the footer’s right or left side.

6. Click Save


How to find substring of string after particular character using Apex in Salesforce?

substringAfter() is used to find substring of string after particular character using Apex in Salesforce

Sample Code:

String str = 'abc-xyz';
system.debug('Expected is ' + str.substringAfter('-'));


Service contracts

Service contracts are agreements between you and your customers for a type of customer support.

Service contracts can represent different kinds of customer support, such as warranties, subscriptions, or service level agreements (SLAs).

To set up service contracts, from Setup, click Customize --> Entitlement Management --> Service Contracts.