SalesForce Interview Questions with Answers, Tips for Cracking Interview in SalesForce admin, salesforce developer and lightning

Latest Tough SalesForce admin, developer & lightning Interview Questions and Answers for Experienced and Freshers

with Tips & Tricks how to Crack interviews in MNC Companies

Get Started with Free Demo Class:
7676765421

 

  1. Question 1. What Is Apex In Salesforce?

    Answer :

    • 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.
  2. Question 2. What Is Apex Programming Language?

    Answer :

    • Integrated: It provides built-in support for DML Calls
    • Inline Salesforce Object Query Language
    • Easy to Use
    • Easy to Test
    • Version
    • Multi Tenant Aware Application
  3. Question 3. When Should I Use Apex?

    Answer :

    • To create Email services
    • Create web services
    • 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
  4. Question 4. How Does Apex Work?

    Answer :

    • 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.
  5. Question 5. What Is Apex Email Service?

    Answer :

    Email services is an automated process that use Apex classes to process the contents, Headers, Attachments of Inbound Email.

  6. Question 6. What Is Map Class In Apex Salesforce?

    Answer :

    • 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.
  7. Question 7. What Are The Types Of Soql Statements In Sales Force?

    Answer :

    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:

    • Static SOQL
    • Dynamic SOQL

    1.Static SOQL:

    • The oStatic SOQL Statement is written in []  (Array Brackets)
    • This statements are similar to IINQ(Ion Integrated Query)

    2.Dynamic SOQL

    • 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.
  8. Question 8. What Is Batch Apex In Salesforce?

    Answer :

    Batch Apex:

    Batch Apex allows you to define a single job that can be broken up into manageable chunks, whereas every chunk can be processed separately.

  9. Question 9. What Is Apex Scheduler?

    Answer :

    It will invokes the Apex class to run at specific time.

    Anybody who want to schedule their class they have to implement schedulable interface.

    Schedule Interface:

    The class that implements this interface can be scheduled to run at different intervals. This interface has several methods.

    They are:

    Public void execute(schedulablecontext sc) etc.

  10. Question 10. What Are The Types Of Apex Triggers In Salesforce?

    Answer :

    Triggers Are divided into 2 types:

    •  Before Triggers
    •  After Triggers

    1. Before Triggers:

    Before Triggers can be used to update or validate values of a record before they are saved to the database.

    2. After Triggers

    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.

    Syntax:

    Trigger trigger_name on Object_Name(trigger_events)

    {

    Code block

    }

    WHERE trigger_events can be comma separated list of events.

  11. Question 11. What Is Group By?

    Answer :

    With  ApI version 18.0 and  later /you can use group by with aggregate functions, such as sum() or max() to summarize the data and enable you to rollup query results rather than having to process the individual records in your code.

        Syntax : 

              [ GROUP BY field GROUP BY LIST]