Top  Salesforce Interview Questions

Top Salesforce Interview Questions

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!!

This Post Has 17 Comments

  1. Jackie Beckford

    Thanks for putting these together.

  2. Fran

    Thank you, this is very helpful!

  3. I am sure this paragraph has touched all the internet
    viewers, its really really good piece of writing on building up new webpage.

  4. berkey

    You are so cool! I don’t believe I’ve read through something like that before. So nice to find somebody with genuine thoughts on this subject matter. Seriously.. many thanks for starting this up. This website is one thing that’s needed on the web, someone with a bit of originality!|

  5. Alvin Hilvers

    Hi, just wanted to take the time to comment and say that I really enjoyed reading your post.

  6. Teodoro Junious

    I used to be more than happy to seek out this internet-site.. I dont even know how I ended up here, but I thought this post was great. A lot more A rise in Agreeable.

  7. the feed

    Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.|

  8. thefeed

    It’s very trouble-free to find out any matter on net as compared to books, as I found this piece of writing at this web site.|

  9. feed

    It’s difficult to find experienced people on this subject, however, you seem like you know what you’re talking about! Thanks|

  10. thefeed

    Really when someone doesn’t understand after that its up to other people that they will assist, so here it takes place.|

  11. zortilonrel

    Its like you read my mind! You appear to know so much about this, like you wrote the book in it or something. I think that you could do with some pics to drive the message home a little bit, but instead of that, this is excellent blog. A great read. I’ll definitely be back.

  12. thefeed

    Appreciating the dedication you put into your site and in depth information you present. It’s awesome to come across a blog every once in a while that isn’t the same outdated rehashed material. Excellent read! I’ve saved your site and I’m adding your RSS feeds to my Google account.|

  13. frolep rotrem

    At this time it sounds like BlogEngine is the preferred blogging platform out there right now. (from what I’ve read) Is that what you are using on your blog?

  14. Anglea

    If some one wishes expert view on the topic of blogging and site-building then i suggest him/her to pay a visit this web site, Keep
    up the nice work.

Leave a Reply