Mytutorialrack

This post cover some important Salesforce interview questions. Salesforce is showing no signs of slowing. Salesforce Developer is one of the most demand profession out there.Even though with new features in salesforce platform which gives more power to salesforce adminstrators, the salesforce Developer will still continue to be in demand.
Salesforce developer will continue to bring innovation. I have written some more questions related to Salesforce interview preparation. I hope you will enjoy this post. I have also created a video course which covers important Salesforce Interview Question. Checkout the course here : https://courses.mytutorialrack.com/p/salesforce-interview-preparation/

Salesforce interview Question: General Question:

Question 1: What is the difference between a profile and a role?
Answers: Profiles control object level permissions like CRED (Create, Read, Edit and Delete). Profiles also control system level permissions like exporting data.
Roles control record level access. Roles work in hierarchial fashion which allows users the access to the records which are owned by the people down in the hierarchy.
Question 2: What are the three main types of object relationship in Salesforce?
Answer: Lookup Relationship
Master detail Relatonship
Many to many relationship
Let’s discuss each of these in detail:
Lookup Relationship: is used to link two objects. This is a loosely coupled relationship between two objects.
Master detail Relationship : is a tightly bound relationship between two object. In case of Master-detail relationship, if parent record is deleted, all the associated child records will also get deleted.
The child record inherits security of the parent record. In master-detail relationship, we can create roll-up summary fields which allows us to calculate data on the parent from the child records.
Many to Many relationship: In order to create a many to many relationship between two objects, we need to create a junction object. Junction object is the object which has two master detail relationship.
Question 3: What is SOQL used for?
SOQL stands for Salesforce Object Query Language. SOQL is very similar to SQL (Structured Query Language). SOQL is used to query salesforce data. It is used within Apex and visualforce to retrieve sets of data. Read more here
Question 4: What is the difference between force.com and Salesforce.com?
Answer: Salesforce.com is built on the force.com platform. Salesforce .com is SAAS ( Software-as-a-Service) whereas Force.com is a PAAS (Platform-as-a-service). Salesforce.com provides prepackaged solutions like Sales and Service cloud whereas Force.com allows you to build your own applications.
Question 5: What are the different ways to deploy from a Sandbox to production?
Answer: There are different ways to deploy from Sandbox to Production. Best way is to use a Salesforce feature called Change Sets which allow you to package the components and then deploy them to another Salesforce org.
There are other ways like Ant migration tool, force.com IDE and Unmanaged Package to deploy from Sandbox to production.
Question  6 : What are bucked field in Salesforce?
Answer: Bucket fields are used in Salesforce report to group field values.These fields only exist in the report. They are not created in Salesforce platform.

 Apex related Question:

Question 7: What is Apex?
Answer: Apex is a programming language for Force.com platform . Apex is strongly typed, case-insensitive, object- oriented programming language which allow developers to extend the Salesforce platform by writing their own business logic
into the platform. Apex is a sister language to Java and you can invoke apex through various user-initiated events like record updates, triggers or objects or user-intiated events.
Question 8: Can you customize Apex and visualforce directly in a production org? 
Answer: You cannot customize Apex in a production org. In order to deploy changes to Production org, you have to first test the changes in sandbox and after it meets the 75% code coverage, it can be deployed to production through sandbox.
Visualforce can be customized directly in production org but it is not recommended.
Question 9: What are the different ways to run a Apex trigger?
Answer: Apex trigger can either run before saving the record or after the record is saved. A before operation is used to validate information which we are going to insert and after trigger is used to access data which has been previously entered by a user
or system.
Question 10: When to use Apex over workflow and Process builder?
Answers: There are some feature limitations associated with Workflow Rules and Process builder. In order to overcome, we have to use Apex. For example, retrieving information from external system.
Whenever we have to work with large sets of data, Apex can be more efficient as compared to the declarative options (workflow and process builder) because apex has less limitations.
Question 11: What are Governor Limits? Can you give some examples?
Answer: As you know that, Salesforce runs on a multitenant platform which means resources like storage, CPU, and memory are shared with other companies on the platform. So we need to apply limits to ensure that all the companies are
using the Salesforce architecture within the limits so that no company monopolize shared resources.
For example:
Total number of SOQL queries issued :-200 (Asynchronous), 100 (Synchronous)
Total number of DML statements (150)
Total number of records retrived by a SOQL query -: 50000
Question 12: What is Apex test coverage? What is the minimum test coverage needed to deploy from sandbox to production?
Answer: To make sure your code is meeting the standard, apex code coverage will tell you how many executable lines of code in your apex classes and triggers is tested using test methods. In order to deploy the code from sandbox to
production,you need to have minimum of 75% code coverage.
Question 13: List some best practices to follow when writing Apex.
Answer: Avoid writing SOQL queries or DML statements inside for loops.
Avoid hardcoding Ids
Use of limit apex method to avoid hitting governor limits
Queryring large data sets
Question 14 : What are the different types of collection in Apex?
Answer: There are three main types of collection:
List, Set and Maps
List: List is an ordered collection of elements and each of the element in the list has a index and index in list start from 0.You can have duplicates inside of a list. List can be of any data type- primitive types, collections,sObjects, built-in apex types of user -defined types.
Sets: A set is unordered collection of elements and you can not have duplicate elements inside of a list. Sets can also be of any data type – primitive types, collections, sObject, user-defined types and built-in apex types.
Maps: A map is a collection of key value pair where each Key is mapped to a a value.
I hope you have enjoyed this list of Salesforce Interview Question. Please share these with your friends and colleagues. Thank you!!

Share:

Recent Posts