Call: IN +91 7013283324 | +91 9347854179

(Click on WhatsApp Chat button)
Call: US +1 (415) 529-7271

108+ Salesforce Interview Questions

Home  >>  108+ Salesforce Interview Questions

What is Apex?

Ans: It is the in-house technology of which is similar to Java programming with object oriented concepts and to write our own custom logic.

What is S-Control?

Ans: S-Controls are the predominant widgets which are completely based on Javascript. These are hosted by salesforce but executed at the client side. S-Controls are superseded by Visualforce now.

What is a Visualforce Page ?

Ans: Visualforce is the new markup language from salesforce, by using which, We can render the standard styles of salesforce. We can still use HTML here in Visualforce. Each visualforce tag always begins with “apex” namespace. All the design part can be accomplished by using Visualforce Markup Language and the business logic can be written in custom controllers associated with the Page.

Will Visual force still support the merge fields usage like S-control ?

Yes. Just like S-Controls, Visualforce Pages support embedded merge fields, like the {!$User.FirstName} used in the example.

Where to write Visualforce code ?

Ans: You can write the code basically in 3 ways.

  1. setup->App Setup->Develop->Pages and create new Visulaforce page.
  1. Setup -> My Personal Information -> Personal Information -> Edit check the checkbox development mode. When you run the page like this, you will find the Page editor at the bottom of the page. You can write you page as well as the controller class associated with it, there it self.
  1. Using EclipseIDE you can create the Visulaforce page and write the code.
What are Apex Governor Limits?

Governor limits are runtime limits enforced by the Apex runtime engine. Because 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 memory, database resources, number of script statements to avoid infinite loops, and number of records being processed. If code exceeds a limit, the associated governor issues a runtime exception.

How to create and host S Control in Salesforce?

To demonstrate this, lets consider an example of Google Map.

Lets create a S-Control for the Google Map.

Now let’s first create a new S-Control:

  1. Click on “Setup” which is located on the top right corner of the page.
  2. Expand “Develop” item and click on “S-Controls”
  3. Hit “New Custom S-Control”
  4. Provide a Label “Google Map” and a description is you wished to
  5. The Type should be HTML since we want to create a HTML, Google API mash up
  6. Now it is time to enter the code for the S-Control.
Difference between Sandbox and Development environment?


The Sandbox environment is an exact copy of your instance. You can copy your live instance to a sandbox environment (but you have to perform manually from sandbox to developer edition) where you can test any changes, implementations, AppExchange apps or updates. It can also be your hands-on training environment without risking your live data.

Developer Edition

Developer Edition was an edition created for development of integrations and apps, specifically for the AppExchange. It is also a great tool for testing/training in What makes this a great tool is the fact that it is free. Anyone can get a Developer Edition of It is a standard Enterprise Edition with very limited storage space. You cannot copy your configuration or data onto the Developer Edition, but you can customize it to match your instance’s look and feel. Once it is customized, you can use it for training, testing or anything else you want. It takes a little bit of work, but you can make it act and feel just like your live instance. The work is well worth it for the free price.

How to schedule export or take the backup of salesforce?

Step by Step Instruction:

  1. Click Setup >Data Management > Data Export > Schedule Export.
  2. Select the desired encoding for your export file. Leaving the default is fine.
  3. Check the Include in export checkbox if you want to include attachments in the export (optional)
  4. Leave the default Replace carriage returns with spaces if you want your export files to have spaces instead of carriage returns.
  5. Select Weekly as the the frequency for the exports.
  6. Choose start and end dates. Set the end date to sometime in the distant future such as 20 years from the begin date.
  7. Set the time of day for your scheduled export. The export is put in a job queue and the exact time of the export will depend on the amount of activity in the queue.
  8. You can select the types of data to include in your export. It is best to include all data in your export file. This will make sure all your organizations data is exported.
  9. Click Save.
Do governor limits apply to sandbox instances?

Ans : Governor limits do apply to all Salesforce instances (trial, developer, production or sandbox environments). However code coverage and successful execution of test classes is only enforced when deploying to a production environment.

What is difference in ISNULL and ISBLANK?


  • Determines if an expression is null (blank) and returns TRUE if it is. If it contains a value, this function returns FALSE.
  • Text fields are never null, so using this function with a text field always returns false. For example, the formula field IF(ISNULL(new__c) 1, 0) is always zero regardless of the value in the New field. For text fields, use the ISBLANK function instead.
  • Multi-select picklist fields are never null in s-controls, buttons, and email templates, so using this function with a multi-select picklist field in those contexts always returns false.
  • Empty date and date/time fields always return true when referenced in ISNULL functions.
  • Choose Treat blank fields as blanks for your formula when referencing a number, percent, or currency field in an ISNULL function. Choosing Treat blank fields as zeroes gives blank fields the value of zero so none of them will be null.
  • Merge fields can be handled as blanks, which can affect the results of components like s-controls because they can call this function.
  • When using a validation rule to ensure that a number field contains a specific value, use the ISNULL function to include fields that do not contain any value. For example, to validate that a custom field contains a value of ’1,’ use the following validation rule to display an error if the field is blank or any other number: OR(ISNULL(field__c), field__c<>1)


  • Determines if an expression has a value and returns TRUE if it does not. If it contains a value, this function returns FALSE.
  • Use ISBLANK instead of ISNULL in new formulas. ISBLANK has the same functionality as ISNULL, but also supports text fields. will continue to support ISNULL, so you do not need to change any existing formulas.
  • A field is not empty if it contains a character, blank space, or zero. For example, a field that contains a space inserted with the spacebar is not empty.
  • Use the BLANKVALUE function to return a specified string if the field does not have a value; use the ISBLANK function if you only want to check if the field has a value.
  • If you use this function with a numeric field, the function only returns TRUE if the field has no value and is not configured to treat blank fields as zeroes.
Is it possible to write the Apex code from user Interface?

You can add, edit, or delete Apex using the user interface only in a Developer Edition organization, a Enterprise Edition trial organization, or sandbox organization. In a production organization, you can only make changes to Apex by using the Metadata API ,


deploycall, the IDE, or Migration Tool. The IDE and Migration Tool are free resources provided by to support its users and partners, but are not considered part of our Services for purposes of the Master Subscription Agreement.

When you can’t add Time dependent action in Workflow rule?

You can’t add time-dependent actions to a rule if you choose Every time a record is created or edited.

What are the types of email templates available in
  1. Text
  2. HTML with Letter Head
  3. Custom HTML
  4. Visual force
What are the different Editions and Limits?
What is Roll up summary field in Salesforce?

Roll up summary field in salesforce calculates the Count, Sum, Min or Max of particular field of any child record. Thus, we can say that Roll up summary field can only be created on Master object.

What will happen if the Account is deleted?

If the Account is deleted then Contact, Opportunity will also be deleted from Salesforce which are related to that Account.

From the database perspective, check below image of child relationships of Account:

Account Child relationship in salesforce

If we use schema builder, released in Winter 12 it would look like:

Account Contact and Opportunity of salesforce in schema builder

How many types of the relationship fields available in Salesforce?
  1. Master Detail
  1. Many to Many
  1. Lookup
  1. Hierarchical (It is available only on User Object, we cannot create this relationship)
How to create many to many relationships between object?

Creating many to many relationship in salesforce is little tricky. You cannot create this type of relationship directly. Follow below steps to create this type of relationship.

Create both objects which should be interlinked.

Create one custom object (also called as junction object), which should have autonumber as unique identification and create two master relationships for both objects, no need create tab for this object.

Now on both object, add this field as related list

In Which sequence Trigger and automation rules run in

The following is the order salesforce logic is applied to a record.

  1. Old record loaded from database (or initialized for new inserts)
  1. New record values overwrite old values
  1. System Validation Rules
  1. All Apex “before” triggers (EE / UE only)
  1. Custom Validation Rules
  1. Record saved to database (but not committed)
  1. Record reloaded from database
  1. All Apex “after” triggers (EE / UE only)
  1. Assignment rules
  1. Auto-response rules
  1. Workflow rules
  1. Escalation rules
  1. Parent Rollup Summary Formula value updated (if present)
  1. Database commit
  1. Post-commit logic (sending email)

Additional notes: There is no way to control the order of execution within each group above.

If one object in Salesforce have 2 triggers which runs “before insert”. Is there any way to control the sequence of execution of these triggers?

Ans : has documented that trigger sequence cannot be predefined. As a best practice create one trigger per object and use comment blocks to separate different logic blocks. By having all logic in one trigger you may also be able to optimize on your SOQL queries.

How to delete the User from Salesforce?

As per now, salesforce does not allow to delete any user, however you can deactivate the user.

How to delete the users data from Salesforce?

Ans : To delete the Users Data go to Setup | Administration Setup | Data Management | Mass Delete Record, from there select the objects like Account, Lead etc and in criteria select the users name and delete all records of that user related to particular object.

How to restrict the user to see any record, lets say opportunity?

Ans : set up opportunity sharing to be private. If both users are admins or have view all records on opportunity, then that overrides private sharing.

hat is the difference between and trigger.old in Apex – SFDC? :

Returns a list of the new versions of the sObject records.

Note that this sObject list is only available in

insert and

update triggers, and the records can only be modified in


Trigger.old :

Returns a list of the old versions of the sObject records.

Note that this sObject list is only available in

update and

delete triggers.

We will provide the answers to these questions in our training program. We will share latest Salesforce interview questions and answers material.

Enroll for our FREE demo class here.

Request Live Demo Invitation

Get notified on our Free Interactive Online Demo Session.

Please wait...

Check Reviews
Go to Contact Us

Registration Form

Please wait...

Download Curriculum

Please wait...