117 Salesforce Development Interview Q&As
117 Salesforce Development Interview Q&As
117 Salesforce Development Interview Q&As
Lightning Flow
117
&
Apex, Trigger,
Trigger
Test Class,
AsyncScenarios
Apex, APIs, Integration
Q&As
Sanjay Gupta Tech School
https://StudySalesforce.com
Salesforce
A:
● Apex is Object Oriented Programming Language used in
Salesforce.
● Strongly typed as it validates references to objects at compile time.
● Integrated with the database
● Enable developers to add business logics.
● We can call apex through web service requests and triggers on
objects.
A:
● Primitive
○ Integer, Double, String, Long, Date, ID, Boolean, and more.
● sObject
○ either as a generic sObject or as a specific sObject eg. Account...
● Collection
○ list, set, map
● Types list of values, also known as enum.
● User - defined Apex Classes
● System supplied Apex Classes
A:
● We have three types of collection in apex:
○ List
○ Set
○ Map
A:
● An Ordered collection of elements.
● Each element of list has an index for identification.
● Index position of first element is always 0.
● List can be nested and even multidimensional.
● Elements can be of any data type:
○ Primitive types, collections, sObjects,
○ User-Defined Types, Built-in Types
A:
● List<String> myList = new List<String>();
● List<Account> accList = new List<Account>();
● List<Integer> myList = new List<Integer>();
myList.add(20);
Integer i = myList.get(0);
myList.add(1, 30);
● List<Account> accList = [SELECT ID, Name FROM Account];
A:
● An Unordered collection of elements.
● It doesn’t contain duplicate elements.
● Sets can contain collections that can be nested within one another.
● Elements can be of any data type:
○ Primitive types, collections, sObjects,
○ User-Defined Types, Built-in Types
A:
● Set<String> stringSet = new Set<String>();
● Set<Id> accIdSet= new Set<Id>();
● Set<Integer> intSet = new Set<Integer>();
intSet.add(20);
intSet.add(30);
intSet.remove(20);
Boolean b = intSet.contains(30);
Integer s = intSet.size( );
Boolean b = intSet.isEmpty( );
A:
● A Map is a collection of key - value pairs.
● Keys are always unique having a value associated.
● Values can be duplicate.
● Adding a map entry with an existing key overrides the existing entry with new.
● Map key and values can contain any collection and can contain nested collections.
● Keys and values can be of any data type:
○ Primitive types, collections, sObjects, User-Defined Types, Built-in Types
A:
1. Map<String, String> strToStrMap = new Map<String, String> ();
2. Map<Integer, String> intToStrMap = new Map<Integer, String>();
i. intToStrMap.put(1, ‘First’);
ii. intToStrMap.put(2, ‘Second’);
iii. Boolean b = intToStrMap.containsKey(1);
iv. String value = intToStrMap.get(2);
v. Set<Integer> s = intToStrMap.keySet();
3. Map <ID, Account> IdToAccountMap = New Map<ID, Account>();
4. List<Account> accList = [SELECT ID, Name FROM Account];
5. Map <ID, Account> IdToAccountMap = New Map<ID, Account>(accList);
6. Map<Account, List<Contact>> accToConMap = new Map<Account, List<Contact>>( );
A:
● for
for(Integer i = 0; i<5; i++){
//write some code here
}
● for each
List<Account> accList = [SELECT Id FROM Account LIMIT 5];
for(Account acc : accList){
//write some code here
}
A:
● Salesforce Object Query Language
● Read records from Salesforce.
● Similar to the standard SQL but is customized for the Lightning Platform.
● SOQL can be embedded in Apex code.
● Example
○ List<Account> accList = [SELECT Id FROM Account LIMIT 5];
A:
● Salesforce Object Search Language (SOSL)
● Used to perform text search in records.
● Use SOSL to search fields across multiple sObjects records.
● Use SOQL to retrieve records for a single object whereas use SOSL to search
fields across multiple objects.
● Syntax
Find ‘SearchQuery’ [IN SearchGroup] [RETURNING ObjectsAndFields];
A:
● Developer Console is an integrated development environment (IDE).
● Here you can create and edit Apex classes, Tiggers, Aura Components, VF
Pages etc.
● Generate logs for debugging and analyze them.
● Test apex code to ensure that it is error free.
● Write and execute SOQL and SOSL queries to find, create and update the
records in the org.
A:
● Helps to execute SOQL and SOSL.
A:
● Helps to execute apex code without creating any class.
● You can execute all lines of code all together or select particular
lines for execution as well.
● You also get an option to open logs just after completion of
execution.
● You cannot save code through Anonymous Window.
A:
● Display results in the logs.
● Use System.debug() in the code for debugging purpose.
● Once your code is tested and error free then remove all the
System.debug( ) as part of best practice.
● Example
○ System.debug(‘Test Debug’);
A:
● DML is used to insert, update, delete & undelete records.
● Use upsert to either insert or update a record.
● Use merge when duplicate leads, contacts and accounts are there into one
record, others are deleted and related records are reparented.
● Always perform DML in Bulk.
A:
● As apex runs in a multitenant environment so Apex runtime engine strictly
enforces limits.
● This is because runaway Apex code or processes don’t monopolize shared
resources.
● If some apex code exceeds a limit then associated governor issues a runtime
exception that cannot be handled.
● These limits count for each Apex transaction.
● For Batch Apex, these limits are reset for each execution of a batch of records
in the execute method.
Maximum number of methods with the future 50 0 in batch and future contexts;
annotation allowed per Apex invocation 1 in queueable context
Maximum CPU time on the Salesforce servers 10,000 milliseconds 60,000 milliseconds
A:
● Apex contains the build-in Database class.
● Database Class provides methods which can perform DML operations.
● Database class methods are static and called through name of class.
○ Database.insert( );
○ Database.update( );
○ Database.upsert( );
○ Database.delete( );
○ Database.undelete( );
○ Database.merge( );
A:
● Database class methods have an optional allOrNone parameter.
● This parameter allows you to specify whether the operation should partially succeed.
● When this parameter is set to false, if error occurs on a partial set of records, then the successful records
will be committed and errors will be returned for the failed records.
● No exceptions are thrown with the partial success option.
● This feature is not available with DML statements.
● The Database methods return result objects containing success or failure information of each record.
A:
● Use DML statements if you want to throw error through apex exceptions and handle
them with try & catch block.
● Use Database methods if you want to allow partial success of a bulk operation. In
this way, successful records will be committed and errors will be returned for the
failed records.
● Database methods can also throw exception similar to DML statements.
A:
● Exception is runtime error.
● Example : DML Statement Exceptions
○ If a DML operation fails, it returns an exception of type DmlException.
○ We can catch exceptions in our code to handle error condition
try{
//This causes an exception as Name field (required) is not provided
Account acc = new Account();
insert acc;
}
catch(DmlException e){
System.debug(‘A DML exception has occurred: ‘ + e.getMessage( ));
}
A:
● Query is applied on parent record which queries related child records as well.
● Example:
○ SELECT Id, Name, (SELECT Id, FirstName FROM Contacts) FROM
Account LIMIT 5
A:
● Query is applied on child object which queries parent details as well.
● Example
○ SELECT Id, FirstName, Account.Name, Employee__r.Salary__c
FROM Contact LIMIT 5
A:
● A debug log can record operations, system processes, and errors
that occur when executing a transaction or running unit tests. Debug
logs can contain information about:
○ Database Changes
○ HTTP callouts
○ Apex errors
○ Resources used by apex
○ Automated workflow processes
A:
● Triggers are initiated when a record is inserted, updated, deleted and undeleted.
● We can perform custom operations before or after events to records.
● Use triggers to do operations that cannot be done by point and click tools provided in
Salesforce.
● We can do things using triggers that we can do through Apex, including execution
SOQL and DML or calling custom methods.
● Triggers can be created for both Standard and Custom objects.
● By default triggers are active as you create them.
A:
trigger TriggerName on ObjectApiName (trigger_events){
//write some code here or call apex class methods
}
A:
● Before Triggers
○ It is used to update or validate record values before saved to database.
● After Triggers
○ It is used to access field values that are set by the system such as Ids, and
to make changes in the related/other records. The records that fire the after
trigger are read-only.
A:
● before insert
● before update
● before delete
● after insert
● after update
● after delete
● after undelete
A:
All triggers define implicit variables that allow developer to access run-time context. These variables are
contained in the System.Trigger class.
● isExecuting
○ Returns true if the current context of Apex code is a trigger, not a VF page, a web service, or
an executeanonymous( ) API call.
● isInsert
○ Returns true if trigger was fired due to an insert operation, from the Salesforce UI, Apex or API.
● isUpdate
○ Returns true if trigger was fired due to an update operation, from the Salesforce UI, Apex or
API.
A:
○ isDelete
■ Returns true if trigger was fired due to a delete operation, from the Salesforce UI, Apex or
API.
○ isBefore
■ Returns true if the trigger was fired before any record was saved.
○ isAfter
■ Returns true if the trigger was fired after all records were saved.
○ isUndelete
■ Returns true if the trigger was fired after a record is recovered from Recycle Bin.
○ size
■ The total number of records in a trigger invocation, both old and new.
A:
● new
○ Returns a list of new versions of sObject records.
○ This sObject list is available in Insert, Update and Undelete triggers, and the
records can only be modified in before trigger.
● newMap
○ A Map of ids to the new versions of sObject records.
○ Available in after insert, before update, after update, after undelete triggers.
A:
● old
○ Returns a list of old versions of sObject records.
○ Available in before update, after update, before delete, after delete triggers.
● oldMap
○ A map of ids to the old versions of sObject records.
○ Available in before update, after update, before delete, after delete triggers.
A:
● Yes, we can.
Example
trigger AccountTrigger on Account ( before insert ) {
AccountTriggerHandler.beforeInsert(Trigger.New);
}
A:
● One Trigger per object
● bulkify your code
● Logicless trigger
● Avoid using SOQL or DML inside for loop to avoid hitting governor
limits
● Avoid nested loops, try to use map instead.
● Use Static boolean variable to avoid recursive trigger
A:
● In some scenarios it can happen that the result of the trigger can end up calling
the same trigger again and again. This situation is known as recursive trigger.
● To avoid this scenario we should create a static variable and check the value of
this variable before we execute anything in the trigger.
● Example: When you update a record from UI then trigger will be called. Now in
trigger as well you applied update DML so it will call same trigger again and
ends up as recursion.
A:
● Yes, we can use addError( ) to apply validation through trigger.
A:
● Yes, we can call a batch class in the trigger as we do in the normal
apex code.
A:
● Yes, we can call a callout method in Apex Trigger but the only
condition is that it has to be an asynchronous callout because the
trigger flow cannot wait on the response received by the callout
method.
A:
● Trigger should be able to handle single records and bulk records.
● You should write triggers that operate on collections of sObjects.
● Trigger should perform efficient SOQL and DML operations.
A:
When you save a record with an insert, update or upsert statement, Salesforce performs
the following events in order:
1. Loads the original record from the database or initialized the record for an upsert
statement.
2. Loads the new record field values from the request and overwrites the old values.
3. Executes record-triggered flows those are configured to run before the record is
saved.
4. Executes all before triggers.
A:
5. Runs most system validation steps again and runs custom validation rules. The only
system validation that Salesforce doesn’t run a second time (when the request
comes from a standard UI edit page) is the enforcement of layout-specific rules.
6. Executes duplicate rules.
7. Saves the record to the database, but does not commit yet.
8. Executes all after triggers.
9. Executes assignment rules.
10. Executes auto-response rules.
A:
11. Executes workflow rules.
12. Executes escalation rules.
13. Executes Processes, Flows launched by processes (order is not guaranteed)
14. Executes entitlement rules.
15. Executes record-triggered flows those are configured to run after the record is
saved.
16. If the record contains a roll-up summary field or is part of a cross-object workflow,
performs calculations and updates the roll-up summary field in the parent record.
Then parent record goes through save procedure.
A:
17. If the parent record is updated, and a grandparent record contains a roll-up
summary field or is part of a cross-object workflow, performs calculations and
updates the roll-up summary field in the grandparent record. Grandparent record
goes through save procedure.
18. Executes Criteria based Sharing evaluation.
19. Commits all DML operations to the database.
20. After the changes are committed to the database, executes post-commit logic such
as sending email and executing enqueued asynchronous Apex jobs, including
queueable jobs and future methods.
A:
● The Apex testing framework enables you to write and execute tests for your Apex classes
and triggers on the Lightning Platform.
● Apex unit tests ensure high quality for your Apex code and let you meet requirements for
deploying Apex.
● Apex code can only be written in a sandbox environment or a Developer org, not in
production.
● Apex unit tests are required for deploying and distributing Apex.
A:
● Ensuring that your Apex classes and triggers work as expected.
● Having a suite of regression tests that can be rerun every time classes and triggers
are updated to ensure that future updates you make to your app don’t break existing
functionality.
● Meeting the code coverage requirements for deploying Apex to production or
distributing Apex to customers via packages.
A:
● To deploy code or package it for the Lightning Platform AppExchange, at least 75% of
Apex code must be covered by tests, and all those tests must pass.
● In addition, each trigger must have some coverage. Even though code coverage is a
requirement for deployment, don’t write tests only to meet this requirement.
● Make sure to test the common use cases in your app, including positive and negative
test cases, and bulk and single-record processing.
A:
● Calls to System.debug are not counted as part of Apex code coverage.
● Test methods and test classes are not counted as part of Apex code limit. So, no
worries about writing long test class with more methods just to make sure that all your
code branches are covered.
● Class can be deployed on 0% coverage as well, but that overall coverage of your
production org after getting your code deployed should be 75%, otherwise Salesforce
won’t let you deploy your code.
A:
@isTest
private class MyTestClass {
@isTest
static void myTestMethod() {
// code_block
}
}
A:
@isTest
static void testName() {
// code_block
}
OR
static testMethod void testName() {
// code_block
}
A:
● The startTest( ) method marks the point in your test code when your test actually
begins.
● Each test method is allowed to call this method only once.
● Any code that executes after the call to startTest( ) and before stopTest( ) is assigned
a new set of governor limits.
● The startTest( ) method does not refresh the context of the test, it adds a context to
your test.
A:
● For Example: if your class makes 98 SOQL queries before it calls startTest( ), and the
first significant statement after startTest is a DML statement, the program can now
make an additional 100 queries. Once stopTest( ) is called, however, the program
goes back into the original context, and can only make 2 additional SOQL queries
before reaching the limit of 100.
● All asynchronous calls made after the startTest method are collected by the system.
When stopTest is executed, all asynchronous processes are run synchronously.
Q : @testSetup? Interview
Preparation
A:
● Use test setup methods (methods that are annotated with @testSetup) to create test
records once and then access them in every test method in the test class.
● Test setup methods can be time-saving when you need to create reference or
prerequisite data for all test methods, or a common set of records that all test
methods operate on.
● If a test class contains a test setup method, the testing framework executes the test
setup method first, before any test method in the class.
Q : @testSetup? Interview
Preparation
A:
● Records that are created in a test setup method are available to all test methods in
the test class and are rolled back at the end of test class execution.
● If a test method changes those records, such as record field updates or record
deletions, those changes are rolled back after each test method finishes execution.
The next executing test method gets access to the original unmodified state of those
records.
A:
● Create TestUtility or DataFactory class to create test records once and then access
them in test methods of any of the test class.
● This class can be time-saving because when you need to write code for prerequisite
data creation once for test methods those are available in different test classes.
● You can call methods defined in TestUtility or DataFactory class in Test class as and
when required.
A:
● While implementing test class, in each test method we can validate the results.
● To do so we can use asserts in the code.
● We need to make sure all asserts should pass, if any of the assert fails it means
either assert is not written correctly or there is some errors in the Apex Code for that
you are write test method.
● Example:
○ System.assert(boolean condition, msg);
○ System.assertEquals(expected, actual, msg);
A:
● Start test class with @isTest annotation and start test methods with @isTest
annotation.
● Methods of test class must be static and void.
● Name you test class as your OriginalClass + Test or TriggerName + Test
● Prepare your test data which needs to be used for test runs.
A:
● Always write test methods with bulkify data. (either use @testSetup or Util Class)
● Use Test.startTest( ) and Test.stopTest( ) to make sure that the actual testing of your
code happens with the fresh set of governor limits. These methods help you to reset
your governor limits just before your actual code of testing gets executed.
● Use assert statement to test whether the actual code is executing correctly and giving
the results as expected.
● Always try to test both positive and negatives scenarios.
A:
● Annotate your test class or test method with @isTest(seeAllData=true) to open up data access to
records in your organization.
● The @isTest(SeeAllData=true) annotation applies to data queries but doesn’t apply to record creation
or changes, including deletions.
● New and changed records are still rolled back in Apex tests even when using the annotation.
● If a test class is defined with the @isTest(SeeAllData=true) annotation, the annotation applies to all its
test methods. The annotation applies if the test methods are defined with the @isTest annotation.
● If a test class is not defined with the @isTest(SeeAllData=true) annotation and any specific method is
defined with @isTest(SeeAllData=true) annotation then that specific method can access all data of the
org, other methods cannot.
A:
● Usually, all Apex code runs in system mode, where the permissions and record sharing of the current
user aren’t taken into account.
● The system method runAs enables you to write test methods that change the user context to an
existing user or a new user so that the user’s record sharing is enforced.
● The runAs method doesn’t enforce user permissions or field-level permissions, only record sharing.
● You can use runAs only in the test methods. The original system context is started again after all runAs
test methods complete.
● The runAs method ignores user license limits. You can create new users with runAs even if your
organization has not additional user licenses.
A:
● Example:
Profile p = [SELECT Id FROM Profile WHERE Name=’Standard User’];
User u = new User( initialize all required fields here);
System.runAs(u){
//some code
}
A:
● An asynchronous process executes a task in the background.
● User doesn’t have to wait for the task to finish.
● Use Asynchronous Apex for:
○ Callouts to external systems
○ Operations that require higher limits
○ Code that needs to run at a certain time.
A:
● Use efficiency
● Scalability
● Higher Limits
Batch Apex Run large jobs that would exceed Data cleansing or archiving of
normal processing limits records
A:
● Ensure fairness of processing
● Ensure fault tolerance
A:
● Future Apex runs process in a separate thread, at a later time when system
resources become available.
● Use @future annotation to create future methods.
● In Synchronous processing, all method calls are made from the same thread and no
additional processing can occur until the process is complete.
● Whereas in future method, methods runs asynchronously in its own thread.
● This unblocks users from performing other operations.
● Provides higher governor & execution limits for processing.
A:
● Callouts to external Web services. To make callouts from a trigger use a future or
queueable method.
● Process that needs to executed in a separate or their own thread.
● Isolating DML operations on different sObject types to prevent the mixed DML error.
A:
● Ensure future methods execute as fast as possible.
● In case of Web service callouts, try to bundle all callouts together from the same
future method, rather that using a separate future method for each callout.
● Test that a trigger enqueuing the @future calls is able to handle a trigger collection of
200 records.
● To process large number of records asynchronously, use Batch Apex instead of future
methods.
A:
● @future annotation method must be static.
● Future method can only return a void type.
● Future method can take primitive data types, array of primitive data types, or collections of
primitive data types as arguments.
● Future methods cannot take objects as arguments.
● It can happen that future methods are running in different order as they are called.
● You can’t call a future method from a future method. Nor can you invoke a trigger that calls a
future method while running a future method.
● There is a limit of 50 future calls per Apex invocation.
● There is an additional limit on the number of calls in a 24-hour period.
A:
● Batch Apex runs large jobs. It can process thousands or millions of records.
● It processes records asynchronously in batches.
● For Data cleansing or archiving, Batch Apex is probably best solution.
A:
● The execution logic of the batch class is called once for each batch of records that is
being processed.
● Each time when a batch class is invoked, the job is placed on the Apex job queue and
is executed as a discrete transaction.
● Advantages are:
○ Every transaction starts with a new set of governor limits.
○ If one batch fails to process successfully, all other successful batch transactions
aren’t rolled back.
A:
● Batch Apex class must implement the Database.Batchable interface and include the
following three methods:
○ start
○ execute
○ finish
A:
● To ensure fast execution of batch jobs, minimize web service callout times.
● Tune any SOQL query to gather the records to execute as quickly as possible.
● The longer the batch job executes, the more likely other queued jobs are delayed when
many jobs are in the queue.
● Use Batch Apex when more than one batch of records are there, in case of one batch,
you can prefer Queueable Apex.
● Minimize the number of asynchronous requests.
● If you are planning to invoke a batch job from a trigger then you must be able to
guarantee that the trigger won’t add more batch jobs than the limit.
A:
● Superset of future methods with extra features.
● Combination of future methods and Batch Apex.
● Works beyond primitive arguments.
● Called by a simple System.enqueueJob( ) method.
● enqueueJob( ) return a job ID that can be monitored.
A:
● Non-primitive types
● Monitoring
● Chaining Jobs
A:
● You can run Apex classes at a specified time.
● Run Maintenance tasks on Daily or Weekly basis.
● Implements Schedulable interface in Apex class.
A:
● Using the System.Schedule( ) Method through CRON expression.
○ System.schedule(JobName, CronExpression, SchedulableClassInstance);
● Scheduling a Job from the UI
○ Setup > Apex Classes > Schedule Apex
A:
● A CRON expression is basically a string of five or six fields that represents a set of times, normally as a
schedule to execute some routine.
● Example:
○ String sch = ‘20 30 8 10 2 6 2022’ ;
● 20 = Seconds
● 30 = Minutes
● 8 = Hours
● 10 = Day of Month
● 2 = Month (1 for Jan and 12 for Dec)
● 6 = Day of Week (1 for Sun and 7 for Sat)
● 2022 = Year (Optional - null or 1970 - 2099)
A:
● You can only have 100 scheduled jobs at one time.
● While scheduling a class from a trigger then you must guarantee that the trigger won’t
add more scheduled jobs than the limit.
● Synchronous web service callouts are not supported from scheduled Apex.
● Make an Asynchronous callout by placing the callout in a method annotated with
@future(callout=true) and call this method from scheduled Apex.
● If scheduled apex executes a batch job then callouts are supported from the batch class.
A:
● An API is equivalent to a user interface, except it is designed for software instead of
humans.
● APIs allows applications to talk to one another.
● The client sends a request for specific information to another system.
● Other system returns the data in response.
● To send or receive data, there is an expectation that it will be in a specific format that
both sides can understand.
A:
● Integration is a process of connecting two applications.
● A typical enterprise uses many applications, most of which are not designed to work
with one another.
● Integrating separate but related apps helps organizations to achieve greater levels of
operational consistency, efficiency and quality.
A:
● REST API
● SOAP API
● Bulk API
● Streaming API
A:
● Simple and powerful web service based on RESTful principles.
● Exposes functionality via REST resources and HTTP methods.
● CRUD Operations
● Search or Query Data
● Retrieve Object Metadata
● Access Information about limits in org
● Supports both XML and JSON
● Has lightweight request and response framework so useful for writing mobile and web apps.
A:
● Robust and Powerful web service based on the industry standard protocol.
● Uses Web Services Description Language (WSDL) file to define the parameters for
accessing data.
● Supports XML only.
● Most of SOAP API functionality is also available through REST API.
● Great for writing server to server integrations.
A:
● Specialized RESTful API for loading and querying lots of data at once.
● 50000 records or more.
● Bulk API is asynchronous.
● Two versions are available 1.0 and 2.0
● Both versions can handle larger amount of data.
A:
● Used for setting up notifications that trigger when changes are made to data.
● Uses a publish-subscribe, or pub/sub model in which users can subscribe to channels
that broadcast certain types of data changes.
● It is great for writing apps that would need to frequently poll for changes.
A:
API Name Protocol Data Format Communication
REST API REST JSON, XML Synchronous
SOAP API SOAP (WSDL) XML Synchronous
Chatter REST API REST JSON, XML Synchronous
User Interface API REST JSON Synchronous
Analytics REST API REST JSON, XML Synchronous
Bulk API REST CSV, JSON, XML Asynchronous
A:
API Name Protocol Data Format Communication
Metadata API SOAP (WSDL) XML Asynchronous
Streaming API Bayeux JSON Asynchronous
Apex REST API REST JSON, XML, Custom Synchronous
Apex SOAP API SOAP (WSDL) XML Synchronous
Tooling API RESt or SOAP JSON, XML, Custom Synchronous
(WSDL)
A:
● Great for use with mobile apps and web projects.
● Web service interface for interacting with Salesforce.
● CRUD Operations
● Search or Query Data
● Retrieve Object Metadata
● Access Information about limits in org
A:
● Web service interface for interacting with Salesforce.
● CRUD Operations
● Can be used in any language that supports web services
A:
● To display Chatter feeds, users, groups and followers.
● Especially in mobile apps.
● Provides programmatic access to files, recommendations, topics, notifications,
Data.com purchasing and more.
A:
● Build Salesforce UI for native mobile apps and custom web apps.
● Build user interfaces that let users work with records, list views, actions, favorites and
more.
● You don’t have to worry about layouts, picklists, field-level security or sharing.
A:
● Access Analytics assets such as datasets, lenses and dashboards.
● Send queries directly to the analytics platform.
● Retrieve a list of dataset versions.
● Create and retrieve analytics applications.
● Create and retrieve lenses.
● Create, update and retrieve Analytics Dashboards.
● Manipulate replicated datasets.
A:
● Based on REST principles
● Optimized for loading or deleting large sets of data.
● Query, queryall, insert, update, upsert, or delete many records asynchronously by
submitting batches.
● Batches are processed by Salesforce in background.
● Easiest way to use Bulk API is to enable it for processing records in Data Loader
using CSV files.
A:
● Used to retrieve, deploy, create , update or delete customizations of org.
● Common use is to deploy metadata from sandbox to production org.
● To access the functionality use Salesforce Extensions for Visual Studio Code or the
Ant migration tool.
A:
● Used to receive near-real-time streams of data that are based on changes in
Salesforce records or custom payloads.
● Subscribers can receive notifications using CometD-an implementation of Bayeux
protocol that simulates push technology.
A:
● Use it when there is requirement to expose Apex classes and method.
● So that external applications can access code through REST architecture.
● It supports both OAuth 2.0 and Session ID for authorization.
A:
● Use it when there is requirement to expose Apex methods to external application.
● Through SOAP external application can access code.
● It supports both OAuth 2.0 and Session ID for authorization.
A:
● It integrates Salesforce metadata with other system.
● Metadata types are exposed as sObjects, so complex type components can be
accessed.
● To manage and deploy working copies of apex classes, trigger and VF Pages and
components Tooling API can be used.
● REST and SOAP both are supported.
A:
● Callout enables you to tightly integrate Apex with an external service.
● We need to make a call to external Web service or sending a HTTP request from
Apex code and then receiving the response.
A:
● Web services is a functionality or code which helps us to do integration.
● Web service are open standard (XML, SOAP, HTTP, etc.) based web applications that
interact with other web applications for the purpose of exchanging data.
A:
● WSDL stands for Web Services Description Language.
● It is an XML document that describes a web service.
A:
● SOAP can be communicated through WSDL file.
● Without WSDL file we can’t do integration.
● Message format of SOAP is in XML.
A:
● Setup > enter Apex Classes > select Apex Classes
● Click Generate from WSDL
● Click browse to navigate to a WSDL document on your local drive or network. This
WSDL document is the basis for the Apex class you are creating.
● Click Parse WSDL to verify the WSDL document contents.
● Click Generate Apex Code. This final page of the wizard shows the generated
classes, along with any errors. The page also provides a link to view successfully
generated code.
A:
● Remote site setting is used to authorize the endpoint.
● It allows us to integrate with endpoint.
A:
● SOAP communicates through WSDL file.
● REST communicates through HTTP protocol.
A:
● HTTPGET : Retrieve data identified by a URL.
● HTTPPOST : Create a resource or post data to the server.
● HTTPDELETE: Delete a resource identified by a URL.
● HTTPPUT: Create or replace the resource sent in the request body.
A:
● A resource URI
● An HTTP Method
● Request Headers
● A Request Body
A:
● JSON stands for JavaScript Object Notation.
● JSON is lightweight than XML.
● While exchanging data between a browser and a server, the data can only be in text
format.
● JSON is text, hence we can convert any JavaScript object into JSON and can send
JSON to the server.