Salesforce Interview Questions and Answers

1) What is App in Salesforce? Ans: An app is a group of tabs that work as a unit to provide functionality. Users can switch between apps using the Force app drop-down menu at the top-right corner of every page. You can customize existing apps to match the way you work, or build new apps by grouping standard and custom tabs. Navigation to create app in Sales force: Setup ->Build ->Create->App-> Click on new and create your application according to your requirements.
2) What is object in Salesforce? Ans: Custom objects are database tables that allow you to store data specific to your organization in Salesforce You can use custom objects to extend Salesforce functionality or to build new application functionality. Once you have created a custom object, you can create a custom tab, custom related lists, reports, and dashboards for users to interact with the custom object data. You can also access custom object data through the Force API. Navigation to create object in sales force: Setup->Build->Create->Object-> Click on new object and create object according to your requirement.
3) How many relationships included in SFDC & What are they?  Ans: We are having two types of relationships, they are Lookup Relationship Master-Detail Relationship
4)  What is a “Lookup Relationship”? Ans: This type of relationship links two objects together, Upto 25 allowed for object Parent is not a required field. No impact on a security and access.No impact on deletion. Can be multiple layers deep. Lookup field is not required.
5) What is “Master-Detail Relationship”? Ans: Master Detail relationship is the Parent child relationship. In which Master represents Parent and detail represents Child. If Parent is deleted then Child also gets deleted. Rollup summary fields can only be created on Master records which will calculate the SUM, AVG, MIN of the Child records. Upto 2 allowed for object. Parent field on child is required. Access to parent determines access to children. Deleting parent automatically deletes child. A child of one master detail relationship cannot be the parent of another. Lookup field on page layout is required.
6) How can I create Many  to  Many relationship? Ans: Lookup and Master detail relationships are one to many relationships. We can create many to Many relationship by using junction object. Junction object is a custom object with two master detail relationships.
7)  A custom object contains some records, now my requirement is to create field in this object with master detail relationship. Can we create master detail relationship in this case? Ans: No, directly we cannot create master details relationship if custom object contains existing records. Following are the steps to create to create master-detail relationship when records are available in custom object.First create field with lookup relationship. And then associate look field with parent record for every record. Next change the data type of the field from look up to Master detail.
8) List examples of custom field types? Ans: Text, Pick list, Pick list (multi select), Date, Email, Date/Time, Date, Currency, Checkbox, Number, Percent, Phone, URL, Text Area, Geolocation, lookup relationship, master detail relationship etc…..
9) What is TAB in Salesforce? Ans: Tab is a user interface component to user creates to display custom object data. There are three type of tabs.
  1. Custom Tabs
  2. Visual force Tabs
  3. Web Tabs

10) Does user can create insert their own custom logo, while creating their own custom applications? Ans: Yes user can upload their custom logo in documents and then they choose that logo for organization.
11)  List things that can be customized on page layouts? Ans: We can customize different things on page layout like, Fields, Buttons, Custom Links and Related Lists. We can also create sections.
12)  What is a “Self Relationship”? Ans:  Self Relationship is a lookup relationship to the same object. Suppose let’s take an object “Merchandise”. Here we can create relationship in between the Account to Account (same object) object. That is called “Self Relationship”.
13) What are the main things need to consider in the “Master-Detail Relationship”? Ans: Record level access is determined by the parent, Mandatory on child for reference of parent, cascade delete (if you delete the parent, it can cascade delete the child).
14) What is difference between trigger and workflow? Ans: Workflow:
  • Workflow is automated process that fired an action based on Evaluation criteria and rule criteria.
  • We can access a workflow across the object.
  • We cannot perform DML operation on workflow
  • We cannot query from database
Trigger:
  • Trigger is a piece of code that executes before or after a record is inserted or updated.
  • We can access the trigger across the object and related to that objects
  • We can use 20 DML operations in one trigger.
  • We can use 20 SOQL’s from data base in one trigger.

15) What is Wrapper class?   Ans:  A Wrapper class is a class whose instances are collection of other objects. It is used to display different objects on a Visual Force page in same table.
16) What is Difference between SOQL and SOSL? Ans: SOQL(Salesforce Object Query Language):
  • Using SOQL we can Search only on one object at a time.
  • We can query on all fields of any datatype
  • We can use SOQL in Triggers and classes.
  • We can perform DML operation on query results.
SOSL(Salesforce object Search Language):
  • Using SOSL we can search on many objects at a time.
  • We can query only on fields whose data type is text,phone and Email.
  • We can use in calsses but not in Triggers.
  • We cannot perform DML operation on search result

17) What is difference insert() and database .insert() ? Ans: Using insert method we can insert the records but if any error occurs in any record system will throw an error insertion fail and none of the records are inserted. If we want to execute partially success of bulk insert operation we will use database .insert.
18) What is Static Resources? Ans: Using Static Resources we can upload images, zip files, jar files, java script and CSS files that can be referred in a visual force page. The maximum size of Static Resources for an organization is 250mB.
19) How to call java script using Static Resource in Visual Force page? Ans:  Add javascript file in Static Resource setup -> develop -> Static Resources -> Click on ‘New’ -> Name: filename and add file from local desktop and save. We can use that file as follows in VisualForce page
20) What is sharing rule? Ans: If we want to give the access to other users we use sharing rules.
21) How many ways we can share a record? Ans: Role Hierarchy: If we add a user to a role, the user is above in the role hierarchy will have read access. Setup -> manage users -> roles -> setup roles -> click on ‘add role’ -> provide name and save. OWD: Defines the base line setting for the organization. Defines the level of access to the user can see the other user’s record OWD can be Private, Public Read Only, Public Read and Write. Setup -> Security Controls -> sharing settings -> Click on ‘Edit’ Manual Sharing: Manual Sharing is sharing a single record to single user or group of users. We can see this button detail page of the record and this is visible only when OWD setting is private. Criteria Based Sharing rules: If we want to share records based on condition like share records to group of users Whose criteria are country is India. Setup -> security controls -> sharing settings -> select the object and provide name and Conditions and save
22) What are the actions in workflow?     Ans:  1. Email Alert 2. Task 3. Field Update 4. Outbound Message
23)  How many ways we can made field is required? Ans:  1. While creation of field 2. Validation rules 3. Page Layout level
24)  What is difference between Role and Profile?  Ans: Role is Record level access and it is not mandatory for all users. Profile is object level and field level access and it is mandatory for all users.
25) What is the maximum size of the PDF generated on visualforce attribute renderAs? Ans:       15MB
26)  How many controllers can be used in a visual force page?  Ans:  Salesforce come under SAAS so, we can use one controller and as many extension controllers.
27)  What is difference between Action support and Action function? Ans: Action function:  Invoke the controller method from java script using AJAX and we can use action function from different places on visual force page. Action support: Invoke the controller method using AJAX when even occurs on page like onMouseOver, onClick, ect… and we can use action support for particular single apex component.
28) How many ways we can call the Apex class? Ans: 1. Visual force page 2. Web Service 3. Triggers 4. Email services
29) How to create Master Details relationship between existing records? Ans: Directly we can’t create Master Detail relationship between existing records, first we have to create Lookup relationship and provide valid lookup fields and it shouldn’t  null.
30) What is permission set? Ans: Permission sets extend user’s functional access without changing user’s profile. Ex:  A user has only read access through profile on custom object, administrator want to give access Edit and create operations to him without changing the profile. Administrator creates the permission set having edit and creates operation on custom object and assign to that user.
31) What is manual sharing? Ans: Manual sharing is to share a record to a particular user manually. Go to detail page of record and click on manual sharing button and assign that record to other user with Read or Read/Write access. Manual Sharing button enables only when OWD is private to that object.
32) How we can change the Grant access using role hierarchy for standard objects? Ans: Not possible.
33) What is the use of “Transfer Record” in profile? Ans: If user have only Read access on particular record but he wants to change the owner name of that record, then in profile level Transfer Record enables he can able to change the owner.
34) What is Field dependency? Ans: According to the field selection on one field filter the pick list values on other field.
35) Is check box performs like controlling field? Ans: Yes possible. Controlling field should be Check box or pick list.
36) How many field dependencies we can use in Visual Force page? Ans: Maximum we can use 10 field dependencies in VF page.
37) What is Roll-up summary? Ans: Roll-up displays the count of child records and calculate the sum, min and max of fields of the child records.
38) How to create Roll-up summary field on lookup relation? Ans:  Not possible. Roll-up summary is enabled for only Master–Detail relationship.
39) What are the Record Types? Ans: Record Types are restrict the pick list values and assign to the different page layouts for different Record Types.
40) What is Audit Trail? Ans: Audit Trail provides the information or track all the recent setup changes that an administrator done to the organization. This can store the last 6 months data.
41) What are the Report Types? Ans:              Four Types of report in Salesforce Tabular Reports: We can only displays the grand total in the table form. Summary Reports: It is a detail form of report in which the grouping done based on Columns. Matrix Reports: It is a detail form of report in which the grouping done based on both Rows and Columns. Joined Reports: We can join the two or more reports in the single report displayed in the form of blocks.
42) What is Dashboard? Ans:  Dashboard is a pictorial representation of report. We can add up to 20 reports in single dashboard.
43) What is Apex? Ans: It is the technology of Salesforce which is similar to Java programming with object oriented concepts and to write our own custom logic.
44) What is S-Control? Ans: S-Controls are completely based on Javascript. These S-Controls are deprecated in 2007 because it is not supporting Apex Language properly. Now S-Controls are superseded by Visualforce now.
45) 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 determined by using Visualforce Markup Language and the business logic can be written in custom controllers associated with the Page.
46) Will Visual force still supports the merge fields usage like S-control ? Ans: Yes. Just like S-Controls, Visualforce Pages support embedded merge fields, like the {!$User.FirstName} {!Account.Name}
47) Where to write Visualforce code? Ans: We can write the code basically in 3 ways. a. setup->App Setup->Develop->Pages and create new Visulaforce page. b. Setup -> My Personal Information -> Personal Information -> Edit check the checkbox development mode. we will find the Page editor at the bottom of the page. we can write page as well as the controller class associated with it, there itself. c. Using Eclipse IDE we can create the Visulaforce page and write the code.
48) What are Apex Governor Limits? Ans: 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.
49) What are the types of sandboxes and what is the difference? Ans: Salesforce gives us the ability to create multiple copies of organization in separate environments for a variety of purposes, such as testing and training,without compromising the data and applications in Salesforce production organization. These copies are called Sandboxes and are nearly identical to Salesforce production organization Sandboxes are completely isolated from Salesforce production organization, so operations we perform in sandboxes do not affect Salesforce production organization, and vice versa. The Sandbox types are: Configuration Only: Configuration-only sandboxes copy all of production organization’s reports, dashboards, price books, products, apps, and customizations under Your Name ->Setup, but exclude all of organization’s standard and custom object records, documents, and attachments. Creating a configuration-only sandbox can decrease the time it takes to create or refresh a sandbox from several hours to just a few minutes, but it can only include up to 500 MB of data. We can refresh a configuration-only sandbox once per day. Developer Sandbox: Developer sandboxes are special configuration-only sandboxes intended for coding and testing by a single developer. Just like configuration-only sandboxes, developer sandboxes copy all application and configuration information to the sandbox. Developer sandboxes are limited to 10 MB of test or sampledata, which is enough for many development and testing tasks. We can refresh a developer sandbox once per day. Full: Full sandboxes copy entire production organization and all its data, including standard and custom object records, documents, and attachments.
50) How to schedule export or take the backup of salesforce? Ans: Salesforce allows us to obtain a copy of all data using the data export feature. We can generate backup files manually once every six days or schedule them to generate automatically at weekly or monthly intervals. The backup file will come to us in the form a zip file that contains all of organizations data in aset of CSV (comma-separated values) files. If we do not see the data export feature, contact salesforce support to have the Data Export Service activated. The following path will tells us how to schedule the export Click Setup -> Data Management -> Data Export -> Schedule Export Note: 1. we have 48 hours from the time we are notified the backup is available to download the backup file. 2. The email notification for backups goes to the email address in Salesforce of the person logged in who schedules the backup
51) Do governor limits apply to sandbox instances? Ans: Governor Limits do apply to all Salesforce instances (trial, developer, and production or sandbox environments). However code coverage and successful execution of test classes is only enforced when deploying to a production environment.
52) What is difference in ISNULL and ISBLANK? Ans: Both Determines if an expression has a value and returns TRUE if it does not. If it contains a value, this function returns FALSE ISBLANK (expression): The expression allows both number and text fields. Both number and text fields ISNULL(expression): Here the expression allows only number fields number fields
53) What is the difference between the Workflow and Approval Process? Ans: Workflow Rules and Approval Processes can be used together Workflow Rules Approval Processes Are triggered upon Save Are triggered only when a user clicks Submit for Approval button Consist of one set of criteria and actions Consist of multiple steps Have an entry criteria, step criteria and step actions Have Initial submission actions, rejection and approval actions and actions for each step Can be modified or deleted Some attributes can t be modified , processes must be deactivated before they can be deleted
54) When we can t add Time dependent action in Workflow rule? Ans: We can t add time-dependent actions to a rule if we choose Every time a record is created oredited evaluation rule criteria.
55) What are the types of email templates available in salesforce? Ans: There are four kinds of Email Templates
  1. Text
  2.  HTML with Letter Head
  3. Custom HTML
  4. Visualforce

56) What is Roll up summary field in Salesforce? Ans: A read-only field that displays the sum, minimum, or maximum value of a field in a related list or the record count of all records listed in a related list. Thus, we can say that Roll up summary field can only be created on Master object.
57) What are the Record Types? Ans: Record types used to display different picklist values and page layouts to different users based on their profiles
58) Have you implemented Record Types in your project? Ans: Yes, we have created Record Types and we have done Page Layout Assignment also
59) How to make the Record type as a default? Ans: By using the Profiles. Go to the particular profile and by using Record Type Settings we can make the Record Type as a default
60) What will happen if the Account is deleted? Ans: If the Account is deleted then Contact, Opportunity will also be deleted from Salesforce which are related to that Account.
61) How many types of the relationship fields available in Salesforce? Ans: There are four types of relationships in salesforcea.
  1. Master Detail
  2. Many to Many
  3. Lookup
  4. Hierarchical (It is available onlyon User Object)
Naveen E

Naveen E

Author

Hola peeps! Meet an adventure maniac, seeking life in every moment, interacting and writing at Asha24.