Steps for Approval Process

Step 1: Enter Name and Description.

Step 2: Specify Entry Criteria.

Step 3: Specify Approver Field and Record Editability Properties.

Step 4: Select Notification Templates.

Step 5: Select Fields to Display on Approval Page Layout.

Step 6: Specify Initial Submitters.


Unable to add Value field in Dashboard settings for Tabular report

The value field can be anyone of the following data types
  1. Number
  2. Currency
  3. Boolean

Types of Reports in Salesforce


     Tabular reports are the simplest and fastest way to look at data. Similar to a spreadsheet, they consist simply of an ordered set of fields in columns, with each matching record listed in a row. Tabular reports are best for creating lists of records or a list with a single grand total. They can't be used to create groups of data or charts, and can't be used in dashboards unless rows are limited. Examples include contact mailing lists and activity reports.


     Summary reports are similar to tabular reports, but also allow users to group rows of data, view subtotals, and create charts. They can be used as the source report for dashboard components. Use this type for a report to show subtotals based on the value of a particular field or when you want to create a hierarchical list, such as all opportunities for your team, subtotaled by Stage and Owner. Summary reports with no groupings show as tabular reports on the report run page.


     Matrix reports are similar to summary reports but allow you to group and summarize data by both rows and columns. They can be used as the source report for dashboard components. Use this type for comparing related totals, especially if you have large amounts of data to summarize and you need to compare values in several different fields, or you want to look at data by date and by product, person, or geography. Matrix reports without at least one row and one column grouping show as summary reports on the report run page.


     Joined reports let you create multiple report blocks that provide different views of your data. Each block acts like a “sub-report,” with its own fields, columns, sorting, and filtering. A joined report can even contain data from different report types.


Insufficient access rights on cross-reference id error

INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id:[] is a common issue when you try to update or create data with insufficient access on a record.

Kindly check the user profile and check whether the user has access to insert/update that record. Even if the user has access, kindly check whether the user has access to update fields like record types, lookup field, master-detail field, etc.

Troubleshooting steps:
1. Make sure whether the user have access to record ids of the lookup fields and/or master-detail fields in the record.
2. Check the user Profile(CRUD Permissions).
3. Profile need to have access for the record types.
4. Record's OwnerId automatically gets share record when the record is inserted. If the apex code try to create the same(Share record for the owner) explicitly. This error occurs. 
Sample Code for this error:
Id usrId = UserInfo.getUserId();
Account objAccount = new Account( Name = 'Testing', OwnerId = usrId );
insert objAccount;
AccountShare objAccountShare = new AccountShare();
objAccountShare.AccountAccessLevel = 'Edit';
objAccountShare.AccountId = objAccount.Id;
objAccountShare.RowCause = 'Manual';
objAccountShare.UserOrGroupId = usrId;
objAccountShare.OpportunityAccessLevel = 'Read';
insert objAccountShare;

5. Check whether the apex code is trying to create share records to the record which the current user doesn't have access to it.
6. Check whether there are any hard-coded ids are miss matching the environments.
Even though trigger runs in System Mode, Sharing Settings will be checked. Only CRUD and FLS will not be checked against the user.

How to update record using SOQL?

Sample code:

Account act = [SELECT Id, Description__c FROM Account WHERE id = '001A000000vtDZo'];
act.Description__c = 'Fully product based account';

Update act;

Inbound Email - Creating record using email in Salesforce

You can use Apex to receive and process email and attachments. The email is received by the Apex email service and processed by Apex classes that utilize the InboundEmail object.

1. Go to Setup --> App Setup --> Develop --> Apex Classes.

Create a class that implements the interface "Messaging.InboundEmailHandler".

Sample code:

global class createMemberInbound implements Messaging.InboundEmailHandler {

    global Messaging.InboundEmailResult handleInboundEmail( Messaging.InboundEmail email, Messaging.InboundEnvelope env ) {
        Messaging.InboundEmailResult result = new Messaging.InboundEmailResult();         
        String myPlainText= '';               
        myPlainText = email.plainTextBody;
        try {
            Member__c mem = new Member__c( Ext_Id__c = myPlainText, Name = email.Subject );      
            System.debug( 'New member: ' + mem );     
            insert mem;                
        catch ( Exception e) {
            System.debug( 'Error is: ' + e.getMessage() );
        result.success = true;        
        return result;


For other attributes of Messaging.InboundEmail, check the below link

2. Go to Setup --> App Setup --> Develop --> Email Services.

3. Click "New Email Service" button.

4. Fill in the details and click "Save" button.

5. Click "New Email Address" button.

6. Fill in the details and click "Save" button.

7. Copy the generated Email address.

8. Compose an email with to address generated email address.

9. Check whether the record has been created in you Salesforce organization.

Salesforce interview questions to be expected

1.    How to reset password for particular users in SaleSforce?   

2.    How to grant your administrator or support personnel to login as you?

3.    How to find out what Salesforce edition you have?

4.    How to import attachments using Apex Data Loader?

5.    How to get security token in Salesforce?

6.    Difference between WhoID and WhatID?

7.    Difference between ISBLANK and ISNULL?

8.    Difference between Sandbox and Developer Edition?

9.    How to get fields for sObject using Apex?Apex and Visualforce?

10.    How to truncate string using apex in Salesforce?

11.    How to get Organization ID?

12.    How to convert sObject to String in Apex?

13.    How to free list memory using apex?

14.    How to get a subquery field value using Apex?

15.    How do I configure proxy settings for Java?

16.    How to send email to a public group using apex?

Salesforce interview stuffs

1.    How to add Row limit and Dashboard settings for Tabular report?

2.    How to find total no of records using SOQL?

3.    How to use a list variable in SOQL?

4.    How to edit Report folder?

5.    How to schedule export?

6.    How to get values from apex:inputField in controller?

7.    How to include external Javascript file in VF?

8.    How to use Custom Labels in Visualforce page and Apex?

9.    How to schedule a report?

10.    How to display multiple Dashboards in home page?

11.    How to track field history in Salesforce?

12.    How to convert lead using Apex?

13.    How to create Sandbox?

14.    How to make approval process active?

15.    How to execute SOQL query in Developer Console?


A component that displays the status of an AJAX update request. An AJAX request can either be in progress or complete.

Sample Code:

<apex:page >

<apex:form >
    <apex:pageBlock id="ab" >
        <apex:pageBlockSection >
            <apex:pageBlockSectionItem ><apex:commandButton value="Status" status="sts" reRender="ab"/></apex:pageBlockSectionItem>           
        <apex:actionStatus id="sts" startText="Loding......."/>



Web-to-Case in Salesforce

Using a simple web form, we can allow our customers to submit cases directly to our customer support group on-line. These cases will be automatically created in

1. Go to Setup --> Build --> Customize --> Self-Service --> Web-to-Case.

2. Click the "Generate the HTML" link.

3. Select the required fields and enter the return URL and click "Generate" button.

4. Copy and paste the HTML generated in your blog or website.

5. Click "Finished" Button.

6. Go to the form created using generated HTML in your blog or website.

7. Click "Submit Query" button.

8. Check the created Case in your Salesforce organization.


Web-to-Lead in Salesforce

Using pre-existing pages on our company's website, we can capture contact and profile information from users and automatically generate new leads in, enabling us to respond in real-time to customer requests.

1. Go to Setup --> Build --> Customize --> Leads --> Web-to-Lead.

2. Click "Create Web-to-Lead form" button.

3. Select the required fields and enter the return URL.

4. Click "Generate" button.

5. Copy and paste the HTML generated in your blog or website.

6. Click "Finished" button.

7. Go to the form created using generated HTML in your blog or website.

8. Click "Submit Query" button.

9. Check the created lead in your Salesforce organization.

Parser was expecting element Data Loader Login issue

In order to avoid "Parser was expecting element" error in data loader, kindly check the following settings in Apex Data Loader

1. Check whether you have given the proxy correctly.

2. Check whether you have given the port number correctly.

3. Check whether you have given the correct url(for Production - and for Sandbox -

4. Make sure "API Enabled" permission is checked on the Profile.




SELECT Name,MAX(NumberofLocations__c) FROM Account GROUP BY name ORDER BY Name LIMIT 2

Field that are aggregated cannot be used in GROUP BY or ORDER BY.

In the above example, NumberOfLocations__c cannot be used in GROUP BY or ORDER BY because NumberOfLocations__c is aggregated.

How to find total no of records using SOQL?

Select count(name) From Account 
      - Returns the total number of Account records.

Salesforce Developer Interview questions

1. If the OWD for account is "Private", is it possible for a user in higher hierarchy to see the records owned by the user below his/her hierarchy?

2. If without sharing class calls with sharing class, how the with sharing class behaves(with sharing or without sharing)?

3. How to extend report access to group of users?

4. How to by pass governor limits?

5. Difference between heap limits and governor limits?

6. How to schedule Batch apex?

7. How to update a text field based on Date field?


Difference between Governor limit and Heap limit in Salesforce

Governor Limit
If some Apex code ever exceeds a limit, the associated governor issues a run time exception that cannot be handled.
Apex run time engine strictly enforces a number of limits to ensure that runaway Apex does not monopolize shared resources. 

Heap limit
The allocation of memory storage for use in a computer program during the runtime of that program.
When you create objects in your Apex code, memory is allocated to store these objects.

Governor Limits in Salesforce

Governor limits are runtime limits enforced by the Apex runtime engine. Since Apex runs in a shared, multitenant environment, the Apex runtime engine strictly enforces a number of limits to ensure that code does not monopolize shared resources.

Types of limits that Apex enforces are resources like

1. Memory
2. Database resources
3. Number of script statements to avoid infinite loops
4. Number of records being processed. If code exceeds a limit, the associated governor issues a runtime exception.

Because Apex runs in a multitenant environment, the Apex runtime engine strictly enforces a number of limits to ensure that runaway Apex doesn’t monopolize shared resources. If some Apex code ever exceeds a limit, the associated governor issues a runtime exception that cannot be handled.

The Apex limits, or governors, track and enforce the statistics outlined in the following tables and sections.

1. Per-Transaction Apex Limits
2. Per-Transaction Certified Managed Package Limits
3. Platform Apex Limits
4. Static Apex Limits
5. Size-Specific Apex Limits
6. Miscellaneous Apex Limits


Salesforce ADM 201 Syllabus


Organization Setup - 1%
Company profile

User Setup - 9%
Creation of multiple users

Global User Interface - 1%
List View

Security and Access - 15%
Sharing Rules
Manual Sharing

Standard and Custom Objects - 18%
Types of objects
Types of fields
Record types and business processes
Implications of deleting fields
Formula fields

Sales Cloud Applications - 9%
Sales process
Big Deal Alert
Web to Lead
Lead Assignment Rule

Service Cloud Applications - 6%
Case management
Web to Case
Email to Case
Public Solution
Salesforce Knowledge

Activity Management - 3%

Chatter - 1%
Describe the features of Chatter

Data Management - 11%
Data export
Import Wizard

Content and Folder Management - 2%
Salesforce Content
Folders - Email Templates, Reports, documents

Reports and Dashboards - 13%
Custom Report Types

Workflow Automation - 7%
Approval process

Desktop and Mobile Administration - 2%
Salesforce1 and SalesforceA
Salesforce for Outlook

AppExchange - 2%


1. Manage users, data, and security
2. Maintain and customize Sales Cloud and Service Cloud applications
3. Build reports, dashboards, and workflow

Administrator's responsiblities:

1. Customizing your application, including page layouts, fields, tabs, and business processes.
2. Creating a secure Salesforce environment.
3. Maintaining and import clean data.
4. Creating high-value reports and dashboards.
5. Setting up workflow automation.

To know more, kindly visit the below links

For sample questions and materials, kindly use the below link

Class with sharing and without sharing in Salesforce

With Sharing - Enforce the sharing rules that apply to current user.
Without Sharing - Doesn't enforce the sharing rules.

If a class is not declared as either with or without sharing, the current sharing rules remain in effect. This means that if the class is called by a class that has sharing enforced, then sharing is enforced for the called class.


public with sharing class CWith 
  // All code in this class operates with enforced sharing rules. 

  Account a = [SELECT . . . ];

  public void m() 
      . . . 

public without sharing class CWithout 
  // All code in this class ignores sharing rules and operates  
  // as if the context user has the Modify All Data permission. 
  public void m() 
     . . . 

    // This call into CWith operates with enforced sharing rules 
    // for the context user. When the call finishes, the code execution  
    // returns to without sharing mode. 

  public class CInner 
    // All code in this class executes with the same sharing context 
    // as the code that calls it.  
    // Inner classes are separate from outer classes. 
    . . .

    // Again, this call into CWith operates with enforced sharing rules 
    // for the context user, regardless of the class that initially called this inner class. 
    // When the call finishes, the code execution returns to the sharing mode that was used to call this inner class. 

  public class CInnerWithOut exends CWithout 
    // All code in this class ignores sharing rules because 
    // this class extends a parent class that ignores sharing rules. 

Organization Wide Default - OWD in Salesforce

While roles and profiles are used to determine the user-based security, the organization wide default determines the distribution of data with the user. We use the defaults in the object to determine which people across the role hierarchy can access which objects.

Organization-wide defaults are used to restrict data in the sharing model.
In a master-detail relationship, detail records inherit organization-wide defaults from the master record. But in Lookup relationship, parent and child have different OWDs.

The four permissions in OWD are
  1. Private
  2. Public Read Only
  3. Public Read/Write
  4. Public Read/Write/Transfer(Only for Case and Lead)
  5. Public Full Access(Only for Campaign)

Go to Setup --> Administration Setup --> Security Controls --> Sharing Settings --> Organization Wide Default.


Password policies in Salesforce

Password policies are user security settings with the password policy for the users. Password policies help us to maintain a strict and complex pattern in password with the automatic expiry. By default Salesforce passwords expire in 90 days and the user cannot use three previous passwords. Passwords are 8 characters in length and should be a combination of alpha-numeric characters. These policies can be changed using the Password Policies settings.

To change the Password Policies perform the following steps:
1. Go to User name --> Setup --> Administration Setup --> Security Controls--> Password Policies.
2. Change the policies according to the requirements as shown in the following screenshot:

3. The message and help link can be provided to the users in case they forget the password. If the system administrator forgets the password we can reset it using the reset link sent to the e-mail.

4. Click 'Save' button to save the changes.

User passwords expire in
The length of time until all user passwords expire and must be changed. Users with the “Password Never Expires” permission are not affected by this setting. The default is 90 days. This setting is not available for Self-Service portals.
Enforce password history
Save users’ previous passwords so that they must always reset their password to a new, unique password. Password history is not saved until you set this value. The default is 3 passwords remembered. You cannot select No passwords remembered unless you select Never expires for the User passwords expire in field. This setting is not available for Self-Service portals.
Minimum password length
The minimum number of characters required for a password. When you set this value, existing users aren’t affected until the next time they change their passwords. The default is 8 characters.
Password complexity requirement
The requirement for which types of characters must be used in a user’s password.
Complexity levels:
  • No restriction—allows any password value and is the least secure option.
  • Must mix alpha and numeric—requires at least one alphabetic character and one number. This is the default.
  • Must mix alpha, numeric, and special characters—requires at least one alphabetic character, one number, and one of the following characters: ! # $ % - _ = + < >.
Password question requirement
The values are Cannot contain password, meaning that the answer to the password hint question cannot contain the password itself; or None, the default, for no restrictions on the answer. The user’s answer to the password hint question is required. This setting is not available for Self-Service portals, Customer Portals, or partner portals.
Maximum invalid login attempts
The number of login failures allowed for a user before they become locked out. This setting is not available for Self-Service portals.
Lockout effective period
The duration of the login lockout. The default is 15 minutes. This setting is not available for Self-Service portals.Note
If users are locked out, they must wait until the lockout period expires. Alternatively, a user with the “Reset Passwords and Unlock Users” permission can unlock them by clicking Your Name | Setup | Manage Users | Users, selecting the user, then clicking Unlock. This button is only available when a user is locked out.
When set, this custom message appears in the Account Lockout email and at the bottom of the Confirm Identity screen for users resetting their passwords. You can customize it with the name of your internal help desk or a system administrator. For the lockout email, the message only appears for accounts that need an administrator to reset them. Lockouts due to time restrictions get a different system email message.
Help link
If set, this link displays with the text defined in the Message field. In the Account Lockout email, the URL displays just as it is typed into the Help link field, so the user can see where the link takes them. This is a security feature because the user is not within a Salesforce organization.
On the Confirm Identity password screen, the Help link URL combines with the text in the Message field to make a clickable link. Security isn’t an issue since the user is in a Salesforce organization when changing passwords.
Valid protocols:
  • http
  • https
  • mailto:

Sample output for Help Link and Message:


How to use a list variable in SOQL?

Sample Code:

    public List<String> ids = new List<String>{'003A0560014LLW9','a03A0000014LLWi','s03A000er14LLWq','a03A034d014LLWi','a03un000014LLWi','a03A0y00014LLW9','0019000000GuZEF'};

    public List<Account> acc {get;set;}
    public void find()
        acc = Database.Query('Select Name, SLA__c From Account Where Id IN: ids');       

Difference between Queue and Public Group

Public Group
Queue is used for load balancing
Public Group is solely used for sharing
Queue is a feature available to users that allows you to integrate prospect assignments with your current workflow. Rather than assigning to a specific user, you can choose to assign leads to a queue and then use your CRM workflow or manual method of distributing leads to sales representatives.
Public Group is kind of team or group of related users; this will help you to share the data.
Queue can be created for Custom objects and for Case, Lead and Knowledge Article Version.
Public group created can be used across any objects.

Standard fields in Salesforce

  1. Created By
  2. Last Modified By
  3. Owner
  4. CreatedDate
  5. ModifiedDate

Unable to find records in Search engine in Salesforce

Click 'Search All' link to extend your search to other objects.

Unable to add null values using Apex Data Loader

To insert null values using Apex Data Loader, go to Settings and enable "Insert Null Values" checkbox.

How to edit Report folder?

1. Go to Report tab.

2. Search the report folder.

3. Click down arrow next to folder name to edit the report folder.

Unable to schedule Report to internal SF users

1. Give the report folder access to all users.

2. Add your user as recipient in the report now.

3. Finally don't forget to re-restrict access to desired roles and/or groups.

Salesforce developer sample Interview questions

1.    What are sharing rules, when do you used sharing rules?
2.    Explain lead to opportunity conversion?
3.    What are record types? Why are the record types used?
4.    When is page layout assignment used?
5.    How is a pdf generated using visual force page?
6.    What are custom settings?
7.    What are Action Support, Action Function and Action Poller used for?
8.    What is rerender attribute used for?
9.    How can one read parameter values through the URL in Apex?
10.    How can sharing be done using Apex?
11.    Explain the trigger handler pattern?
12.    What deployment methods have you used? List advantages and disadvantages of each?
13.    How will you load data for a child object?
14.    Difference between a look up and master-detail relationship?
15.    Explain, the way you will query child from parent and parent from child
16.    Can 1 user be assigned multiple profiles, if yes how, if not, what is the work around?
17.    How many types of salesforce licenses are there? What are the limits?
18.    Which license will I use if users will only use 1 custom application?
19.    How will you avoid recursive triggers?
20.    How to bulkify triggers?
21.    Understand basic SOQL and Apex limits?
22.    What is with sharing and without sharing class?
23.    How can I create developer, full sandbox?
24.    In how many days can one refresh a full sandbox?
25.    How many users have you supported?
26.    What are permission sets and how do they differ from profiles?
27.    When will you use profile and permission sets together?
28.    Difference between roles and profiles?
29.    What are controllers?
30.    What are extensions?
31.    What is batch apex? Why do we use batch apex?
32.    What is @future method?
33.    What are test classes, what is the test coverage you need to move a code into production?
34.    How do I log a case with salesforce?
35.    Difference between a workflow rule and approval process?
36.    What are custom report types?
37.    What are different types of reports you can create?

List few components which cannot be deployed using IDE or change sets?

Components which cannot be deployed using IDE or change sets are
  1. Profiles
  2. Roles
  3. Users

How to schedule export or take backup of Salesforce data?

1. Go to Setup --> Administration Setup --> Data Mangement --> Data Export.

2. Click 'Schedule Export' button.

3. Fill the details as per your wish.

4. Click 'Save' Button.


Difference between Roles and Profiles

A role is used to maintain the role hierarchy.
Analyze the type of license used by the user.
Optional for User creation.
Mandatory for User creation.
Maintain Record level access.
Maintain object level access.

To understand about Roles and Profiles in Salesforce, create multiple users and assign roles and profiles to them and log in as them to experience it.