2019 Top Salesforce Interview Questions
If you're preparing for a Salesforce interview, it's crucial to familiarize yourself with commonly asked questions. Below are some of the top questions you might encounter, along with concise answers to help you prepare.
Q1: Can we call a future method from a future method?
A: No, you cannot call a future method from another future method. However, you can call a Queueable from a future method. If there is no dependency between two future methods, they can be executed sequentially from the original class.
Q2: What is the view state in Salesforce?
A: The view state in Salesforce refers to an encrypted, hidden form field in Visualforce pages that maintains the state of the page, including component values, field values, and controller state.
Q3: What is meant by callout in Salesforce?
A: An Apex callout allows Apex code to integrate tightly with external services by making HTTP requests or calling Web services. Salesforce supports both SOAP and RESTful services.
Q4: What is the use of custom settings in Salesforce?
A: Custom settings are similar to custom objects, enabling developers to create reusable sets of static data accessible across the organization. They allow for creating and associating custom data for organizations, profiles, or specific users.
Q5: What is a batch class in Salesforce?
A: A batch class allows you to process records asynchronously in batches. This is useful for handling large volumes of records for operations like data cleansing or archiving while staying within platform limits.
Q6: What is a system log in Salesforce?
A: The Salesforce System Log (now known as the Developer Console) is a tool for monitoring requests coming into Salesforce in real-time and executing anonymous Apex code.
Q7: What is the use of a junction object in Salesforce?
A: A junction object is a custom object with two master-detail relationships to represent a many-to-many relationship. It links one record instance to multiple children, while each child can link to multiple parents.
Q8: What is the Flex queue in Salesforce?
A: The Apex Flex Queue allows you to submit up to 100 additional batch jobs for execution, which are held in a queue. The system can process up to five queued or active jobs simultaneously.
Q9: What is the difference between managed and unmanaged packages in Salesforce?
A: Unmanaged packages are typically used for distributing open-source projects or templates, while managed packages are used by Salesforce partners to distribute and sell applications to customers.
Q10: What is the use of a wrapper class in Salesforce?
A: A wrapper class in Apex is a custom class or data structure that contains different objects or collections as its members, allowing for grouping related data together.
Q11: What is a debug log in Salesforce?
A: A debug log records database operations, system processes, and errors occurring during a transaction or while running unit tests, providing insights into the execution flow.
Q12: What is a role in Salesforce?
A: Roles control access to Salesforce records for users assigned to them, arranged in a hierarchy. Unlike profiles, roles do not have configuration settings.
Q13: What is the debug level?
A: A debug level is a set of log levels for categories such as Database and Workflow. It includes a debug level, start time, end time, and log type.
Q14: What is the Sales Cloud?
A: Sales Cloud is Salesforce's sales module, encompassing features like Leads, Accounts, Opportunities, and Campaigns, including tools for online lead capture.
Q15: What is the Service Cloud?
A: Salesforce Service Cloud is a CRM platform focused on customer service and support, built on Salesforce's CRM software.
Q16: For which criteria in workflow can "time-dependent workflow action" not be created?
A: Time-dependent workflow actions cannot be created for the criteria "created, and every time it’s edited."
Q17: What are the types of custom settings in Salesforce, and what is the advantage of using them?
A: There are two types of custom settings: List Custom Settings and Hierarchy Custom Settings. List Custom Settings provide reusable static data, while Hierarchy Custom Settings personalize settings for specific profiles or users. They allow for creating custom access rules.
Q18: What are custom labels in Salesforce, and what is their character limit?
A: Custom labels are custom text values accessible from Apex classes or Visualforce pages, supporting multilingual applications. You can create up to 5,000 custom labels, each up to 1,000 characters long.
Q19: Why do we need to write test classes, and how can we identify a test class?
A: Test classes help create robust and error-free code by verifying functionality. A test class is identified by the @isTest
annotation, while test methods contain the keyword testMethod
.
Q20: How many callouts to external services can be made in a single Apex transaction?
A: A single Apex transaction can make a maximum of 100 callouts to HTTP requests or API calls due to governor limits.
Q21: How to get the UserID of all the currently logged-in users using Apex code?
A: You can retrieve the IDs of currently logged-in users using the global function: UserInfo.getUserId()
.
Q22: How many records can a select query return? How many records can a SOSL query return?
A: The governor limits are as follows:
- Maximum records for SOQL: 50,000
- Maximum records for SOSL: 2,000
Q23: What are the three types of bindings used in Visualforce?
A: The three types of bindings are:
- Data bindings: Refer to the data set in the controller.
- Action bindings: Refer to action methods in the controller.
- Component bindings: Refer to other Visualforce components.
Q24: What is the use of the “@future” annotation?
A: The @future
annotation identifies methods to be executed asynchronously, allowing for operations like asynchronous web service callouts without blocking the main thread.
Q25: What are getter and setter methods?
A: Getter methods pass values from the controller to the Visualforce page, while setter methods set values back to the controller variable.
Q26: What is the difference between Role and Profile?
A: Roles control record-level access and are not mandatory for all users, whereas Profiles control object and field-level access and are mandatory for all users.
Q27: What is the maximum size of the PDF generated on the Visualforce attribute renderAs?
A: The maximum size for a PDF generated with the renderAs
attribute in Visualforce is 15MB.
These questions cover a range of topics essential for Salesforce developers and administrators. Preparing answers to these will help you ace your Salesforce interview. Good luck!
Follow these 3 tips and your writing speed will improve now. We all want to write better and faster, so here's your chance to do it. https://vgoru.org/post/yak-zrobiti-proces-navchannya-bilsh-efektivnim
ReplyDelete