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.

Cheers!!!

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"> 
<types>
<members>Object Name.Validation Name</members>
        <name>ValidationRule</name>
    </types>  
<version>30.0</version>
</Package>  

Note:

Use API names for Object Name and Validation Name.

Cheers!!!

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 0.0.0.0 to 255.255.255.255, Reset Security Token does not appear.

Cheers!!!

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

package.xml:

<types>
<members>*</members>
<name>CustomObjectTranslation</name>
</types>

Cheers!!!

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.

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

Cheers!!!

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.

Cheers!!!

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

Sample Query:

SELECT Name, ConvertedContactId FROM Lead WHERE ConvertedContactId != null

Cheers!!!

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.


Cheers!!!

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

http://www.infallibletechie.com/2012/05/batch-apex.html


Note:


1. Default is 200.

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

Cheers!!!

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

Package.xml:

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

Cheers!!!

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

Cheers!!!

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


Cheers!!!

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('-'));

Output:


Cheers!!!

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.

Cheers!!!