Salesforce Training in Noida
SALESFORCE INTERVIEW QUESTIONS & ANSWERS
Question 1. What Is Apex In Salesforce?
Apex is a strongly typed object-oriented programming language.
It allows the developer to execute flows and transaction control statements.
Apex enables developers to add business logic to most system events like button clicks related record updates and visualforce pages.
Question 2. What Is Apex Programming Language?
Integrated: It provides built-in support for DML Calls
Inline Salesforce Object Query Language
Multi Tenant Aware Application
Question 3. When Should I Use Apex?
Perform complex validation over multiple objects
To create complex business processes that are not supported by workflow
Create custom transaction logic
Attach custom logic to another operation
Question 4. How Does Apex Work?
All Apex programs runs entirely ON-Demand on Force.com Platform.
First the platform application server compiles the code into abstract set of instructions that can be understood by Apex runtime interpreter.
The compile code is stored to metadata.
When the end users triggers the execution of Apex by clicking button or visualforce page the application servers retrieves the compiled instructions from the metadata and send them to runtime interpreter before returning the result.
Question 5. What Is Apex Email Service?
Email services is an automated process that use Apex classes to process the contents, Headers, Attachments of Inbound Email.
Question 6. What Is Map Class In Apex Salesforce?
Map Class Contains methods for the Map collection type.
A Map is collection of key values pairs where each unique key maps to a single value.
Map keys and values can be any data type primitive types, collections, sObjects, users defined types, and built in Apex Types.
Question 7. What Are The Types Of Soql Statements In Sales Force?
Salesforce Object Query Language is used to query that records from the database.com based on the requirement.
There are 2 types of SOQL Statements:
The oStatic SOQL Statement is written in [] (Array Brackets)
This statements are similar to IINQ(Ion Integrated Query)
It is used to refer to the creation of a SOQL string at run time with Apex code.
Dynamic SOQL enables you to create more flexible application.
To create Dynamic SOQL query at run time use Database.Query() method, in one of the following ways.
Return a single sObjects when the query returns a single record. ex:sObjects s = Database. Query(String_limit_l);
Return a list of sObjects when the query returns more than a single record.
Question 8. What Is Batch Apex In Salesforce?
Batch Apex allows you to define a single job that can be broken up into manageable chunks, whereas every chunk can be processed separately.
Question 9. What Is Apex Scheduler?
It will invokes the Apex class to run at specific time.
Anybody who want to schedule their class they have to implement schedulable interface.
The class that implements this interface can be scheduled to run at different intervals. This interface has several methods.
Public void execute(schedulablecontext sc) etc.
Question 10. What Are The Types Of Apex Triggers In Salesforce?
Triggers Are divided into 2 types:
Before Triggers can be used to update or validate values of a record before they are saved to the database.
After Triggers Before Triggers can be used to access field values of the records that are the stored in the database and use this values to make changes in other records.
Trigger trigger_name on Object_Name(trigger_events)
WHERE trigger_events can be comma separated list of events.