Q1) Differentiate between a role and a profile
Ans: A profile is a collection of permissions and settings with the given access to the user to work on an application. It is mandatory to define a profile for a user. The profile controls permissions for object, field, user and settings for apps, tabs, access for apex class, visual force page, login hours, page layouts.
A role helps to provide record-level security by controlling the data visibility levels. The users can view, edit and report the data that they have access and with the hierarchy. Every user need not have a role mandatorily.
Q2) What is the salesforce object query language used for?
Ans: The Salesforce object query language also known as SOQL retrieves records using the SELECT command from the database.
Q3) What is the difference between force.com and salesforce.com?
Ans: Force.com is a platform as a service. The developers create apps and websites using the IDE and later deploy them in the multi-tenant servers of force.com. It has simplified the development and deployment of cloud-based applications.
Salesforce.com is a service-as-a-platform, which has three core products. They are sales cloud, service cloud and marketing cloud. Sales cloud can be purchased to get leads, opportunities and reports.
Salesforce.com is built on force.com and can be interchangeable from the technical point of view.
Q4) What is a visual force?
Ans: Visualforce in salesforce are web pages created using markup language similar to HTML but not exactly HTML. The primary objective of visual force is to display, update and access the organizational data.
Q5) What is OAuth?
Ans: OAuth is a protocol which describes the authenticated access of the servers and services into the assets. It is an open standard authorization protocol or a framework. The open standard grants access to internet users without sharing passwords.
Q6) What is the salesforce API?
Ans: Salesforce provides access to organizational data and information using an application programming interface (API). The API is a programming interface which facilitates the communication between one application and another. Third-party integration and communication are also possible through API.
Q7) What is salesforce connect?
Ans: Salesforce Connect is a cloud integration application which allows users to access and manage data in external applications. The external data can be displayed with salesforce connect without creating a record.
Q8) What is a custom object in Salesforce?
Ans: A custom object helps to store organizational information or retain salesforce.com. When a custom object is created, the salesfore.com builds a page layout for the user interface.
Q9) What is a formula field?
Ans: A formula field is a read-only field which is created in both standard and custom objects. The value of the formula field is evaluated from the expression defined by the developer.
Q10) Define and describe various data types.
Ans: A data type stores the information stored in a particular field. In salesforce, the following data types are present:
- ID: it is an integer and a primary key field for the salesforce object
- String: This is a character string.
- Boolean: This is an integer which gives true or false values
- Double: This data type is used for currency, formula, per cent, number etc.
- Varies by type: This is a formula field
Q11) Define trigger and describe the types of triggers
Ans: A trigger is an Apex script. Apex triggers perform custom actions before and after events. The triggers can help to perform operations under certain conditions like modification or restriction of certain operations. There are two types of triggers.
Before trigger: Before trigger validates record values before saving to database
After trigger: After trigger validates record values after saving to the database.
Q12) What is the difference between triggers and workflows?
Ans: A trigger is a coding and programming approach. A trigger can be applied to any type of object.
Workflow does not require any coding. A workflow is a business logic engine which automates some actions based on criteria.
Q13) What is trigger.new?
Ans: A trigger is a new command that returns the new versions of the sObject record. The records can be modified before trigger option only. In simple terms, all the records which are yet to be saved in the database will be returned.
Q14) Differentiate between workflow and process builder
Ans: Workflows and process builders in salesforce are declarative automation tools. Both tools can extend the functionality of the Salesforce platform. Both tools can automate business processes.
A workflow can handle only four functionalities like email alerts, create tasks, outbound messages, fields updates. A process builder has more functionalities like record creation, launch a flow, approval submission, quick actions, post to charter.
Q15) What is the difference between standard and custom controller?
Ans: Standard controllers can be implemented on standard and custom objects. A standard controller has the same logic and functionalities and can automatically generate for all the standard pages.
An Apex is used to write a custom controller. Customer controller overwrites the standard controller which appears in the Visualforce page.
Inclined to build a profession as SalesForce Developer? Then here is the blog post on, explore SalesForce Training
Q16) How do you implement pagination?
Ans: Pagination is a display of many records spread across multiple pages. The list controls 20 records, hence pagination helps to change the page size with controller extension.
Q17) What is an object relationship overview?
Ans: In object relationships, a bi-directional relationship is built between two objects. An object relationship connects standard and custom objects. The salesforce platform supports three types of object relationship; master-detail relationship, lookup relationship, many-to-many relationships, indirect lookup, external lookup, hierarchical lookup.
Q18) How many report types are available in Salesforce?
Ans: Salesforce has four types of report types. They are:
A tabular report gives the total in a tabular format. A matrix report groups in rows and columns. A summary report gives a detailed report based on the columns. Joined reports helps to visualize two or more reports in a single report.
Q19) Differentiate between SOQL and SOSL?
Ans: SOQL stands for salesforce object query language, allows a single object query at a time. SOSL stands for salesforce object search language, lets the search of text, emails, phone fields, with various objects. SOQL is used in triggers and classes whereas SOSL is used only in classes.
Q20) Define a sharing rule
Ans: A sharing rule enables greater user access based on certain criteria. In the sharing rule, user access is extended to users, roles, public groups, and other organizations for greater access.
Q21) What are the external ID fields?
Ans: An external id contains a unique record identifier to import records. It is a custom field which has an external id attribute. When the option is selected, the data import wizard detects existing records and matches with values in the import file.
Q22) How custom settings are used in Salesforce?
Ans: A custom setting is similar to a custom object. A custom setting helps the developers to create a custom set of data for the organization, profile or specific user. There are two types of custom settings; list and hierarchy.
Q23) Explain the concept of the static resource
Q24) How is an outbound message used?
Ans: An outbound message helps to send information to the specified URL endpoint. The outbound message is a part of the workflow. The outbound message sends configurable API messages to the intended listener.
Q25) Differentiate between isNull and isBlank
Ans: The isnull determines if an expression is blank or null. If it is blank then it returns TRUE. If it is not blank or not null, then the function returns FALSE.
The isblank determines if an expression has any value in it. If there is no value then, it returns TRUE. If an expression has any value then it returns FALSE.
Salesforce Technical Interview Questions
Q26) Describe permission sets
Ans: A permission set is a collection of permissions and settings to access various tools and functions in the Salesforce. A user can have multiple permission sets but only one user set.
Q27) Explain the functionality of sandbox and various types of the sandbox in salesforce?
Ans: Sandboxes in salesforce help to create multiple copies of the same environment without any compromise on the data. These copies can be used in the development, testing and training.
There are four types of sandboxes:
Developer Sandbox: A developer sandbox copies all the configurations and applications in the sandbox. The sandbox accommodates 200 MB of test or sample data.
Developer Pro Sandbox: A Pro sandbox copies products, apps, reports, dashboard, setup customizations. The organizational standard documents, attachments, and standard custom object records. The ProSandbox accommodates 1GB of sample data or test data.
Partial Data Sandbox: This is a developer sandbox and data defined in a sandbox template. This sandbox copies dashboard, reports, products, apps, price books, all metadata customizations. The partial data sandbox accommodates up to 5GB data and 10,000 records per selected object.
Full Sandbox: The full sandbox copies standard and custom object records, documents and attachments. They can create an exact copy of all the data in production.
Q28) What are bucket fields in Salesforce?
Ans: A bucket field categorizes records without any formula or custom fields in salesforce reports. A bucket field lets grouping of records by ranges and segments.
Q29) Differentiate between Whoid and Whatid
Ans: The Whoid refers to persons and contacts. The Whatis refers to objects.
Q30) What is the concept of Maps in Apex
Ans: Maps in Apex are used to store data in the key-value pair. Each unique key maps to a single value.
Q31) What the Apex transaction
Ans: Apex is an object-oriented programming language which helps the developers to execute the transaction and flow statements. They are executed on salesforce servers. Apex lets the developers write their own business logic and extends the Salesforce platform.
Q32) Explain the use of Apex email service
Ans: Apex email service is used to process the content, headers and attachments of the inbound mails. The Apex email service helps to create contact records based on the contact-related information in the e-mails.
Q33) What are the different types of email templates?
Ans: The following templates are available in salesforce:
Text template: Any user can change or modify the template
HTML with letterhead: This email template can be created by administrators and users with edit HTML permissions based on letterheads
Custom HTML: This email template can be created by users and administrators with edit permissions without letterheads can create this template.
Visualforce email template: The administrators and developers working on visual force can create the visual force template. This template has the capability of merging data from various records.
Q34) Explain the various types of collections in Apex
Ans: There are three types of Apex collections:
List collections: The list collection has ordered collection of elements distinguished by the indices.
The Map collections: A map collection consists of key-value pairs. Every unique key gets mapped to a unique value.
The set collection: The set collection consists of unordered primitive or SObject elements.
Q35) What are the different types of bindings in Salesforce?
Ans: Binding in salesforce refers to the binding data set from page to controller. There are three types of binding.
Data binding: This refers to the data in the controller
Action binding: These refer to action set in the controller
Component binding: This refers to visual force components
Salesforce Interview Questions For Freshers
Q36) How is the blob variable used in Salesforce?
Ans: A blob variable collects binary data. It is stored as a single object. Blobs can be used as web service arguments which are sent as attachments or stored in a document.
Q37) Which fields are automatically Indexed in Salesforce?
Ans: The following fields are automatically indexed in Salesforce.
- Primary keys: name, id
- Foreign keys: Master-detail relation (MDR) keys
- Audit date: last modification date
- Custom field: Unique id or external id
Q38) What APIs are used to access data from force.com?
Ans: Salesforce uses a set of APIs to access data from force.com. They are:
- SOAP API: This API uses SOAP as a wrapper for API operations. The SOAP messages are required in enterprise messages.
- REST API: This API is useful when a response needs to be sent from client to server and back to the client. The REST API uses HTTP methods to create dynamic interfaces and integrate with force.com
- Bulk API: The BULK API is based on the REST API. This API helps to load and delete large sets of data asynchronously.
- Streaming API: Streaming acts like radar and defines events and push notifications.
Q39) In how many ways salesforce code can be deployed?
Ans: Salesforce deployment can be done by transfer of metadata from one Salesforce organization to another one. Salesforce code can be deployed in the following ways:
Eclipse with Force.com IDE
Force.com Migration Tool – ANT/Java-based
Q40) How do you write test classes?
Ans: The test classes are the maximum number of codes per line at the time of execution. Test classes are effective tools to test the code if it is robust and error-free. Test classes ensure proper operation of Apex customization.
Q41) What is the use of “@future” annotation?
Ans: @future is known as a future annotation. A Future annotation is used in asynchronous identification and execution of the methods. When a method is annotated with @future, then execution happens only when Salesforce has available resources.
Q42) What is development mode?
Ans: A development model helps the developers to embed Visualforce page editors in the browser. When developers enable the development mode, they can build the visual force pages in view state. Once the development mode is enabled, then the developer can see the preview of the visual force page and the associated code.
Q43) What is the lightning component framework and how is it used?
Ans: A lightning component framework is a UI framework helpful in developing single-page applications with dynamic performance and responsive UI. It helps to develop web applications on the desktop and mobiles using java on client-side and Apex on the server-side.
Q44) What are Governor limits?
Ans: The governor sets limits on the quantum of data and the number of records that can be stored in shared databases. The governor limits are useful because Salesforce is based on the concept of multi-tenant architecture.
Q45) What is an object type?
Ans: A sObject variable represents a row which represents a row of data and can be declared in Apex using SOAP API. The sObject is the only object that can be stored in the force.com database. Apex lets the usage of general sObject abstract type to represent any object.
Q46) How public and global class is different in Apex?
Ans: A public class in salesforce means that the class or method or the variable is visible to all the codes in a namespace. A global class in salesforce implies that the class/method/variable is visible to all codes in any namespace.
Q47) What is a Master-Detail Relationship?
Ans: Relationships can be established between objects in the salesforce. A master-detail relationship (MDR) is a parent-child relationship. In the MDR, the master object controls the behaviour of the dependent child object. The relationship is 1:n where there is only one parent object and there can be multiple children. In the MDR relationship, there is a cascade effect. This means that the master record cannot be empty. If the master record is empty or deleted, then the corresponding child records get deleted automatically.
Q48) What is a data screw-in salesforce?
Ans: Data screw refers to a non-uniform distribution in a data set. A data screw helps to link many child records (more than 10,000 records) to the parent record.
Q49) Describe the various methods of batch Apex classes
Ans: A batch apex is helpful in large jobs which exceed the processing time. Batch apex can process records in batches asynchronously. Batch apex is useful when large data has to be processed daily or in specific time limits.
Q50) What are Apex trigger and the trigger syntax used in Salesforce
Ans: The Apex triggers help to perform custom actions before or after changes to salesforce records. The following trigger syntax are used:
- before insert
- before update
- before delete
- after insert
- after update
- after delete
- after undelete
Q51) Can you edit an apex trigger/ apex class in the production environment?
Ans: Apex triggers and Apex classes cannot be modified in the production environment. The modifications should be done in developer edition, or sandbox.org or testing org and then deployed in production environments.
Q52) What is an access modifier in a program?
Ans: An access modifier in a program helps to define methods and variables. Apex uses success modifiers in private, public, protected or global access modifiers.
Q53) Describe the connected app
Ans: A connected app uses OAuth and SAML protocols for authentication for the integration of any application into salesforce. The Salesforce admins use single sign-on and token to use salesforce API. The admins can use security policies and exercise controls to work with connected apps.
Q54) What is a junction object and the purpose of usage?
Ans: Junction objects help to build many-to-many relationships in salesforce objects. The junction object builds two MDR with two different record types to build many-to-many relationships.