0% found this document useful (0 votes)
23 views

Developer School

The document presents a series of quiz questions related to Salesforce development, covering topics such as Apex methods, REST API, asynchronous processes, and integration with Heroku. Each question includes multiple-choice answers, testing knowledge on specific Salesforce functionalities and best practices. It serves as a study guide for developers preparing for Salesforce certification or enhancing their understanding of the platform.

Uploaded by

Pushkar Jha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Developer School

The document presents a series of quiz questions related to Salesforce development, covering topics such as Apex methods, REST API, asynchronous processes, and integration with Heroku. Each question includes multiple-choice answers, testing knowledge on specific Salesforce functionalities and best practices. It serves as a study guide for developers preparing for Salesforce certification or enhancing their understanding of the platform.

Uploaded by

Pushkar Jha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 260

SFDC TRAILHEAD QUIZ+Extra Questions

Q.1 which method causes the entire set of operations to be rolled back
a)error()
b)showError()
c)isError()
d)addError()
Q.2 Which Method you will use to declare a method as test method?
a)’@isTest’
b) ’@future’
c) ’@Rest’
d) ’@TestMethod’
Q.3 A developer would like to bypass the total number of records retrieved by SOQL
queries in the start Method.Which class object you would suggest to use?
a)Database.QueryLocator
b)Iteratable
c) Database.QueryRecords
d) Database.Iterable
Q.4 select three different flavours of asynchronous apex ?
a)Batch Apex
b)Future Method
c) Background Queueable
d)Scheduled Apex
Q.5 A developer like to Monitor the progress of future jobs. Suggest the correct way.
a)From Setup ,select Apex Jobs
b) Query ConTrigger to find future job
c) Query AsyncApexJob to find future job
d) Query ConJobDetail to find future job
Q.6 Which Annotation will be used to expose an Apex class as Rest resource?
a) ‘@’RestResource
b) ‘@’ResourceRest
c) ‘@’HttpResource
d) ‘@’RestHttp
Q.7 When making a callout from a method ,the method waits for external service to send
back the callout response. A developer does not want this behaviour. Suggest the
appropriate solution.
a) Place the callout method in an asynchronous method that is annotated with
@future(callout=true)
b) Place the callout method in an asynchronous method that is annotated with
@future.
c) Place the callout method in an asynchronous method that is annotated with
@HttpGet(callout=true).
d) Place the callout method in an asynchronous method that is annotated with
@HttpPost(callout=true).

When making a callout from a method, the method waits for the external service to send
back the callout response before executing subsequent lines of code. Alternatively, you can
place the callout code in an asynchronous method that’s annotated
with @future(callout=true) or use Queueable Apex. This way, the callout runs on a separate
thread, and the execution of the calling method isn’t blocked.

Q.8 select the second generation of event products related to streaming API (select 2)
a) Change Data Capture
b) Push Topic Events
c)Generic streaming events
d)Platform events

Q.9 Which are the three methods of Heroku and Salesforce Integration(Select 3)
a) Heroku Connect
b) Salesforce SOAP API’S
c) Callout
d) Canvas

Q.10 A developer is loading a record from the database using force:recordData


component. Which attribute is populated with the loaded record?
a) targetFields
b) targetRecord
c) targetError
d) targetRow

Q.11 Which of the following statement is true about external callouts:


a) SOAP callouts use XML and may use a WSDL for code generation.
b) HTTP Callouts typically use JSON but can use XML as well.
c) HTTP Callouts are generally easier to work with than SOAP callouts.
d) All of the Above

Q.12 What type of jobs do not show up in the Apex Flex Queue?
a) Future Method Jobs
b) Batch Apex Jobs
c) Queueable Apex Jobs
d) Scheduled Apex Jobs

Q.13 True and False.


By default the org data is accessible in test methods
a) TRUE
b) FALSE

Q. 14 Identify the invalid trigger event from the following.


• Before undelete
• After insert
• Before update
• After delete

Q.15 A component has an attribute message . Select line appropriate statement to set
the value of message from client-controller method with newMessage.

handleClick2: function(component,event,helper){
var newMessage = event.getSource().get(“v.label”);
console.log(“handleClick2: Message:” + newMessage);
// Add correct statement below
---------------------------------------
}

a) component.set(“message”,newMessage);
b) component.set(“{v.message}”,newMessage);
c) component.set(“v.message”,newMessage);
d) component.get(“v.message”,newMessage);

Q.16 Suggest an attribute to a developer to declare that the component handles the
event after changes in the record.
a) recordEdited
b) recordData
c) recordUpdated
d) recordChanged
Q.17 Which attributes of force:recordData is set to localized error message if an error
occurs on loading a component?
a) targetFields
b) targetError
c) error
d) fieldsError

Q.18 True and False


Methods with the future annotation must be static methods and can only return a void
type.
a) True
b) False

Q.19 When we start batch apex , which record is created?


a) AsyncJob
b) AsyncApexBatch
c) AsyncApexJob
d) SyncApexJob

Q.20 A developer called a web services from an apex code which response status code
she should check to ensure that the request is successful?
a) 500
b) 404
c) 201
d) 200

When the server processes the request, it sends a status code in the response. The status
code indicates whether the request was processed successfully or whether errors were
encountered. If the request is successful, the server sends a status code of 200. You’ve
probably seen some other status codes, such as 404 for file not found or 500 for an internal
server error.

Q.21 Identify the invalid HTTP method from the following


a) UNDELETE
b) GET
c) POST
d) DELETE
e) PUT

Q.22 A lightning component developer want to fetch data of a custom object


Review__c from database and want to display on a component. What type of controller
should be used?
a) Standard List Controller
b) Extension Controller
c) Client-Side controller with Server-Side Controller
d) Standard Controller

Q.23 Select the inappropriate reason from the following to integrate apps on Heroku
with salesforce:
a) Data Replication
b) Data Proxies
c) Data Security
d) Custom User Interface

Q.24 Consider the following code. Select appropriate statement to print the value of
message
attribute.
<aura:component>
<aura:attribute name=”message” type=”String”/>
<p>Hello! --------------------</p>
</aura:component>

a. {v.message}
b. {! message}
c. {message}
d. {!v.message}

Q.25 Which of the following annotation you will add to your method to expose it as a
REST resource that can be called by an HTTP GET request?
a.) “@”HttpPost
b.)“@”HttpGet
c.) “@”HttpPut
d. )“@”HttpDelete

Q.26 Which Context variable provides a list of sObjects which we can use only in insert
,update and delete trigger?
a) old
b) oldMap
c) new
d) newMap

27.The API-first approach to development at Salesforce lets customers:


A.Extend functionality across Salesforce features
B.Choose the API that's best suited to their needs
C.Build apps for the AppExchange
D.All of the above
28.REST API is best suited for which of these use cases?
A.Loading lots of data into your org for the first time
B.Writing a mobile or web app
C.Deleting 100,000 records at once
D.Pushing notifications whenever data is changed
29.SOAP API is best suited for which of these use cases?
A.Building a server-to-server integration
B.Writing an app that requires using JSON
C.Updating thousands of records at once
D.Building a slick UI for a mobile app
30.Bulk API is best suited for which of these use cases?
A.Deleting several records, one record at a time
B.Writing a mobile chat app
C.Building a new Salesforce UI
D.Deleting 100,000 records at once
31.Streaming API is best suited for which of these use cases?
A.Notifying users whenever a record is deleted
B.Creating hundreds of account records at once
C.Writing an app where the use of XML is required
D.Using a WSDL file to specify the operations allowed on standard and custom objects
32. What are all the factors that contribute to the total API limit calculation?
A.Org edition and API usage over the previous month
B.Org edition, license type, and expansion packs
C.License type and expansion packs
D.Number of Salesforce employees swabbing the deck

HTTP METHODS FOR REST API


HTTP methods (HEAD, GET, POST, PATCH, DELETE)
A REST request consists of four components: a resource URI, an HTTP method, request
headers, and a request body.

Request headers specify metadata for the request. The request body specifies data for the
request, when necessary. If there’s no data to specify, the body is omitted from the request.

• GET—The HTTP method used for this API call.


• {{_endpoint}}—The place where the request will take place. In this case,
you added the URL of your Trailhead Playground to the _endpoint field
in the variables to connect to Salesforce.
• /services/data—Specifies that you’re making a REST API request.
• /v {{version}}—The API version number. The double curly quotes
indicate that this can be set as a variable.
• /sobjects—Specifies that you’re accessing a resource under the sObject
grouping.
• /:SOBJECT_API_Name—The sObject being actioned; in this case,
Account.
• /describe—An action; in this case, a Describe request.
• 33. Streaming API's push paradigm lets you:
• A.Create more records in a single API call
• B.Use SOSL to listen for event notifications
• C.Avoid making unnecessary API requests by listening for notifications rather
than polling for data
• D.Write code from the crow's nest of a pirate ship
• 34. What is the second generation of PushTopic events?
• A.Platform events
• B.Generic streaming events
• C.Change data capture events
• D.The event bus
• 35. Which replay option specifies that the subscriber receives event notifications
with replay IDs 6, 7, 8, and 9?
• A.6
• B.5
• C.-2
• D.-1
Streaming API lets you push real-time notifications to clients using the publish-subscribe
model.

36. Which of the following scenarios describes how you can use a connected app?
A.Users can create their own connected apps to access their personal email accounts.
B.Users can log in to an external application with their Salesforce or Experience Cloud
credentials.
C.Users can authorize a mobile app to securely access defined Salesforce data on their
behalf.
D.B and C
37. What's the difference between a connected app developer and a connected app
admin?
A.Only developers can set policies that explicitly define who can use connected apps and
where they can access the apps from.
B.Only admins can set policies that explicitly define who can use connected apps and
where they can access the apps from.
C.There isn't a difference between developers and admins when it comes to connected
apps.
D.Only developers use connected apps. Admins have no role with connected apps.

38. True or false: OAuth 2.0 APIs enable a user to work in one app but see the data
from another.
A.True
B.False
39. You're creating a connected app that allows a Smart TV to display a customer's
movie order history. Which OAuth 2.0 flow would you use for the connected app?
A.OAuth 2.0 web server flow
B.OAuth 2.0 device flow
C.OAuth 2.0 JSON Web Token Exchange (JWT) bearer flow
D.OAuth 2.0 user-agent flow

Using OpenID Connect dynamic client registration, resource servers can dynamically create
client apps as connected apps in Salesforce -- TRUE
When Salesforce acts as your identity provider, you can use a connected app to integrate
your service provider with your org. – FALSE

40. True or false: You can integrate identity providers with Salesforce using connected
apps.
A.True
B.False
41. How is OpenID Connect different from SAML?
A.You can't use OpenID Connect to enable SSO between two services.
B.You can only use OpenID Connect to enable SSO between two services.
C.OpenID Connect is built for today's API economy because it adds an authentication
layer on top of OAuth 2.0.
D.B and C

42. True or false: Dynamic client registration enables resource servers to dynamically
create client apps as connected apps.
A.True
B.False
43. What role does your Salesforce org play in providing authorization for external API
gateways?
A.My Salesforce org requests the creation of client apps as connected apps from the
external API gateway.
B.My Salesforce org hosts the protected data.
C.My Salesforce org is the OAuth authorization server that protects resources hosted on
an external API gateway.
D.My Salesforce org asks the external API gateway to authenticate a client app.
44. Which of the following is NOT an advantage of data replication over data proxies?
A.A replicated data set offloads processing and requests from an origin data server.
B.A replicated data set is always and immediately in sync with the origin data.
C.A replicated data set reduces data access latency.
D.A replicated data set supports bidirectional writes.
45. You can use Salesforce Connect to proxy which types of data sources:
A.OData 2.0 and 4.0
B.REST with JSON payloads
C.REST with XML payloads
D.SOAP
E.All of the above
46. Which technology do Salesforce REST APIs use for authentication?
A.Pre-shared keys
B.Basic usernames and passwords
C.OAuth
D.SAML
47. Callouts from Salesforce to Heroku can be made using:
A.Web sockets
B.Apex triggers or outbound messages
C.Message bus
D.Corba

48. You can use Heroku Connect for:


A.One-way data replication
B.Bidirectional data replication
C.Data proxy with Salesforce Connect
D.All of the above
49. How does Heroku Connect work with Salesforce authentication?
A.A single integration user's credentials are stored.
B.OAuth provides Heroku Connect with API tokens after the user authorizes the Heroku
Connect application on Salesforce.
C.SAML authorizes Heroku Connect to make API calls.
D.The end user of a Heroku app authorizes Heroku Connect via OAuth.
50. Heroku Connect data replication happens:
A.Instantly in both directions
B.Near real time in both directions
C.Near real time for writes to Salesforce, and on a 30-second polling window for writes
to Heroku Postgres
D.Near real time for writes to Salesforce, and either on a polling window or near real time
for writes to Heroku Postgres (depending on the user configuration)

51. Salesforce Connect is used for:


A.Developing ETL services
B.Replicating external data into Salesforce
C.Proxying external data into Salesforce
D.Bidirectional syncing of external data in Salesforce
52. Salesforce Connect custom adapters support:
A.Cross-object relationships
B.Data paging
C.Search
D.All of the above
53. Which of the following is NOT an advantage of Salesforce Connect over ETL?
A.The data is always fetched on demand.
B.If the origin is offline, the data is still available via Salesforce Connect.
C.Standard protocols like OData can easily proxy external data into Salesforce.
D.Data security can be enforced using per-user or per-application authentication.
54. Applications on Heroku that use Salesforce REST APIs can use which
authentication mechanisms:
A.Anonymous access without credentials on trusted networks
B.Username and password with an OAuth connected app
C.OAuth web or user-agent flow in which the user authorizes a connected app using
browser redirects
D.B and C
E.A and C
55. You can use the Salesforce REST APIs to:
A.Insert or update records
B.Execute processes as another user
C.Access database log files
D.Feed your kitten

56. The primary benefit of a workflow outbound message over an Apex trigger is:
A.The message can deliver the payload only as SOAP.
B.The message supports different authentication mechanisms.
C.Messages are completely declarative.
D.The message can handle every database event.
57. Callouts in Apex trigger support which authentication mechanisms:
A.Pre-shared keys
B.Username and password credentials
C.OAuth flows using named credentials in the Remote Site settings
D.All of the above

58. Heroku apps that handle callouts from Salesforce can be written in:
A.Node.js / JavaScript
B.Java, Scala, Clojure
C.Python
D.PHP
E.All of the above

59. Canvas apps can authenticate a user with:


A.Username and password
B.OAuth
C.Signed request
D.Either OAuth or signed request
60. You can build Canvas apps and run them on Heroku with of the following
languages:
A.Node.js / JavaScript
B.Java, Scala, Clojure
C.Python
D.PHP
E.All of the above
61. The best use of Canvas apps is to:
A.Display real estate photos in Salesforce for house listings
B.Render custom widgets on Chatter feeds
C.Display third-party apps in Salesforce
D.All of the above

Valid Trigger event

• before insert
• before update
• before delete
• after insert
• after update
• after delete
• after undelete

Invalid Trigger Event → Before undelete

• Before triggers are used to update or validate record values before they’re
saved to the database.
• After triggers are used to access field values that are set by the system (such
as a record's Id or LastModifiedDate field), and to affect changes in other
• records. The records that fire the after trigger are read-only.
62. What is a key benefit of asynchronous processing?
A.Higher governor and execution limits
B.Unlimited number of external callouts
C.Override organization-wide sharing defaults
D.Enabling turbo mode for transactional processing
63. Batch Apex is typically the best type of asynchronous processing when you want to:
A.Make a callout to a web service when a user updates a record.
B.Schedule a task to run on a weekly basis.
C.Update all records in your org.
D.Send a rickroll email to a contact.

Future Apex
Future methods are typically used for:

• Callouts to external Web services. If you are making callouts from a trigger or after
performing a DML operation, you must use a future or queueable method. A callout
in a trigger would hold the database connection open for the lifetime of the callout
and that is a "no-no" in a multitenant environment.
• Operations you want to run in their own thread, when time permits such as some sort
of resource-intensive calculation or processing of records.
• Isolating DML operations on different sObject types to prevent the mixed DML error.
This is somewhat of an edge-case but you may occasionally run across this issue.
See sObjects That Cannot Be Used Together in DML Operations for more details.

Future Method Syntax


Future methods must be static methods, and can only return a void type. The
specified parameters must be primitive data types, arrays of primitive data types, or
collections of primitive data types. Notably, future methods can’t take standard or
custom objects as arguments. A common pattern is to pass the method a List of
record IDs that you want to process asynchronously.

public class SomeClass {

@future

public static void someFutureMethod(List<Id> recordIds) {

List<Account> accounts = [Select Id, Name from Account Where Id IN


:recordIds];

// process account records to do awesome stuff

Status : success returns 200

@isTest
public class SMSCalloutMock implements HttpCalloutMock {
public HttpResponse respond(HttpRequest req) {
// Create a fake response
HttpResponse res = new HttpResponse();
res.setHeader('Content-Type', 'application/json');
res.setBody('{"status":"success"}');
res.setStatusCode(200);
return res;
}

Batch Apex
Batch Apex is used to run large jobs (think thousands or millions of records!) that
would exceed normal processing limits. Using Batch Apex, you can process records
asynchronously in batches (hence the name, “Batch Apex”) to stay within platform
limits. If you have a lot of records to process, for example, data cleansing or
archiving, Batch Apex is probably your best solution.

Batch Apex Syntax


To write a Batch Apex class, your class must implement the Database.Batchable
interface and include the following three methods:

start

Used to collect the records or objects to be passed to the interface method execute
for processing. This method is called once at the beginning of a Batch Apex job and
returns either a Database.QueryLocator object or an Iterable that contains the
records or objects passed to the job.

Most of the time a QueryLocator does the trick with a simple SOQL query to
generate the scope of objects in the batch job. But if you need to do something
crazy like loop through the results of an API call or pre-process records before being
passed to the execute method, you might want to check out the Custom Iterators
link in the Resources section.

With the QueryLocator object, the governor limit for the total number of records
retrieved by SOQL queries is bypassed and you can query up to 50 million records.
However, with an Iterable, the governor limit for the total number of records
retrieved by SOQL queries is still enforced.

execute

Performs the actual processing for each chunk or “batch” of data passed to the
method. The default batch size is 200 records. Batches of records are not guaranteed
to execute in the order they are received from the start method.

This method takes the following:

• A reference to the Database.BatchableContext object.


• A list of sObjects, such as List<sObject>, or a list of parameterized types. If you are
using a Database.QueryLocator, use the returned list.

finish
Used to execute post-processing operations (for example, sending an email) and is called
once after all batches are processed.

Here’s what the skeleton of a Batch Apex class looks like:

public class MyBatchClass implements Database.Batchable<sObject> {

public (Database.QueryLocator | Iterable<sObject>)


start(Database.BatchableContext bc) {

// collect the batches of records or objects to be passed to execute

public void execute(Database.BatchableContext bc, List<P> records){

// process each batch of records

}
public void finish(Database.BatchableContext bc){

// execute any post-processing operations

Queueable Apex allows you to submit jobs for asynchronous processing similar to
future methods with the following additional benefits:

• Non-primitive types: Your Queueable class can contain member variables of


non-primitive data types, such as sObjects or custom Apex types. Those
objects can be accessed when the job executes.
• Monitoring: When you submit your job by invoking the System.enqueueJob
method, the method returns the ID of the AsyncApexJob record. You can use
this ID to identify your job and monitor its progress, either through the
Salesforce user interface in the Apex Jobs page, or programmatically by
querying your record from AsyncApexJob.
• Chaining jobs: You can chain one job to another job by starting a second job
from a running job. Chaining jobs is useful if you need to do some sequential
processing.

Queueable Syntax
To use Queueable Apex, simply implement the Queueable interface.

public class SomeClass implements Queueable {

public void execute(QueueableContext context) {

// awesome code here

• You can add up to 50 jobs to the queue with System.enqueueJob in a single


transaction.
• When chaining jobs, you can add only one job from an executing job with
System.enqueueJob, which means that only one child job can exist for each
parent queueable job. Starting multiple child jobs from the same queueable
job is a no-no.
64. What type of jobs do not show up in the Apex Flex Queue.
A.Future Method Jobs
B.Batch Apex Jobs
C.Queueable Apex Jobs
D.Scheduled Apex Jobs
65.Which statement is true regarding the Flex Queue.
A.You can submit up to 200 batch jobs for execution.
B.Jobs are processed first-in first-out.
C.Jobs can only be scheduled during Taco Tuesdays.
D.Jobs are executed depending upon user license.
66. How many apex jobs we can scheduled at one time
A) 50
B) 100
C) 150
D) 200

Monitoring Future Jobs


Future jobs show up on the Apex Jobs page like any other jobs. However, future jobs
are not part of the flex queue currently.

You can query AsyncApexJob to find your future job, but there’s a caveat. Since
kicking off a future job does not return an ID, you have to filter on some other field
such as MethodName, or JobType, to find your job. There are a few sample SOQL
queries in this Stack Exchange post that might help.

Make Callouts to External Services from Apex


An Apex callout enables you to tightly integrate your Apex code with an external
service. The callout makes a call to an external web service or sends an HTTP request
from Apex code, and then receives the response.

Apex callouts come in two flavors.

• Web service callouts to SOAP web services use XML, and typically require a WSDL
document for code generation.
• HTTP callouts to services typically use REST with JSON.

These two types of callouts are similar in terms of sending a request to a service and
receiving a response. But while WSDL-based callouts apply to SOAP Web services,
HTTP callouts can be used with any HTTP service, either SOAP or REST.
Some Common HTTP Methods
HTTP Method Description
GET Retrieve data identified by a URL.
POST Create a resource or post data to the server.
DELETE Delete a resource identified by a URL.
PUT Create or replace the resource sent in the request body.

RestResource Annotation
The @RestResource annotation is used at the class level and enables you to expose an
Apex class as a REST resource.

These are some considerations when using this annotation:

• The URL mapping is relative


to https://instance.salesforce.com/services/apexrest/.
• A wildcard character (*) may be used.
• The URL mapping is case-sensitive. A URL mapping for my_url will only match a
REST resource containing my_url and not My_Url.
• To use this annotation, your Apex class must be defined as global.

67.which of the following method is used to map the url pattern to RestResource
Annoatation
a)urlPattern
b)urlText
c)urlMap
d)urlMapping

68. Which of the following statements is true about creating apps with Visualforce:
A.Visualforce is designed primarily for page-centric web apps.
B.Visualforce renders the page on the server.
C.Visualforce will be fully supported by Salesforce for years to come.
D.All of the above.
69. Which of the following statements is NOT true about creating apps with Lightning
components:
A.Lightning components are designed primarily for app-centric web apps.
B.Lightning components can be used everywhere Visualforce can be used.
C.Lightning components render the page on the client.
D.All of the above.
70. Which of the following is a poor use of Lightning Components:
A.Developing an app for Salesforce1.
B.Developing a highly interactive app with an innovative user interface.
C.Developing widgets for use in Lightning App Builder.
D.None of the above. All of these are good use cases for Lightning Components.

71. Which of the following features of Visualforce do NOT work in Lightning


Experience:
A.Creating custom apps and tabs.
B.Overriding standard actions with Visualforce pages.
C.Using window.location in JavaScript code.
D.Remote Objects.
72. Which of the following is NOT true about the user interface and visual design in
Lightning Experience:
A.PDFs render with the Lightning Experience visual design.
B.You can't hide the Lightning Experience main navigation header or sidebar.
C.The <apex:inputField> tag renders with the Salesforce Classic appearance.
D.The standard Visualforce header and sidebar are hidden.

73. Which of the following statements about Lightning Components and Lightning
Experience is true?
A.Lightning Experience is something you use directly, Lightning Components are
something you build apps with.
B.Lightning Experience is (mostly) built with Lightning Components.
C.Lightning Experience uses an app-centric development model using Lightning
Components.
D.All of the above.
74. Which of the following is true of Aura Components:
A.Aura Components can only be used in the Lightning Experience and not the Salesforce
mobile app.
B.Aura Components can be used in Visualforce pages.
C.Aura Components are only optimized for the desktop experience.
D.All of the above.

75. Which of the following ISV features are available in Lightning Experience?
A.Trialforce.
B.Usage Metrics Visualization app.
C.Package creation.
D.None of the above are available.
76. As an ISV, which of the following is true about AppExchange:
A.Your apps undergo a review for Lightning Experience readiness.
B.Your apps are available to all customers, whether they have enabled Lightning
Experience or not.
C.The 'Lightning Ready' certification lets AppExchange visitors know your app is
verified for Lightning Experience.
D.All of the above.
77. Which of the following is true of Apex in the new Lightning Experience:
A.You have to update the API version for all your Apex classes in order for them to work
in Lightning Experience.
B.Apex is not supported in the new Lightning Experience.
C.Your Apex code and queries continue to function as before.
D.All of the above
78. What should you look for when reviewing your installed packages before using them
with Lightning Experience?
A.A 'Lightning Ready' sash for the package on AppExchange.
B.An error message saying the package isn't 'Lightning Ready'.
C.A 'Lightning Ready' check mark on the Installed Packages page.
D.Errors in the JavaScript console when using the package.

79. Which of the following descriptions about the Lightning Component framework is
true?
A.It's a UI framework for developing web apps for mobile and desktop devices.
B.It uses JavaScript on the client side and Apex on the server side.
C.It's a modern framework for building single-page applications.
D.All of the above
80. What can you build with the Lightning Component framework?
A.Standalone app
B.Components to use inside Visualforce pages
C.Drag-and-drop components for Lightning App Builder
D.All of the above
81. How is the Lightning Component framework different from other web app
frameworks?
A.It is optimized for both mobile and desktop experiences and proves it with Salesforce1
and Lightning Experience.
B.It connects natively with services provided by the Salesforce platform.
C.It has specific opinions about how data access is performed and has specific security
requirements.
D.All of the above

Aura Attribute
Expressions
Instead of getting lost in words again, let’s dive right into making helloMessage work
as intended.

<aura:component>
<aura:attribute name="message" type="String"/>

<p>Hello! {!v.message}</p>

</aura:component>

Copy

Is that anticlimactic or what?

We’re outputting the contents of message using the expression {!v.message} . That is,
this expression references the message attribute. The expression is evaluated, and
resolves to the text string that’s currently stored in message . And that’s what the
expression outputs into the body of the component.

Ummm…what the heck is an “expression”?

An expression is basically a formula, or a calculation, which you place within


expression delimiters (“ {!” and “ }”). So, expressions look like the following:

{!<expression>}

The formal definition of an expression is a bit intimidating, but let’s look at and then
unpack it: An expression is any set of literal values, variables, sub-expressions, or
operators that can be resolved to a single value.

AURA COMPONENTS Methods - component.set("v.message", newMessage);

Let’s look at the helloMessageInteractive controller in more detail, and make that
explanation a bit more concrete.

({

handleClick: function(component, event, helper) {

let btnClicked = event.getSource(); // the button

let btnMessage = btnClicked.get("v.label"); // the button's label

component.set("v.message", btnMessage); // update our message

})

82. What does SLDS stand for?


A.Salesforce Leadership Does Surf
B.System Limits Detection System
C.Salesforce Lightning Design System
D.sObject Loading Data System
83. What are Lightning Events used for?
A.Salesforce mini developer conferences
B.Communicating between loosely coupled components
C.Logging critical details during app runtime
D.Scheduling sales calls in Lightning Experience
84. What is the name of the framework that includes Aura components?
A.Lightning Components
B.Angular
C.jQuery
D.WebObjects
85. In which language do you write Aura components action handlers?
A.Java
B.Visualforce
C.JavaScript
D.Objective-C
86. What is Lightning Data Service?
A.A set of UI elements that display record data
B.A subset of Visualforce
C.Lightning's data layer
D.A cloud-based storage and hosting service
87. What are the benefits of adopting LDS?
A.Fewer XHRs
B.Shared record data across components
C.Local offline cache
D.All of the above
88. What attributes are required when using force:recordData to load a record when
the component loads?
A.recordId, mode, layoutType, fields
B.recordId, mode, and layoutType or fields
C.recordId, mode, targetRecord
D.recordId, mode, fields, targetRecord, targetError

The force:recordData tag also supports a set of target * attributes, which are
attributes that force:recordData populates itself. The target * attributes can be used to
allow access from the UI.

• targetRecord is populated with the loaded record


• targetFields is populated with the simplified view of the loaded record
• targetError is populated with any errors

89. Which tool you will use to add a Lightning Component on a Record Page?
a) Flow Builder
b) Report Builder
c) Form Builder
d) App Builder

90. A developer andrew would like to execute or run jobs sequentially. Suggest
which would be the appropriate class?

a) Queueable
b) Database.Batchable
c) Database.Stateful
d) Database.Iterable

91. Which class contains the RestRequest and RestResponse objects in RESTful
webservices?
a) Resthttp
b) RestContent
c) RestContext
d) RestContainer

92.Which access specifier you will use for a class and methods to publish them
as SOAP web-service?
a) Public, webservice
b) Public, webmethod
c) Global, webmethod
d) Global , webservices

93. To start the batch processing we have to use which of the following
method?
a) Database.StartBatch
b) Database.executeBatch
c) Database.processBatch
d) Database.runBatch
94. Select the appropriate options to fill in the blanks which should call the
client-side controller method by clicking on a button of a component

Greet.cmp
<div>
<lightning button label = “You look nice today”
Onclick=”--------------------------”
</div>
Greet.js
{
handleClick : function(cmp,event,helper)
{
alert(“Welcome”);
}
}

a) {!handleClick}
b) {!c.handleClick}
c) {c.handleClick}
d) {!chandleClick }

Ex:-
<aura:component>
<aura:attribute name="text" type="String" default="Just a string. Waiting
for change."/>
<input type="button" value="Flawed HTML Button"
onclick="alert('this will not work')"/>
<br/>
<lightning:button label="Framework Button" onclick="{!c.handleClick}"/>
<br/>
{!v.text}
</aura:component>

95. Select the form-based component from the following which can be used to
display records only.
a) lightning:recordDisplayForm
b) lightning:recordForm
c) lightning:recordEditForm
d) lightning:recordViewForm

96. Below given is the controller code for a component. Identify what is missing in the
code.
public with sharing class ExpensesController {
public static List<Expense_c> getExpenses() {
return [SELECT Id, Name, Amount_c, Client_c, Date_c,
Reimbursed_c, CreatedDate
FROM Expense_c];
}
}
a. “@”AuraEnabled annotation for getExpense() ✓
b. “@”AllowAccess annotation for getExpense()
c. “@”isTest annotation for getExpense()
d. “@”Aura annotation for getExpense()

Use the force... recordData Tag


In the last unit, we covered the nifty performance upgrades and quality-of-life
features that Lightning Data Service provides. Now let’s learn how to use them.

Remember, force:recordData doesn’t inherently include any UI elements.


The force:recordData tag is just the logic used to communicate with the server and
manage the local cache. For your users to view and modify the data fetched by LDS,
you have to include UI elements. The force:recordData tag uses the UI API to provide
data to your UI components.

When using force:recordData , load the data once and pass it to child components as
attributes. This approach reduces the number of listeners and minimizes server calls,
which improves performance and ensures that your components show consistent
data.

Loading Records
The first thing you do to make a record available for your UI components is to load it.
Load the record by including force:recordData in your component while specifying
the recordId , mode , and layoutType or fields attributes. Valid values
for layoutType are FULL and COMPACT .

ldsDisplayRecord.cmp

<aura:component implements="flexipage:availableForRecordHome, force:hasRecordId">


<!--inherit recordId attribute-->

<aura:attribute name="record" type="Object"

description="The record object to be displayed"/>


<aura:attribute name="simpleRecord" type="Object"

description="A simplified view record object to be displayed"/>

<aura:attribute name="recordError" type="String"

description="An error message bound to force:recordData"/>

<force:recordData aura:id="record"

fields="Name,BillingCity,BillingState"

recordId="{!v.recordId}"

targetError="{!v.recordError}"

targetRecord="{!v.record}"

targetFields ="{!v.simpleRecord}"

mode="VIEW"/>

Enterprise and Partner WSDLs


If you’ve sailed the straits of another SOAP-based API, you know that the Web Services
Description Language (WSDL) file is basically your map to understanding how to use the API.
It contains the bindings, protocols, and objects to make API calls.

Salesforce provides two SOAP API WSDLs for two different use cases. The enterprise WSDL is
optimized for a single Salesforce org. It’s strongly typed, and it reflects your org’s specific
configuration, meaning that two enterprise WSDL files generated from two different orgs
contain different information.

The partner WSDL is optimized for use with many Salesforce orgs. It’s loosely typed,
and it doesn’t change based on an org’s specific configuration. Typically, if you’re
writing an integration for a single Salesforce org, use the enterprise WSDL. For
several orgs, use the partner WSDL.

For this unit, we’re using the enterprise WSDL to explore SOAP API. The first step is
to generate a WSDL file for your org. In your Trailhead Playground, from Setup, enter
API in the Quick Find box, then select API. On the API WSDL page, click Generate
Enterprise WSDL.
On the Generate Enterprise WSDL page, click Generate. When the WSDL is
generated, right-click on the page and save the WSDL file somewhere on your
computer. We’ll be using it shortly.

Here’s a tip for working with the enterprise WSDL. The enterprise WSDL reflects your
org’s specific configuration, so whenever you make a metadata change to your org,
regenerate the WSDL file. This way, the WSDL file doesn’t fall out of sync with your
org’s configuration.

ENDD---------------------------------------------------------------------------------------------------
1) True or false: OAuth 2.0 APIs enable a user to work in one app but see the data from
another.
a) True
b) False

2) You're creating a connected app that allows a Smart TV to display a customer's movie
order history. Which OAuth 2.0 flow would you use for the connected app?
a) OAuth 2.0 web server flow
b) OAuth 2.0 device flow
c) OAuth 2.0 JSON Web Token Exchange (JWT) bearer flow
d) OAuth 2.0 user agent flow

3) What is a key benefits of asynchronous processing?


a) Higher governor and execution limits
b) Unlimited number of external callouts
c) Override organization-wide sharing defaults
d) Enabling turbo mode for transactional processing

4) Batch Apex is typically the best type of asynchronous processing when you want to:
a) Make a callout to a web service when a user updates a record.
b) Schedule a task to run on a weekly basis.
c) Update all records in your org.
d) Send a rickroll email to a contact

5) Which tools are included with the Salesforce Flow product?


a) Lightning Experience and Flow Builder
b) Lightning App Builder and Process Builder
c) Flow Builder and Process Builder
d) Flow Builder, Process Builder and Approvals

6) Which declarative tool would you use for the following use case? Guide customers
through the process of troubleshooting issues with your product.
a) Flow Builder
b) Approvals
c) Apex

7) Which declarative tool would you use for the following use case? When an opportunity's
discount is higher than 40%, notify the CEO via email and request sign-off. Provide a
way for the CEO to leave comments.
a) Flow Builder
b) Approvals
c) Apex
8) Which declarative tool would you use for the following use case? When the Annual
Revenue field exceeds $500,000 on an account, automatically update the Customer
Priority field to High.
a) Flow Builder
b) Approvals
c) Apex

9) What does SLDS stand for?


a) Salesforce Leadership Does Surf
b) System Limits Detection System
c) Salesforce Lightning Design System
d) sObject Loading Data System

10) What are Lightning Events used for?


a) Salesforce mini developer conferences
b) Communicating between loosely coupled components
c) Logging critical details during app runtime
d) Scheduling sales calls in Lightning Experience

11) What is the name of the framework that includes Aura components?
a) Lightning Components
b) Angular
c) jQuery
d) WebObjects

12) In which language do you write Aura components action handlers?


a) Java
b) VisualForce
c) JavaScript
d) Objective-C

13) Which of the following descriptions about the Lightning Component framework is true?
a) It’s a UI framework for developing web apps for mobile and desktop devices.
b) It uses JavaScript on the client-side and Apex on the server-side.
c) It’s a modern framework for building single-page applications.
d) All of the above

14) What can you build with the Lightning Component framework?
a) Standalone app
b) Components to use inside Visualforce pages
c) Drag-and-drop components for Lightning App Builder
d) All of the above
15) How is the Lightning Component framework different from other web app frameworks?
a) It is optimized for both mobile and desktop experiences and proves it with
Salesforce1 and Lightning Experience.
b) It connects natively with services provided by the Salesforce platform.
c) It has specific opinions about how data access is performed and has specific
security requirements.
d) All of the above

16) What is Lightning data service?


a) A set of UI elements that displays record data
b) A subset of Visualforce
c) Lightning’s data layer
d) A cloud-based storage and hosting service

17) What are the benefits of adopting LDS?


a) Fewer XHRs
b) Shared record data across components
c) Local offline cache
d) All the above

18) What attributes are required when using force:recordData to load a record when the
component loads?
a) recordId, mode, layoutType, fields
b) recordId, mode, and layoutType or fields
c) recordId, mode, targetRecord
d) recordId, mode, fields, targetRecord, targetError

19) Which of the following is NOT an advantage of data replication over data proxies?
a) A replicated data set offloads processing and requests from an origin data
server.
b) A replicated data set is always and immediately in sync with the origin
data.
c) A replicated data set reduces data access latency.
d) A replicated data set supports bidirectional writes.

20) You can use Salesforce Connect to proxy which types of data sources:
a) OData 2.0 and 4.0
b) REST with JSON payloads
c) REST with XML payloads
d) SOAP
e) All of the above
21) Which technology do Salesforce REST APIs use for authentication?
a) Pre-shared keys
b) Basic usernames and passwords
c) OAuth
d) SAML

22) Callouts from Salesforce to Heroku can be made using:


a) Web sockets
b) Apex triggers or outbound messages
c) Message bus
d) Corba

23) The API-first approach to development at salesforce lets customers:


a) Extend functionality across Salesforce features
b) Choose the API that’s best suited to their needs
c) Build apps for the AppExchange
d) All of the above

24) REST API is best suited for which of these use cases?
a) Loading lots of data into your org for the first time
b) Writing a mobile or web app
c) Deleting 100,000 records at once
d) Pushing notifications whenever data is changed

25) SOAP API is best suited for which of these use cases?
a) Building a server-to-server integration
b) Writing an app that requires using JSON
c) Updating thousands of records at once
d) Building a slick UI for a mobile app

26) Bulk API is best suited for which of these use cases?
a) Deleting several records, one record at a time
b) Writing a mobile chat app
c) Building a new Salesforce UI
d) Deleting 100,000 records at once

27) Streaming API is best suited for which of these use cases?
a) Notifying users whenever a record is deleted
b) Creating hundreds of account records at once
c) Writing an app where the use of XML is required
d) Using a WSDL file to specify the operations allowed on standard and custom
objects
28) What are all the factors that contribute to the total API limit calculation?
a) Org edition and API usage over the previous month
b) Org edition, license type, and expansion packs
c) License type and expansion packs
d) Number of Salesforce employees swabbing the deck

29) You can use Heroku connect for:


a) One-way data replication
b) Bidirectional data replication
c) Data proxy with Salesforce Connect
d) All the above

30) How does Heroku Connect work with Salesforce Authentication?


a) A single integration user’s credentials are stored.
b) OAuth provides Heroku Connect with API tokens after the user authorizes the
Heroku Connect application on Salesforce.
c) SAML authorizes Heroku Connect to make API calls.
d) The end user of a Heroku app authorizes Heroku Connect via OAuth.

31) Heroku Connect data replication happens:


a) Instantly in both directions
b) Near real time in both directions
c) Near real time for writes to Salesforce, and on a 30-second polling window for
writes to Heroku Postgres
d) Near real time for writes to Salesforce, and either on a polling window or near
real time for writes to Heroku Postgres (depending on the user configuration)

32) Salesforce Connect is used for:


a) Developing ETL services
b) Replicating external data into Salesforce
c) Proxying external data into Salesforce
d) Bidirectional syncing of external data in Salesforce

33) Salesforce Connect custom adapters support:


a) Cross-object relationships
b) Data paging
c) Search
d) All of the above

34) Which of the following is NOT an advantage of Salesforce Connect over ETL?
a) The data is always fetched on demand.
b) If the origin is offline, the data is still available via Salesforce Connect.
c) Standard protocols like OData can easily proxy external data into Salesforce.
d) Data security can be enforced using per-user or per-application authentication.
35) True or false: You can integrate identity providers with Salesforce using connected apps.
a) True
b) False

36) How is OpenID Connect different from SAML?


a) You can’t use OpenId Connect to enable SSO between two services.
b) You can only use OpenId Connect to enable SSO between two services.
c) OpenId Connect is built for today’s API economy because it adds an
authentication layer on top of OAuth 2.0
d) B and C

37) Which of the following scenarios describes how you can use a connected app?
a) Users can create their own connected apps to access their personal email
accounts.
b) Users can log in to an external application with their Salesforce or Experience
Cloud credentials
c) Users can authorize a mobile app to securely access defined Salesforce data on
their behalf.
d) B and C

38) What’s the difference between a connected app developer and a connected app admin?
a) Only developers can set policies that explicitly define who can use connected
apps and where they can access the apps from.
b) Only admins can set policies that explicitly define who can use connected apps
and where they can access the apps from.
c) There isn’t a difference between developers and admins when it comes to
connected apps
d) Only developers use connected apps. Admins have no role with connected apps

39) What type of jobs do not show up in the Apex Flex Queue.
a) Future Method Jobs
b) Batch Apex Jobs
c) Queueable Apex Jobs
d) Scheduled Apex Jobs

40) Which statement is true regarding the Flex Queue.


a) You can submit up to 200 batch jobs for execution.
b) Jobs are processed first-in-first-out.
c) Jobs can only be scheduled during Taco Tuesdays.
d) Jobs are executed depending upon user license.
41) True or false: Dynamic client registration enables resource servers to dynamically create
client apps as connected apps.
a) True
b) False

42) What role does your Salesforce org play in providing authorization for external API
gateways?
a) My Salesforce org requests the creation of client apps as connected apps from
the external API gateway.
b) My Salesforce org hosts the protected data
c) My Salesforce org is the OAuth authorization server that protects resources
hosted on an external API.
d) My Salesforce org asks the external API gateway to authenticate a client app.

43) Which of the following ISV features are available in Lightning Experience?
a) Trialforce
b) Usage Metrics Visualization app.
c) Package creation.
d) None of the above are available.

44) As an ISV, which of the following is true about AppExchange:


a) Your apps undergo a review for Lightning Experience readiness.
b) Your apps are available to all customers, whether they have enabled Lightning
Experience or not.
c) The 'Lighting Ready' sash lets AppExchange visitors know your app is verified for
Lighting Experience
d) All of the above

45) Which of the following is true of Apex in the new Lightning Experience:
a) You have to update the API version for all your Apex classes in order for them to
work in Lightning Experience.
b) Apex is not supported in the new Lightning Experience.
c) Your Apex code and queries continue to function as before.
d) All of the above

46) What should you look for when reviewing your installed packages before using them with
Lightning Experience?
a) A 'Lightning Ready' sash for the package on AppExchange.
b) An error message saying the package isn't 'Lightning Ready'.
c) A 'Lightning Ready' check mark on the Installed Packages page.
d) Errors in the JavaScript console when using the package.
47) The primary benefit of a workflow outbound message over an Apex trigger is:
a) The message can deliver the payload only as SOAP.
b) The message supports different authentication mechanisms.
c) Messages are completely declarative.
d) The message can handle every database event.

48) Callouts in Apex trigger support which authentication mechanisms:


a) Pre-shared keys
b) Username and password credentials
c) OAuth flows using named credentials in the Remote Site settings
d) All of the above

49) Heroku apps that handle callouts from Salesforce can be written in:
a) Node.js / JavaScript
b) Java, Scala, Clojure
c) Python
d) PHP
e) All of the above

50) Canvas apps can authenticate a user with:


a) Username and password
b) OAuth
c) Signed request
d) Either OAuth or signed request

51) You can build Canvas apps and run them on Heroku with of the following languages:
a) Node.js / JavaScript
b) Java, Scala, Clojure
c) Python
d) PHP
e) All of the above

52) The best use of Canvas apps is to:


a) Display real estate photos in Salesforce for house listings
b) Render custom widgets on Chatter feeds
c) Display third-party apps in Salesforce
d) All of the above

53) Which of the following statements about Lightning Components and Lightning
Experience is true?
a) Lightning Experience is something you use directly, Lightning Components are
something you build apps with.
b) Lightning Experience is (mostly) built with Lightning Components.
c) Lightning Experience uses an app-centric development model using Lightning
Components.
d) All of the above

54) Which of the following is true of Aura Components:


a) Aura Components can only be used in the Lightning Experience and not the
Salesforce mobile app
b) Aura Components can be used in Visualforce pages
c) Aura Components are only optimized for the desktop experience
d) All of the above

55) Applications on Heroku that use Salesforce REST APIs can use which authentication
mechanisms:
a) Anonymous access without credentials on trusted networks
b) Username and password with an OAuth connected app
c) OAuth web or user-agent flow in which the user authorizes a connected app
using browser redirects
d) B and C
e) A and C

56) You can use the Salesforce REST APIs to:


a) Insert or update records
b) Execute processes as another user
c) Access database log files
d) Feed your kitten

57) Streaming API’s push paradigm lets you:


a) Create more records in a single API call
b) Use SOSL to listen for event notifications
c) Avoid making unnecessary API requests by listening for notifications rather than
polling for data
d) Write code from the crow’s nest of a pirate ship

58) What is the second generation of PushTopic events?


a) Platform events
b) Generic streaming events
c) Change data capture events
d) The event bus

59) Which replay option specifies that the subscriber receives event notifications with replay
IDs 6, 7, 8, and 9?
a) 6
b) 5
c) -2
d) -1

60) Which of the following SOQL query a valid pushtopic query? SELECT Name, Phone
FROM Contact WHERE MailingCity=’Indianapolis’
a) WHERE clauses aren’t supported for PushTopics
b) The SELECT statement doesn’t include an ID
c) Contact isn’t a supported object for pushTopic queries
d) The query is valid

61) What channel name corresponds to a platform event that you defined with the label of
solar panel event?
a) /event/Solar_panel_Event
b) /topic/Solar_panel_Event
c) /event/Solar_panel_Event__c
d) /event/Solar panel Event
e) /event/Solar_panel_Event__e

62) How do you broadcast a message with generic streaming?


a) Create a generic streaming channel, and then POST a request to
/StreamingChannel/<streaming channel ID>/push
b) Create a PushTopic, and then POST a request to /PushTopic/<PushTopicId>push
c) POST a request to /PushTopic/Push
d) POST a request to /StreamingChannel/push

63) Which of the following features of Visualforce do NOT work in Lightning Experience?
a) Creating custom apps and tabs
b) Overriding standard actions with Visualforce pages
c) Using window location in JavaScript code
d) Remote Objects

64) Which of the following is NOT true about the user interface and visual design in Lightning
Experience:
a) PDFs render with the Lightning Experience visual design
b) You can’t hide the Lightning Experience main navigation header or sidebar
c) The <apex:inputField> tag renders with the Salesforce Classic appearance
d) The Standard Visualforce header and sidebar are hidden

65) Which of the following statements is true about creating apps with visualforce:
a) Visualforce is designed primarily for page-centric web apps.
b) Visualforce renders the page on the server.
c) Visualforce will be fully supported by Salesforce for years to come.
d) All of the above
66) Which of the following statements is NOT true about creating apps with Lightning
components:
a) Lightning components are designed primarily for app-centric web apps.
b) Lightning components can be used everywhere Visualforce can be used.
c) Lightning components render the page on the client.
d) All of the above

67) Which of the following is a poor use of Lightning Components:


a) Developing an app for Salesforce1.
b) Developing a highly interactive app with an innovative user interface.
c) Developing widgets for use in Lightning App Builder.
d) None of the above. All of these are good use cases for Lightning Components.
—----------------------------------------------------------------------------------------------------------------------------

68) Which attribute of force:recordData is set to a localized error message if an error occurs
on loading a component?
a) targetFields
b) targetError
c) Error
d) fieldsError

69) My Domain is NOT required at the very beginning to develop with Lightning
Components?
a) True
b) False

70) Which tool you will use to add a lightning component on a record page?
a) Flow Builder
b) Report Builder
c) Form Builder
d) App Builder

71) Select the inappropriate reason from the following to integrate apps on Heroku with
salesforce:
a) Data replication
b) Data proxies
c) Data Security
d) Custom user interfaces

72) Which are two types of SOAP API WSDLs provided by Salesforce? (Select 2)
a) Company WSDL
b) Enterprise WSDL
c) Partner WSDL
d) Person WSDL
73) SOAP web services are commonly used for:
a) Simple, light weight services that are typically stateless.
b) Public APIs that use HTTP and JSON.
c) Enterprise apps that require a formal exchange format or stateful operations.
d) No one uses SOAP any longer

74) Which type of app enables an external application to integrate with Salesforce using API
and standard protocols?
a) Salesforce app
b) Service app
c) Connected app
d) External app

75) Which of the following statements is true about external callouts:


a) SOAP callouts use xml and may use a wsdl for code generation.
b) HTTP callouts typically use JSON but can use XML as well.
c) HTTP callouts are generally easier to work with than SOAP callouts.
d) All of the above.

76) A developer, Andrew would like to execute or run jobs sequentially. Suggest which would
be the appropriate class?
a) Queueable
b) Database.Batchable
c) Database.Stateful
d) Database.Iterable

77) A developer would like to bypass the total number of records retrieved by SOQL queries
in the start method. Which class object you would suggest to use?
a) Database.QueryLocator
b) Iterable
c) Database.QueryRecords
d) Database.Iterable

78) A developer want to send JSON data through a POST request in the web service. Which
request header should be set to JSON?
a) Data-Type
b) Endpoint
c) Content-Type
d) body

79) Identify the invalid trigger event from the following


a) Before undelete
b) After insert
c) Before update
d) After delete

80) Which annotation you will use to declare a method as test method?
a) “@isTest”
b) “@future”
c) “@Rest”
d) “@TestMethod”

81) Which class contains the RestRequest and RestResponse objects in RESTful
webservice?
a) RestHttp
b) RestContent
c) RestContext
d) RestContainer

82) Which of the following attribute is used to map the URL pattern to RestResource
annotation?
a) urlPattern
b) urlText
c) urlMap
d) urlMapping

83) How many maximum number of Apex jobs we could schedule at one time?
a) 50
b) 100
c) 150
d) 200

84) Identify the correct apex class which allows to submit jobs for asynchronous processing
with member variables of Non-primitive types?
a) AsyncApex
b) Stateful
c) Batchable
d) Queueable

85) Select the second generation of event products related to streaming API. (Select 2)
a) Change Data Capture
b) PushTopic Events
c) Generic Streaming Events
d) Platform Events

86) A Developer, Brian, would like to create an optimized WSLD for use with many
salesforce org. Which type of WSDL should he create?
a) Company WSDL
b) Person WSDL
c) Enterprise WSDL
d) Partner WSDL

87) Identify the correct the attribute of force:recordData component which determines what
operations are available to perform with the record
a) Mode
b) recordID
c) Fields
d) LayoutType

88) Identify the invalid HTTP method from the following


a) UNDELETE
b) GET
c) POST
d) DELETE
e) PUT

89) A developer called a web service from an apex code. Which response status code she
should check to ensure that the request is successful?
a) 500
b) 404
c) 201
d) 200

90) A developer is loading a record from the database using force:recordData component.
Which attribute is populated with the loaded record?
a) tagetFields
b) targetRecord
c) targetError
d) targetRow

91) What should be the minimum code coverage % before deploying an apex code?
a) 71
b) 73
c) 75
d) 72

92) Select the inappropriate method from the following which informs the runtime that mock
callouts are used in the test method
a) Test.runAs
b) Test.setMock
c) Test.Mock
d) Test.startTest
93) To make a Lightning component available for any type of page, it must implement which
interface?
a) flexipage:availableForAllPageTypes
b) flexipage:availableForPageTypes
c) flexipage:availableForAllTypes
d) flexipage:ForAllPageTypes

94) Which annotation will be used to expose an apex class as REST resource?
a) “@”RestResource
b) “@”ResourceRest
c) “@”HttpResource
d) “@”RestHttp

95) Which method causes the entire set of operations to be rolled back?
a) error()
b) showError()
c) isError()
d) addError()

96) To get a fresh set of governor limits in an apex test class, which method shall be used?
a) Test.runAs
b) Test.setMock
c) Test.startTest and Test.stopTest
d) Test.assert

97) A developer like to monitor the progress of future jobs. Suggest the correct way.
a) From setup, select Apex Jobs
b) Query CronTrigger to find future job
c) Query AsyncApexJob to find future job
d) Query CronJobDetail to find future job

98) Below given is the controller code for a component. Identify what is missing in the code.
Public with sharing class ExpensesController{
Public static List<Expense__c> getExpenses(){
Return [SELECT Id, Name, Amount__c, Client__c, Date__c,
Reimbursed__c, CreatedDate
FROM Expenses__c];
}
}
a) ‘@’AuraEnabled annotation for getExpense()
b) ‘@’AllowAccess annotation for getExpense()
c) ‘@’isTest annotation for getExpense()
d) ‘@’Aura annotation for getExpense()
99) A component has an attribute message. Select the appropriate statement to set the
value of message from client-controller method with newMessage.
handleCLick2:function(component,event,helper){
var newMessage = event.getSource().get(“v.label”);
console.log(“handleClick2:Message:”+newMessage);
//Add correct statement below
—--------------------------------
}
a) component.set(“message”,newMessage);
b) component.set(“{!v.message}”,newMessage);
c) component.set(“v.message”,newMessage);
d) component.get(“v.message”,newMessage);

100) A Developer, Amy, would like to create an optimized WSLD for a single salesforce
org. Which type of WSDL should she create?
e) Company WSDL
f) Person WSDL
g) Enterprise WSDL
h) Partner WSDL

101) A Lightning component developer want to fetch data of a custom object Review__c
from database and want to display on a component. What type of controller should be
used?
a) Standard List Controller
b) Extension Controller
c) Client-side Controller with Server-side Controller
d) Standard Controller

102) Identify the correct trigger variable which shows the currently executing code in apex
trigger.
a) isInsert
b) isExecuting
c) isAfter
d) isDelete

103) Select the appropriate option to fill in the blanks which should call the client-side
controller method by clicking on a button of a component
greet.cmp
<div>
<lightning:button labels=”You look nice today”
onClick =”-----------”/>
</div>
greet.js
{
handleClick : function(comp,event,helper){
alert(‘Welcome’);
}
}
a) {!handleClick}
b) {!c.handleClick}
c) {c.handleClick}
d) {!chandleClick}

104) Which of following API is based on REST principles and is optimized for working with
larger sets of data?
a) Bulk Api
b) SOAP Api
c) Streaming Api
d) None of the above

105) To start the batch processing, we have to use which of the following method?
a) Database
b) Database.executeBatch
c) Database
d) Database

106) Which of the following annotation you will add to your method to expose it as a REST
Resource that can be called by an HTTP GET request?
a) “@”HttpPost
b) “@”HttpGet
c) “@”HttpPut
d) “@”HttpDelete

107) Which of the following is NOT the use of future methods?


a) Callout to external Web Services
b) Isolating DML operations on different sObject types prevent mixed DML error
c) Override organization-wide sharing defaults
d) Resource intensive calculation or processing of records

108) Which are three methods of Heroku and Salesforce Integration? (Select 3)
a) Heroku Connect.
b) Salesforce SOAP APIs.
c) Salesforce REST APIs
d) Callouts.
e) Canvas.

109) Suggest an attribute to a developer to declare that the component handles the event
after changes in the record (NOT SURE first marked c)
a) recordEdited
b) recordData
c) recordUpdated
d) recordChanges

110) Below given is the controller code for a component. How would a component use this
controller? Select the appropriate option.
Public with sharing class ExpenseController{
//Some code here…
}
a) <aura:component standardController=’ExpenseController’>
b) <aura:component controller=’ExpenseController’>
c) <aura:component implements=’ExpenseController’>
d) <aura:component class=’ExpenseController’>

111) Select the benefit of Apex Unit tests


a) Ensuring the apex classes and triggers work as expected
b) Meeting the code coverage requirements
c) High quality apps delivered to the production org
d) All of the above

112) State TRUE or FALSE.


By default the org data is accessible in test methods.
a) True
b) False

113) When making a callout from a method, the method waits for external service to send
back the callout response. A developer does not want this behaviour. Suggest the
appropriate solution.
a) Place the callout method in an asynchronous method that is annotated with
@future(callout=true) or use Queueable Apex
b) Place the callout method in an asynchronous method that is annotated with
@future
c) Place the callout method in an asynchronous method that is annotated with
@HttpGet(callout=true)
d) Place the callout method in an asynchronous method that is annotated with
@HttpPost(callout=true)

114) select three different flavours of asynchronous apex ?


a) Batch Apex
b) Future Method
c) Background Queueable
d) Scheduled Apex
115) True or False
Methods with the future annotation must be static methods and can only return a
void type.
a) True
b) False

116) When we start batch apex, which record is created?


a) AsyncJob
b) AsyncApexBatch
c) AsyncApexJob
d) SyncApexJob

117) Consider the following code. Select appropriate statement to print the value of
message attribute.
<aura:component>
<aura:attribute name=”message” type=”String”/>
<p>Hello! --------------------</p>
</aura:component>
a) {v.message}
b) {! message}
c) {message}
d) {!v.message}

118) Which Context variable provides a list of sObjects which we can use only in insert
,update and delete trigger?
a) old
b) oldMap
c) new
d) newMap

119) Which access specifier you will use for a class and methods to publish them as
SOAP web-service?
a) Public, webservice
b) Public, webmethod
c) Global, webmethod
d) Global , webservices

120) Select the form-based component from the following which can be used to display
records only.
a) lightning:recordDisplayForm
b) lightning:recordForm
c) lightning:recordEditForm
d) lightning:recordViewForm
SFDC TRAILHEAD QUIZ+Extra Questions

Q.1 which method causes the entire set of operations to be rolled back
a)error()
b)showError()
c)isError()
d)addError()
Q.2 Which Method you will use to declare a method as test method?
a)’@isTest’
b) ’@future’
c) ’@Rest’
d) ’@TestMethod’
Q.3 A developer would like to bypass the total number of records retrieved by SOQL
queries in the start Method.Which class object you would suggest to use?
a)Database.QueryLocator
b)Iteratable
c) Database.QueryRecords
d) Database.Iterable
Q.4 select three different flavours of asynchronous apex ?
a)Batch Apex
b)Future Method
c) Background Queueable
d)Scheduled Apex
Q.5 A developer like to Monitor the progress of future jobs. Suggest the correct way.
a)From Setup ,select Apex Jobs
b) Query ConTrigger to find future job
c) Query AsyncApexJob to find future job
d) Query ConJobDetail to find future job
Q.6 Which Annotation will be used to expose an Apex class as Rest resource?
a) ‘@’RestResource
b) ‘@’ResourceRest
c) ‘@’HttpResource
d) ‘@’RestHttp
Q.7 When making a callout from a method ,the method waits for external service to send
back the callout response. A developer does not want this behaviour. Suggest the
appropriate solution.
a) Place the callout method in an asynchronous method that is annotated with
@future(callout=true)
b) Place the callout method in an asynchronous method that is annotated with
@future.
c) Place the callout method in an asynchronous method that is annotated with
@HttpGet(callout=true).
d) Place the callout method in an asynchronous method that is annotated with
@HttpPost(callout=true).

When making a callout from a method, the method waits for the external service to send
back the callout response before executing subsequent lines of code. Alternatively, you can
place the callout code in an asynchronous method that’s annotated
with @future(callout=true) or use Queueable Apex. This way, the callout runs on a separate
thread, and the execution of the calling method isn’t blocked.

Q.8 select the second generation of event products related to streaming API (select 2)
a) Change Data Capture
b) Push Topic Events
c)Generic streaming events
d)Platform events

Q.9 Which are the three methods of Heroku and Salesforce Integration(Select 3)
a) Heroku Connect
b) Salesforce SOAP API’S
c) Callout
d) Canvas

Q.10 A developer is loading a record from the database using force:recordData


component. Which attribute is populated with the loaded record?
a) targetFields
b) targetRecord
c) targetError
d) targetRow

Q.11 Which of the following statement is true about external callouts:


a) SOAP callouts use XML and may use a WSDL for code generation.
b) HTTP Callouts typically use JSON but can use XML as well.
c) HTTP Callouts are generally easier to work with than SOAP callouts.
d) All of the Above

Q.12 What type of jobs do not show up in the Apex Flex Queue?
a) Future Method Jobs
b) Batch Apex Jobs
c) Queueable Apex Jobs
d) Scheduled Apex Jobs

Q.13 True and False.


By default the org data is accessible in test methods
a) TRUE
b) FALSE

Q. 14 Identify the invalid trigger event from the following.


• Before undelete
• After insert
• Before update
• After delete

Q.15 A component has an attribute message . Select line appropriate statement to set
the value of message from client-controller method with newMessage.

handleClick2: function(component,event,helper){
var newMessage = event.getSource().get(“v.label”);
console.log(“handleClick2: Message:” + newMessage);
// Add correct statement below
---------------------------------------
}

a) component.set(“message”,newMessage);
b) component.set(“{v.message}”,newMessage);
c) component.set(“v.message”,newMessage);
d) component.get(“v.message”,newMessage);

Q.16 Suggest an attribute to a developer to declare that the component handles the
event after changes in the record.
a) recordEdited
b) recordData
c) recordUpdated
d) recordChanged
Q.17 Which attributes of force:recordData is set to localized error message if an error
occurs on loading a component?
a) targetFields
b) targetError
c) error
d) fieldsError

Q.18 True and False


Methods with the future annotation must be static methods and can only return a void
type.
a) True
b) False

Q.19 When we start batch apex , which record is created?


a) AsyncJob
b) AsyncApexBatch
c) AsyncApexJob
d) SyncApexJob

Q.20 A developer called a web services from an apex code which response status code
she should check to ensure that the request is successful?
a) 500
b) 404
c) 201
d) 200

When the server processes the request, it sends a status code in the response. The status
code indicates whether the request was processed successfully or whether errors were
encountered. If the request is successful, the server sends a status code of 200. You’ve
probably seen some other status codes, such as 404 for file not found or 500 for an internal
server error.

Q.21 Identify the invalid HTTP method from the following


a) UNDELETE
b) GET
c) POST
d) DELETE
e) PUT

Q.22 A lightning component developer want to fetch data of a custom object


Review__c from database and want to display on a component. What type of controller
should be used?
a) Standard List Controller
b) Extension Controller
c) Client-Side controller with Server-Side Controller
d) Standard Controller

Q.23 Select the inappropriate reason from the following to integrate apps on Heroku
with salesforce:
a) Data Replication
b) Data Proxies
c) Data Security
d) Custom User Interface

Q.24 Consider the following code. Select appropriate statement to print the value of
message
attribute.
<aura:component>
<aura:attribute name=”message” type=”String”/>
<p>Hello! --------------------</p>
</aura:component>

a. {v.message}
b. {! message}
c. {message}
d. {!v.message}

Q.25 Which of the following annotation you will add to your method to expose it as a
REST resource that can be called by an HTTP GET request?
a.) “@”HttpPost
b.)“@”HttpGet
c.) “@”HttpPut
d. )“@”HttpDelete

Q.26 Which Context variable provides a list of sObjects which we can use only in insert
,update and delete trigger?
a) old
b) oldMap
c) new
d) newMap

27.The API-first approach to development at Salesforce lets customers:


A.Extend functionality across Salesforce features
B.Choose the API that's best suited to their needs
C.Build apps for the AppExchange
D.All of the above
28.REST API is best suited for which of these use cases?
A.Loading lots of data into your org for the first time
B.Writing a mobile or web app
C.Deleting 100,000 records at once
D.Pushing notifications whenever data is changed
29.SOAP API is best suited for which of these use cases?
A.Building a server-to-server integration
B.Writing an app that requires using JSON
C.Updating thousands of records at once
D.Building a slick UI for a mobile app
30.Bulk API is best suited for which of these use cases?
A.Deleting several records, one record at a time
B.Writing a mobile chat app
C.Building a new Salesforce UI
D.Deleting 100,000 records at once
31.Streaming API is best suited for which of these use cases?
A.Notifying users whenever a record is deleted
B.Creating hundreds of account records at once
C.Writing an app where the use of XML is required
D.Using a WSDL file to specify the operations allowed on standard and custom objects
32. What are all the factors that contribute to the total API limit calculation?
A.Org edition and API usage over the previous month
B.Org edition, license type, and expansion packs
C.License type and expansion packs
D.Number of Salesforce employees swabbing the deck

HTTP METHODS FOR REST API


HTTP methods (HEAD, GET, POST, PATCH, DELETE)
A REST request consists of four components: a resource URI, an HTTP method, request
headers, and a request body.

Request headers specify metadata for the request. The request body specifies data for the
request, when necessary. If there’s no data to specify, the body is omitted from the request.

• GET—The HTTP method used for this API call.


• {{_endpoint}}—The place where the request will take place. In this case,
you added the URL of your Trailhead Playground to the _endpoint field
in the variables to connect to Salesforce.
• /services/data—Specifies that you’re making a REST API request.
• /v {{version}}—The API version number. The double curly quotes
indicate that this can be set as a variable.
• /sobjects—Specifies that you’re accessing a resource under the sObject
grouping.
• /:SOBJECT_API_Name—The sObject being actioned; in this case,
Account.
• /describe—An action; in this case, a Describe request.
• 33. Streaming API's push paradigm lets you:
• A.Create more records in a single API call
• B.Use SOSL to listen for event notifications
• C.Avoid making unnecessary API requests by listening for notifications rather
than polling for data
• D.Write code from the crow's nest of a pirate ship
• 34. What is the second generation of PushTopic events?
• A.Platform events
• B.Generic streaming events
• C.Change data capture events
• D.The event bus
• 35. Which replay option specifies that the subscriber receives event notifications
with replay IDs 6, 7, 8, and 9?
• A.6
• B.5
• C.-2
• D.-1
Streaming API lets you push real-time notifications to clients using the publish-subscribe
model.

36. Which of the following scenarios describes how you can use a connected app?
A.Users can create their own connected apps to access their personal email accounts.
B.Users can log in to an external application with their Salesforce or Experience Cloud
credentials.
C.Users can authorize a mobile app to securely access defined Salesforce data on their
behalf.
D.B and C
37. What's the difference between a connected app developer and a connected app
admin?
A.Only developers can set policies that explicitly define who can use connected apps and
where they can access the apps from.
B.Only admins can set policies that explicitly define who can use connected apps and
where they can access the apps from.
C.There isn't a difference between developers and admins when it comes to connected
apps.
D.Only developers use connected apps. Admins have no role with connected apps.

38. True or false: OAuth 2.0 APIs enable a user to work in one app but see the data
from another.
A.True
B.False
39. You're creating a connected app that allows a Smart TV to display a customer's
movie order history. Which OAuth 2.0 flow would you use for the connected app?
A.OAuth 2.0 web server flow
B.OAuth 2.0 device flow
C.OAuth 2.0 JSON Web Token Exchange (JWT) bearer flow
D.OAuth 2.0 user-agent flow

Using OpenID Connect dynamic client registration, resource servers can dynamically create
client apps as connected apps in Salesforce -- TRUE
When Salesforce acts as your identity provider, you can use a connected app to integrate
your service provider with your org. – FALSE

40. True or false: You can integrate identity providers with Salesforce using connected
apps.
A.True
B.False
41. How is OpenID Connect different from SAML?
A.You can't use OpenID Connect to enable SSO between two services.
B.You can only use OpenID Connect to enable SSO between two services.
C.OpenID Connect is built for today's API economy because it adds an authentication
layer on top of OAuth 2.0.
D.B and C

42. True or false: Dynamic client registration enables resource servers to dynamically
create client apps as connected apps.
A.True
B.False
43. What role does your Salesforce org play in providing authorization for external API
gateways?
A.My Salesforce org requests the creation of client apps as connected apps from the
external API gateway.
B.My Salesforce org hosts the protected data.
C.My Salesforce org is the OAuth authorization server that protects resources hosted on
an external API gateway.
D.My Salesforce org asks the external API gateway to authenticate a client app.
44. Which of the following is NOT an advantage of data replication over data proxies?
A.A replicated data set offloads processing and requests from an origin data server.
B.A replicated data set is always and immediately in sync with the origin data.
C.A replicated data set reduces data access latency.
D.A replicated data set supports bidirectional writes.
45. You can use Salesforce Connect to proxy which types of data sources:
A.OData 2.0 and 4.0
B.REST with JSON payloads
C.REST with XML payloads
D.SOAP
E.All of the above
46. Which technology do Salesforce REST APIs use for authentication?
A.Pre-shared keys
B.Basic usernames and passwords
C.OAuth
D.SAML
47. Callouts from Salesforce to Heroku can be made using:
A.Web sockets
B.Apex triggers or outbound messages
C.Message bus
D.Corba

48. You can use Heroku Connect for:


A.One-way data replication
B.Bidirectional data replication
C.Data proxy with Salesforce Connect
D.All of the above
49. How does Heroku Connect work with Salesforce authentication?
A.A single integration user's credentials are stored.
B.OAuth provides Heroku Connect with API tokens after the user authorizes the Heroku
Connect application on Salesforce.
C.SAML authorizes Heroku Connect to make API calls.
D.The end user of a Heroku app authorizes Heroku Connect via OAuth.
50. Heroku Connect data replication happens:
A.Instantly in both directions
B.Near real time in both directions
C.Near real time for writes to Salesforce, and on a 30-second polling window for writes
to Heroku Postgres
D.Near real time for writes to Salesforce, and either on a polling window or near real time
for writes to Heroku Postgres (depending on the user configuration)

51. Salesforce Connect is used for:


A.Developing ETL services
B.Replicating external data into Salesforce
C.Proxying external data into Salesforce
D.Bidirectional syncing of external data in Salesforce
52. Salesforce Connect custom adapters support:
A.Cross-object relationships
B.Data paging
C.Search
D.All of the above
53. Which of the following is NOT an advantage of Salesforce Connect over ETL?
A.The data is always fetched on demand.
B.If the origin is offline, the data is still available via Salesforce Connect.
C.Standard protocols like OData can easily proxy external data into Salesforce.
D.Data security can be enforced using per-user or per-application authentication.
54. Applications on Heroku that use Salesforce REST APIs can use which
authentication mechanisms:
A.Anonymous access without credentials on trusted networks
B.Username and password with an OAuth connected app
C.OAuth web or user-agent flow in which the user authorizes a connected app using
browser redirects
D.B and C
E.A and C
55. You can use the Salesforce REST APIs to:
A.Insert or update records
B.Execute processes as another user
C.Access database log files
D.Feed your kitten

56. The primary benefit of a workflow outbound message over an Apex trigger is:
A.The message can deliver the payload only as SOAP.
B.The message supports different authentication mechanisms.
C.Messages are completely declarative.
D.The message can handle every database event.
57. Callouts in Apex trigger support which authentication mechanisms:
A.Pre-shared keys
B.Username and password credentials
C.OAuth flows using named credentials in the Remote Site settings
D.All of the above

58. Heroku apps that handle callouts from Salesforce can be written in:
A.Node.js / JavaScript
B.Java, Scala, Clojure
C.Python
D.PHP
E.All of the above

59. Canvas apps can authenticate a user with:


A.Username and password
B.OAuth
C.Signed request
D.Either OAuth or signed request
60. You can build Canvas apps and run them on Heroku with of the following
languages:
A.Node.js / JavaScript
B.Java, Scala, Clojure
C.Python
D.PHP
E.All of the above
61. The best use of Canvas apps is to:
A.Display real estate photos in Salesforce for house listings
B.Render custom widgets on Chatter feeds
C.Display third-party apps in Salesforce
D.All of the above

Valid Trigger event

• before insert
• before update
• before delete
• after insert
• after update
• after delete
• after undelete

Invalid Trigger Event → Before undelete

• Before triggers are used to update or validate record values before they’re
saved to the database.
• After triggers are used to access field values that are set by the system (such
as a record's Id or LastModifiedDate field), and to affect changes in other
• records. The records that fire the after trigger are read-only.
62. What is a key benefit of asynchronous processing?
A.Higher governor and execution limits
B.Unlimited number of external callouts
C.Override organization-wide sharing defaults
D.Enabling turbo mode for transactional processing
63. Batch Apex is typically the best type of asynchronous processing when you want to:
A.Make a callout to a web service when a user updates a record.
B.Schedule a task to run on a weekly basis.
C.Update all records in your org.
D.Send a rickroll email to a contact.

Future Apex
Future methods are typically used for:

• Callouts to external Web services. If you are making callouts from a trigger or after
performing a DML operation, you must use a future or queueable method. A callout
in a trigger would hold the database connection open for the lifetime of the callout
and that is a "no-no" in a multitenant environment.
• Operations you want to run in their own thread, when time permits such as some sort
of resource-intensive calculation or processing of records.
• Isolating DML operations on different sObject types to prevent the mixed DML error.
This is somewhat of an edge-case but you may occasionally run across this issue.
See sObjects That Cannot Be Used Together in DML Operations for more details.

Future Method Syntax


Future methods must be static methods, and can only return a void type. The
specified parameters must be primitive data types, arrays of primitive data types, or
collections of primitive data types. Notably, future methods can’t take standard or
custom objects as arguments. A common pattern is to pass the method a List of
record IDs that you want to process asynchronously.

public class SomeClass {

@future

public static void someFutureMethod(List<Id> recordIds) {

List<Account> accounts = [Select Id, Name from Account Where Id IN


:recordIds];

// process account records to do awesome stuff

Status : success returns 200

@isTest
public class SMSCalloutMock implements HttpCalloutMock {
public HttpResponse respond(HttpRequest req) {
// Create a fake response
HttpResponse res = new HttpResponse();
res.setHeader('Content-Type', 'application/json');
res.setBody('{"status":"success"}');
res.setStatusCode(200);
return res;
}

Batch Apex
Batch Apex is used to run large jobs (think thousands or millions of records!) that
would exceed normal processing limits. Using Batch Apex, you can process records
asynchronously in batches (hence the name, “Batch Apex”) to stay within platform
limits. If you have a lot of records to process, for example, data cleansing or
archiving, Batch Apex is probably your best solution.

Batch Apex Syntax


To write a Batch Apex class, your class must implement the Database.Batchable
interface and include the following three methods:

start

Used to collect the records or objects to be passed to the interface method execute
for processing. This method is called once at the beginning of a Batch Apex job and
returns either a Database.QueryLocator object or an Iterable that contains the
records or objects passed to the job.

Most of the time a QueryLocator does the trick with a simple SOQL query to
generate the scope of objects in the batch job. But if you need to do something
crazy like loop through the results of an API call or pre-process records before being
passed to the execute method, you might want to check out the Custom Iterators
link in the Resources section.

With the QueryLocator object, the governor limit for the total number of records
retrieved by SOQL queries is bypassed and you can query up to 50 million records.
However, with an Iterable, the governor limit for the total number of records
retrieved by SOQL queries is still enforced.

execute

Performs the actual processing for each chunk or “batch” of data passed to the
method. The default batch size is 200 records. Batches of records are not guaranteed
to execute in the order they are received from the start method.

This method takes the following:

• A reference to the Database.BatchableContext object.


• A list of sObjects, such as List<sObject>, or a list of parameterized types. If you are
using a Database.QueryLocator, use the returned list.

finish
Used to execute post-processing operations (for example, sending an email) and is called
once after all batches are processed.

Here’s what the skeleton of a Batch Apex class looks like:

public class MyBatchClass implements Database.Batchable<sObject> {

public (Database.QueryLocator | Iterable<sObject>)


start(Database.BatchableContext bc) {

// collect the batches of records or objects to be passed to execute

public void execute(Database.BatchableContext bc, List<P> records){

// process each batch of records

}
public void finish(Database.BatchableContext bc){

// execute any post-processing operations

Queueable Apex allows you to submit jobs for asynchronous processing similar to
future methods with the following additional benefits:

• Non-primitive types: Your Queueable class can contain member variables of


non-primitive data types, such as sObjects or custom Apex types. Those
objects can be accessed when the job executes.
• Monitoring: When you submit your job by invoking the System.enqueueJob
method, the method returns the ID of the AsyncApexJob record. You can use
this ID to identify your job and monitor its progress, either through the
Salesforce user interface in the Apex Jobs page, or programmatically by
querying your record from AsyncApexJob.
• Chaining jobs: You can chain one job to another job by starting a second job
from a running job. Chaining jobs is useful if you need to do some sequential
processing.

Queueable Syntax
To use Queueable Apex, simply implement the Queueable interface.

public class SomeClass implements Queueable {

public void execute(QueueableContext context) {

// awesome code here

• You can add up to 50 jobs to the queue with System.enqueueJob in a single


transaction.
• When chaining jobs, you can add only one job from an executing job with
System.enqueueJob, which means that only one child job can exist for each
parent queueable job. Starting multiple child jobs from the same queueable
job is a no-no.
64. What type of jobs do not show up in the Apex Flex Queue.
A.Future Method Jobs
B.Batch Apex Jobs
C.Queueable Apex Jobs
D.Scheduled Apex Jobs
65.Which statement is true regarding the Flex Queue.
A.You can submit up to 200 batch jobs for execution.
B.Jobs are processed first-in first-out.
C.Jobs can only be scheduled during Taco Tuesdays.
D.Jobs are executed depending upon user license.
66. How many apex jobs we can scheduled at one time
A) 50
B) 100
C) 150
D) 200

Monitoring Future Jobs


Future jobs show up on the Apex Jobs page like any other jobs. However, future jobs
are not part of the flex queue currently.

You can query AsyncApexJob to find your future job, but there’s a caveat. Since
kicking off a future job does not return an ID, you have to filter on some other field
such as MethodName, or JobType, to find your job. There are a few sample SOQL
queries in this Stack Exchange post that might help.

Make Callouts to External Services from Apex


An Apex callout enables you to tightly integrate your Apex code with an external
service. The callout makes a call to an external web service or sends an HTTP request
from Apex code, and then receives the response.

Apex callouts come in two flavors.

• Web service callouts to SOAP web services use XML, and typically require a WSDL
document for code generation.
• HTTP callouts to services typically use REST with JSON.

These two types of callouts are similar in terms of sending a request to a service and
receiving a response. But while WSDL-based callouts apply to SOAP Web services,
HTTP callouts can be used with any HTTP service, either SOAP or REST.
Some Common HTTP Methods
HTTP Method Description
GET Retrieve data identified by a URL.
POST Create a resource or post data to the server.
DELETE Delete a resource identified by a URL.
PUT Create or replace the resource sent in the request body.

RestResource Annotation
The @RestResource annotation is used at the class level and enables you to expose an
Apex class as a REST resource.

These are some considerations when using this annotation:

• The URL mapping is relative


to https://instance.salesforce.com/services/apexrest/.
• A wildcard character (*) may be used.
• The URL mapping is case-sensitive. A URL mapping for my_url will only match a
REST resource containing my_url and not My_Url.
• To use this annotation, your Apex class must be defined as global.

67.which of the following method is used to map the url pattern to RestResource
Annoatation
a)urlPattern
b)urlText
c)urlMap
d)urlMapping

68. Which of the following statements is true about creating apps with Visualforce:
A.Visualforce is designed primarily for page-centric web apps.
B.Visualforce renders the page on the server.
C.Visualforce will be fully supported by Salesforce for years to come.
D.All of the above.
69. Which of the following statements is NOT true about creating apps with Lightning
components:
A.Lightning components are designed primarily for app-centric web apps.
B.Lightning components can be used everywhere Visualforce can be used.
C.Lightning components render the page on the client.
D.All of the above.
70. Which of the following is a poor use of Lightning Components:
A.Developing an app for Salesforce1.
B.Developing a highly interactive app with an innovative user interface.
C.Developing widgets for use in Lightning App Builder.
D.None of the above. All of these are good use cases for Lightning Components.

71. Which of the following features of Visualforce do NOT work in Lightning


Experience:
A.Creating custom apps and tabs.
B.Overriding standard actions with Visualforce pages.
C.Using window.location in JavaScript code.
D.Remote Objects.
72. Which of the following is NOT true about the user interface and visual design in
Lightning Experience:
A.PDFs render with the Lightning Experience visual design.
B.You can't hide the Lightning Experience main navigation header or sidebar.
C.The <apex:inputField> tag renders with the Salesforce Classic appearance.
D.The standard Visualforce header and sidebar are hidden.

73. Which of the following statements about Lightning Components and Lightning
Experience is true?
A.Lightning Experience is something you use directly, Lightning Components are
something you build apps with.
B.Lightning Experience is (mostly) built with Lightning Components.
C.Lightning Experience uses an app-centric development model using Lightning
Components.
D.All of the above.
74. Which of the following is true of Aura Components:
A.Aura Components can only be used in the Lightning Experience and not the Salesforce
mobile app.
B.Aura Components can be used in Visualforce pages.
C.Aura Components are only optimized for the desktop experience.
D.All of the above.

75. Which of the following ISV features are available in Lightning Experience?
A.Trialforce.
B.Usage Metrics Visualization app.
C.Package creation.
D.None of the above are available.
76. As an ISV, which of the following is true about AppExchange:
A.Your apps undergo a review for Lightning Experience readiness.
B.Your apps are available to all customers, whether they have enabled Lightning
Experience or not.
C.The 'Lightning Ready' certification lets AppExchange visitors know your app is
verified for Lightning Experience.
D.All of the above.
77. Which of the following is true of Apex in the new Lightning Experience:
A.You have to update the API version for all your Apex classes in order for them to work
in Lightning Experience.
B.Apex is not supported in the new Lightning Experience.
C.Your Apex code and queries continue to function as before.
D.All of the above
78. What should you look for when reviewing your installed packages before using them
with Lightning Experience?
A.A 'Lightning Ready' sash for the package on AppExchange.
B.An error message saying the package isn't 'Lightning Ready'.
C.A 'Lightning Ready' check mark on the Installed Packages page.
D.Errors in the JavaScript console when using the package.

79. Which of the following descriptions about the Lightning Component framework is
true?
A.It's a UI framework for developing web apps for mobile and desktop devices.
B.It uses JavaScript on the client side and Apex on the server side.
C.It's a modern framework for building single-page applications.
D.All of the above
80. What can you build with the Lightning Component framework?
A.Standalone app
B.Components to use inside Visualforce pages
C.Drag-and-drop components for Lightning App Builder
D.All of the above
81. How is the Lightning Component framework different from other web app
frameworks?
A.It is optimized for both mobile and desktop experiences and proves it with Salesforce1
and Lightning Experience.
B.It connects natively with services provided by the Salesforce platform.
C.It has specific opinions about how data access is performed and has specific security
requirements.
D.All of the above

Aura Attribute
Expressions
Instead of getting lost in words again, let’s dive right into making helloMessage work
as intended.

<aura:component>
<aura:attribute name="message" type="String"/>

<p>Hello! {!v.message}</p>

</aura:component>

Copy

Is that anticlimactic or what?

We’re outputting the contents of message using the expression {!v.message} . That is,
this expression references the message attribute. The expression is evaluated, and
resolves to the text string that’s currently stored in message . And that’s what the
expression outputs into the body of the component.

Ummm…what the heck is an “expression”?

An expression is basically a formula, or a calculation, which you place within


expression delimiters (“ {!” and “ }”). So, expressions look like the following:

{!<expression>}

The formal definition of an expression is a bit intimidating, but let’s look at and then
unpack it: An expression is any set of literal values, variables, sub-expressions, or
operators that can be resolved to a single value.

AURA COMPONENTS Methods - component.set("v.message", newMessage);

Let’s look at the helloMessageInteractive controller in more detail, and make that
explanation a bit more concrete.

({

handleClick: function(component, event, helper) {

let btnClicked = event.getSource(); // the button

let btnMessage = btnClicked.get("v.label"); // the button's label

component.set("v.message", btnMessage); // update our message

})

82. What does SLDS stand for?


A.Salesforce Leadership Does Surf
B.System Limits Detection System
C.Salesforce Lightning Design System
D.sObject Loading Data System
83. What are Lightning Events used for?
A.Salesforce mini developer conferences
B.Communicating between loosely coupled components
C.Logging critical details during app runtime
D.Scheduling sales calls in Lightning Experience
84. What is the name of the framework that includes Aura components?
A.Lightning Components
B.Angular
C.jQuery
D.WebObjects
85. In which language do you write Aura components action handlers?
A.Java
B.Visualforce
C.JavaScript
D.Objective-C
86. What is Lightning Data Service?
A.A set of UI elements that display record data
B.A subset of Visualforce
C.Lightning's data layer
D.A cloud-based storage and hosting service
87. What are the benefits of adopting LDS?
A.Fewer XHRs
B.Shared record data across components
C.Local offline cache
D.All of the above
88. What attributes are required when using force:recordData to load a record when
the component loads?
A.recordId, mode, layoutType, fields
B.recordId, mode, and layoutType or fields
C.recordId, mode, targetRecord
D.recordId, mode, fields, targetRecord, targetError

The force:recordData tag also supports a set of target * attributes, which are
attributes that force:recordData populates itself. The target * attributes can be used to
allow access from the UI.

• targetRecord is populated with the loaded record


• targetFields is populated with the simplified view of the loaded record
• targetError is populated with any errors

89. Which tool you will use to add a Lightning Component on a Record Page?
a) Flow Builder
b) Report Builder
c) Form Builder
d) App Builder

90. A developer andrew would like to execute or run jobs sequentially. Suggest
which would be the appropriate class?

a) Queueable
b) Database.Batchable
c) Database.Stateful
d) Database.Iterable

91. Which class contains the RestRequest and RestResponse objects in RESTful
webservices?
a) Resthttp
b) RestContent
c) RestContext
d) RestContainer

92.Which access specifier you will use for a class and methods to publish them
as SOAP web-service?
a) Public, webservice
b) Public, webmethod
c) Global, webmethod
d) Global , webservices

93. To start the batch processing we have to use which of the following
method?
a) Database.StartBatch
b) Database.executeBatch
c) Database.processBatch
d) Database.runBatch
94. Select the appropriate options to fill in the blanks which should call the
client-side controller method by clicking on a button of a component

Greet.cmp
<div>
<lightning button label = “You look nice today”
Onclick=”--------------------------”
</div>
Greet.js
{
handleClick : function(cmp,event,helper)
{
alert(“Welcome”);
}
}

a) {!handleClick}
b) {!c.handleClick}
c) {c.handleClick}
d) {!chandleClick }

Ex:-
<aura:component>
<aura:attribute name="text" type="String" default="Just a string. Waiting
for change."/>
<input type="button" value="Flawed HTML Button"
onclick="alert('this will not work')"/>
<br/>
<lightning:button label="Framework Button" onclick="{!c.handleClick}"/>
<br/>
{!v.text}
</aura:component>

95. Select the form-based component from the following which can be used to
display records only.
a) lightning:recordDisplayForm
b) lightning:recordForm
c) lightning:recordEditForm
d) lightning:recordViewForm

96. Below given is the controller code for a component. Identify what is missing in the
code.
public with sharing class ExpensesController {
public static List<Expense_c> getExpenses() {
return [SELECT Id, Name, Amount_c, Client_c, Date_c,
Reimbursed_c, CreatedDate
FROM Expense_c];
}
}
a. “@”AuraEnabled annotation for getExpense() ✓
b. “@”AllowAccess annotation for getExpense()
c. “@”isTest annotation for getExpense()
d. “@”Aura annotation for getExpense()

Use the force... recordData Tag


In the last unit, we covered the nifty performance upgrades and quality-of-life
features that Lightning Data Service provides. Now let’s learn how to use them.

Remember, force:recordData doesn’t inherently include any UI elements.


The force:recordData tag is just the logic used to communicate with the server and
manage the local cache. For your users to view and modify the data fetched by LDS,
you have to include UI elements. The force:recordData tag uses the UI API to provide
data to your UI components.

When using force:recordData , load the data once and pass it to child components as
attributes. This approach reduces the number of listeners and minimizes server calls,
which improves performance and ensures that your components show consistent
data.

Loading Records
The first thing you do to make a record available for your UI components is to load it.
Load the record by including force:recordData in your component while specifying
the recordId , mode , and layoutType or fields attributes. Valid values
for layoutType are FULL and COMPACT .

ldsDisplayRecord.cmp

<aura:component implements="flexipage:availableForRecordHome, force:hasRecordId">


<!--inherit recordId attribute-->

<aura:attribute name="record" type="Object"

description="The record object to be displayed"/>


<aura:attribute name="simpleRecord" type="Object"

description="A simplified view record object to be displayed"/>

<aura:attribute name="recordError" type="String"

description="An error message bound to force:recordData"/>

<force:recordData aura:id="record"

fields="Name,BillingCity,BillingState"

recordId="{!v.recordId}"

targetError="{!v.recordError}"

targetRecord="{!v.record}"

targetFields ="{!v.simpleRecord}"

mode="VIEW"/>

Enterprise and Partner WSDLs


If you’ve sailed the straits of another SOAP-based API, you know that the Web Services
Description Language (WSDL) file is basically your map to understanding how to use the API.
It contains the bindings, protocols, and objects to make API calls.

Salesforce provides two SOAP API WSDLs for two different use cases. The enterprise WSDL is
optimized for a single Salesforce org. It’s strongly typed, and it reflects your org’s specific
configuration, meaning that two enterprise WSDL files generated from two different orgs
contain different information.

The partner WSDL is optimized for use with many Salesforce orgs. It’s loosely typed,
and it doesn’t change based on an org’s specific configuration. Typically, if you’re
writing an integration for a single Salesforce org, use the enterprise WSDL. For
several orgs, use the partner WSDL.

For this unit, we’re using the enterprise WSDL to explore SOAP API. The first step is
to generate a WSDL file for your org. In your Trailhead Playground, from Setup, enter
API in the Quick Find box, then select API. On the API WSDL page, click Generate
Enterprise WSDL.
On the Generate Enterprise WSDL page, click Generate. When the WSDL is
generated, right-click on the page and save the WSDL file somewhere on your
computer. We’ll be using it shortly.

Here’s a tip for working with the enterprise WSDL. The enterprise WSDL reflects your
org’s specific configuration, so whenever you make a metadata change to your org,
regenerate the WSDL file. This way, the WSDL file doesn’t fall out of sync with your
org’s configuration.

ENDD---------------------------------------------------------------------------------------------------
1) True or false: OAuth 2.0 APIs enable a user to work in one app but see the data from

another.

a) True
b) False

2) You're creating a connected app that allows a Smart TV to display a customer's movie order history.
Which OAuth 2.0 flow would you use for the connected app?

a) OAuth 2.0 web server flow

b) OAuth 2.0 device flow

c) OAuth 20 JSON Web Token Exchange (JWT) bearer flow


d) OAuth 2.0 user agent flow

3) What is a key benefits of asynchronous processing?

a) Higher governor and execution limits

b) Unlimited number of external callouts

c) Override organization-wide sharing defaults


d) Enabling turbo mode for transactional processing

4) Batch Apex is typically the best type of asynchronous processing when you want to:
a) Make a callout to a web service when a user updates a record

b) Schedule a task to run on a weekly basis


c) Update all records in your org

d) Send a rickroll email to a contact

5) Which tools are included with the Salesforce Flow product?


a) Lightning Experience and Flow Builder
b) Lightning App Builder and Process Builder

c) Flow Builder and Process Builder

d) Flow Builder, Process Builder and Approvals

6) Which declarative tool would you use for the following use case? Guide customers

through the process of troubleshooting issues with your product

a) Flow Builder

b) Approvals
c) Apex

7) Which declarative tool would you use for the following use case? When an opportunity's discount is
higher than 40%, notify the CEO via email and request sign-off. Provide a way for the CEO to leave
comments.

a) Flow Builder

b) Approvals

c) Apex

8) Which declarative tool would you use for the following use case? When the Annual Revenue field
exceeds $500,000 on an account, automatically update the Customer

Priority field to High.

a) Flow Builder
b) Approvals

c) Apex

9) What does SLDS stand for?


a) Salesforce Leadership Does Surf

b) System Limits Detection System


c) Salesforce Lightning Design System

d) sObject Loading Data System

10) What are Lightning Events used for?


a) Salesforce mini developer conferences

b) Communicating between loosely coupled components

c) Logging critical details during app runtime


d) Scheduling sales calls in Lightning Experience

11) What is the name of the framework that includes Aura components?

a) Lightning Components

b) Angular
c) jQuery

d) WebObjects

12) In which language do you write Aura components action handlers?


a) Java

b) VisualForce
c) JavaScript
d) Objective-C

13) Which of the following descriptions about the Lightning Component framework is true?

a) It's a UI framework for developing web apps for mobile and desktop devices.

b) It uses JavaScript on the client-side and Apex on the server-side.

c) It's a modern framework for building single-page applications


d) All of the above

14) What can you build with the Lightning Component framework?

a) Standalone app
b) Components to use inside Visualforce pages

c) Drag-and-drop components for Lightning App Builder


d) All of the above

15) How is the Lightning Component framework different from other web app frameworks?
a) It is optimized for both mobile and desktop experiences and proves it with

Salesforce 1 and Lightning Experience

b) It connects natively with services provided by the Salesforce platform

c) It has specific opinions about how data access is performed and has specific

security requirements
d) All of the above

16) What is Lightning data service?

a) A set of Ul elements that displays record data


b) A subset of Visualforce

c) Lightning's data layer


d) A cloud-based storage and hosting service

17) What are the benefits of adopting LDS?

a) Fewer XHRS
b) Shared record data across components

c) Local offline cache

d) All the above

18) What attributes are required when using force record Data to load a record when the

component loads?
a) recordid, mode, layout Type, fields

b) recordid, mode, and layout Type or fleits

c) recordid, mode, targetRecord

d) recordid, mode, felds, targetRecord targetEmor

19) Which of the following is NOT an advantage of data replication over data proxies?
a) A replicated data set offloads processing and requests from an origin data

server

b) A replicated data set is always and immediately in sync with the origin

data
c) A replicated data set reduces data access latency d) A replicated data set supports bidirectional
writes..

20) You can use Salesforce Connect to proxy which types of data sources:

a) OData 2.0 and 4.0


b) REST with JSON payloads

c) REST with XML payloads


d) SOAP
e) All of the above

21) Which technology do Salesforce REST APIs use for authentication?

a) Pre-shared keys
b) Basic usernames and passwords

c) OAuth

d) SAML

22) Callouts from Salesforce to Heroku can be made using:

a) Web sockets

b) Apex triggers or outbound messages

c) Message bus
d) Corba

23) The API-first approach to development at salesforce lets customers:


a) Extend functionality across Salesforce features
b) Choose the API that's best suited to their needs
c) Build apps for the AppExchange
d) All of the above

24) REST API is best suited for which of these use cases?

a) Loading lots of data into your org for the first time
b) Writing a mobile or web app

c) Deleting 100,000 records at once

d) Pushing notifications whenever data is changed

25) SOAP API is best suited for which of these use cases?

a) Building a server-to-server integration

b) Writing an app that requires using JSON

c) Updating thousands of records at once

d) Building a slick UI for a mobile app

26) Bulk API is best suited for which of these use cases?

a) Deleting several records, one record at a time


b) Writing a mobile chat app

c) Building a new Salesforce UI

d) Deleting 100,000 records at once

27) Streaming API is best suited for which of these use cases?
a) Notifying users whenever a record is deleted
b) Creating hundreds of account records at once
c) Writing an app where the use of XML is required

d) Using a WSDL file to specify the operations allowed on standard and custom
objects

28) What are all the factors that contribute to the total API limit calculation?
a) Org edition and API usage over the previous month

b) Org edition, license type, and expansion packs


c) License type and expansion packs

d) Number of Salesforce employees swabbing the deck

29) You can use Heroku connect for:

a) One-way data replication


b) Bidirectional data replication
c) Data proxy with Salesforce Connect
d) All the above

30) How does Heroku Connect work with Salesforce Authentication?

a) A single integration user's credentials are stored.

b) OAuth provides Heroku Connect with API tokens after the user authorizes the

Heroku Connect application on Salesforce

c) SAML authorizes Heroku Connect to make API calls.

d) The end user of a Heroku app authorizes Heroku Connect via OAuth.
31) Heroku Connect data replication happens:

a) Instantly in both directions

b) Near real time in both directions

c) Near real time for writes to Salesforce, and on a 30-second polling window for
writes to Heroku Postgres

d) Near real time for writes to Salesforce, and either on a polling window or near

real time for writes to Heroku Postgres (depending on the user configuration)

32) Salesforce Connect is used for:


a) Developing ETL services

b) Replicating external data into Salesforce

c) Proxying external data into Salesforce


d) Bidirectional syncing of external data in Salesforce

33) Salesforce Connect custom adapters support:

a) Cross-object relationships

b) Data paging
c) Search
d) All of the above

34) Which of the following is NOT an advantage of Salesforce Connect over ETL?

a) The data is always fetched on demand.

b) If the origin is offline, the data is still available via Salesforce Connect
c) Standard protocols like OData can easily proxy external data into Salesforce.

d) Data security can be enforced using per-user or per-application authentication

35) True or false: You can integrate identity providers with Salesforce using connected apps.

a) True
b) False

36) How is OpenID Connect different from SAML a) You can't use Openld Connect to enable SSO
between two services

b) You can only use Openld Connect to enable SSO between two services.
c) Openld Connect is built for today's API economy because it adds an authentication layer on top of
OAuth 20
d) B and C

37) Which of the following scenarios describes how you can use a connected app?

a) Users can create their own connected apps to access their personal email
accounts.
b) Users can log in to an external application with their Salesforce or Experience
Cloud credentials
c) Users can authorize a mobile app to securely access defined Salesforce data on
their behalf.
d) B and C

38) What's the difference between a connected app developer and a connected app admin?
a) Only developers can set policies that explicitly define who can use connected
apps and where they can access the apps from...
b) Only admins can set policies that explicitly define who can use connected apps
and where they can access the apps from
c) There isn't a difference between developers and admins when it comes connected apps I
to
d) Only developers use connected apps. Admins have no role with connected apps

39) What type of jobs do not show up in the Apex Flex Queue.

a) Future Method Jobs


b) Batch Apex Jobs
c) Queueable Apex Jobs
d) Scheduled Apex Jobs

40) Which statement is true regarding the Flex Queue

a) You can submit up to 200 batch jobs for execution.

b) Jobs are processed first-in-first-out.

c) Jobs can only be scheduled during Taco Tuesdays

d) Jobs are executed depending upon user license.

41) True or false: Dynamic client registration enables resource servers to dynamically create
client apps as connected apps.

a) True
b) False

42) What role does your Salesforce org play in providing authorization for external API

gateways?
a) My Salesforce org requests the creation of client apps as connected apps from

the external API gateway.


b) My Salesforce org hosts the protected data
c) My Salesforce org is the OAuth authorization server that protects resources
hosted on an external API.
d) My Salesforce org asks the external API gateway to authenticate a client app

43) Which of the following ISV features are available in Lightning Experience?

a) Trialforce
b) Usage Metrics Visualization app.
c) Package creation.
d) None of the above are available.

44) As an ISV, which of the following is true about AppExchange:

a) Your apps undergo a review for Lightning Experience readiness.


b) Your apps are available to all customers, whether they have enabled Lightning
Experience or not.
c) The 'Lighting Ready' sash lets AppExchange visitors know your app is verified forLighting Experience

d) All of the above

45) Which of the following is true of Apex in the new Lightning Experience:

a) You have to update the API version for all your Apex classes in order for them to

work in Lightning Experience.

b) Apex is not supported in the new Lightning Experience.


c) Your Apex code and queries continue to function as before.
d) All of the above

46) What should you look for when reviewing your installed packages before using them with

Lightning Experience?

a) A 'Lightning Ready' sash for the package on AppExchange.


b) An error message saying the package isn't 'Lightning Ready'.

c) A 'Lightning Ready' check mark on the Installed Packages page.

d) Errors in the JavaScript console when using the package.

47) The primary benefit of a workflow outbound message over an Apex trigger is:

a) The message can deliver the payload only as SOAP.


b) The message supports different authentication mechanisms
c) Messages are completely declarative.

d) The message can handle every database event.

48) Callouts in Apex trigger support which authentication mechanisms:

a) Pre-shared keys I
b) Username and password credentials
c) OAuth flows using named credentials in the Remote Site settings

d) All of the above

49) Heroku apps that handle callouts from Salesforce can be written in:

a) Node js/ JavaScript

b) Java, Scala, Clojure

c) Python

d) PHP

e) All of the above

50) Canvas apps can authenticate a user with:


a) Username and password

b) OAuth

c) Signed request
d) Either OAuth or signed request

51) You can build Canvas apps and run them on Heroku with of the following languages:

a) Node.js / JavaScript

b) Java, Scala, Clojure

c) Python

đ) PHP

e) All of the above

52) The best use of Canvas apps is to:


a) Display real estate photos in Salesforce for house listings

b) Render custom widgets on Chatter feeds

c) Display third-party apps in Salesforce

d) All of the above

53) Which of the following statements about Lightning Components and Lightning
Experience is true?
a) Lightning Experience is something you use directly, Lightning Components are
something you build apps with.
b) Lightning Experience is (mostly) built with Lightning Components.
c) Lightning Experience uses an app-centric development model using Lightning
Components.

d) All of the above

54) Which of the following is true of Aura Components:

a) Aura Components can only be used in the Lightning Experience and not the Salesforce mobile app

b) Aura Components can be used in Visualforce pages


c) Aura Components are only optimized for the desktop experience

d) All of the above

55) Applications on Heroku that use Salesforce REST APIs can use which authentication
mechanisms.
a) Anonymous access without credentials on trusted networks
b) Username and password with an OAuth connected app
c) OAuth web or user-agent flow in which the user authorizes a connected app
using browser redirects
d) B and C
e) A and C

56) You can use the Salesforce REST APIs to:


a) Insert or update records
b) Execute processes as another user
c) Access database log files
d) Feed your kitten

57) Streaming API's push paradigm lets you:


a) Create more records in a single API call
b) Use SOSL to listen for event notifications
c) Avoid making unnecessary API requests by listening for notifications rather than
polling for data

d) Write code from the crow's nest of a pirate ship

58) What is the second generation of Push Topic events?

a) Platform events
b) Generic streaming events
c) Change data capture events
d) The event bus

59) Which replay option specifies that the subscriber receives event notifications with replay IDs 6, 7, 8,
and 9?
a) 6
b) 5
c) -2
d) -1

60) Which of the following SOQL query a valid pushtopic query? SELECT Name, Phone

FROM Contact WHERE MailingCity="Indianapolis'


a) WHERE clauses aren't supported for Push Topics
b) The SELECT statement doesn't include an ID
c) Contact isn't a supported object for push Topic queries

d) The query is valid

61) What channel name corresponds to a platform event that you defined with the label of

solar panel event?

a) /event/Solar_panel_Event
b) /topic/Solar_panel_Event
c) /event/Solar_panel_Event C

d) /event/Solar panel Event

e) /event/Solar_ panel_Event_e

62) How do you broadcast a message with generic streaming?


a) Create a generic streaming channel, and then POST a request to
StreamingChannel/<streaming channel ID>/push

b) Create a Push Topic, and then POST a request to /Push Topic/<PushTopic/d>push c) POST a request to
/PushTopic/Push

d) POST a request to /StreamingChannel/push

63) Which of the following features of Visualforce do NOT work in Lightning Experience?

a) Creating custom apps and tabs


b) Overriding standard actions with Visualforce pages

c) Using window location in JavaScript code


d) Remote Objects

64) Which of the following is NOT true about the user interface and visual design in

Lightning Experience:

a) PDFs render with the Lightning Experience visual design


b) You can't hide the Lightning Experience main navigation header or sidebar
c) The <apex:inputField> tag renders with the Salesforce Classic appearance

d) The Standard Visualforce header and sidebar are hidden

Which of the following statements is true about creating apps with visualforce:
a) Visualforce is designed primarily for page-centric web apps.
b) Visualforce renders the page on the server.

c) Visualforce will be fully supported by Salesforce for years to come.


d) All of the above

66) Which of the following statements is NOT true about creating apps with Lightning

components:

a) Lightning components are designed primarily for app-centric web apps.

b) Lightning components can be used everywhere Visualforce can be used.

c) Lightning components render the page on the client.


d) All of the above

67) Which of the following is a poor use of Lightning Components:


a) Developing an app for Salesforce1.

b) Developing a highly interactive app with an innovative user interface.


c) Developing widgets for use in Lightning App Builder.
d) None of the above. All of these are good use cases for Lightning Components.

68) Which attribute of force:recordData is set to a localized error message if an error occurs

on loading a component?

a) targetFields
b) targetError

c) Error

d) fieldsError
69) My Domain is NOT required at the very beginning to develop with Lightning Components?

a) True

b) False

70) Which tool you will use to add a lightning component on a record page?

a) Flow Builder b) Report Builder

c) Form Builder
d) App Builder

71) Select the inappropriate reason from the following to integrate apps on Heroku with salesforce:

a) Data replication

b) Data proxies

c) Data Security
d) Custom user interfaces

72) Which are two types of SOAP API WSDLS provided by Salesforce? (Select 2)

a) Company WSDL
b) Enterprise WSDL

c) Partner WSDL
d) Person WSDL

73) SOAP web services are commonly used for:

a) Simple, light weight services that are typically stateless.


b) Public APIs that use HTTP and JSON.
c) Enterprise apps that require a formal exchange format or stateful operations.
d) No one uses SOAP any longer

74) Which type of app enables an external application to integrate with Salesforce using API

and standard protocols? a) Salesforce app

b) Service app

c) Connected app

d) External app

75) Which of the following statements is true about external gellouts: a) SOAP callouts use xml and may
use a wsdl for code generation.

b) HTTP callouts typically use JSON but can use XML as well.

c) HTTP callouts are generally easier to work with than SOAP callouts,

d) All of the above

76) A developer, Andrew would like to execute or run jobs sequentially. Suggest which would

be the appropriate class?

a) Queueable

b) Database Batchable

c) Database Stateful d) Database.Iterable

77) A developer would like to bypass the total number of records retrieved by SOQL queries in the start
method. Which class object you would suggest to use?

a) Database.QueryLocator
b) Iterable

c) Database QueryRecords
d) Database.Iterable

78) A developer want to send JSON data through a POST request in the web service. Which

request header should be set to JSON?

a) Data-Type
b) Endpoint

c) Content-Type

d) body

79) Identify the invalid trigger event from the following

a) Before undelete
b) After insert

c) Before update
d) After delete

80) Which annotation you will use to declare a method as test method?

a) "@isTest”

b) "@future

c) "@Rest
d) "@TestMethod"

81) Which class contains the RestRequest and RestResponse objects in RESTful
webservice?

a) RestHttp

b) RestContent
c) RestContext

d) RestContainer

82) Which of the following attribute is used to map the URL pattern to RestResource annotation?

a) urlPattern

b) urlText

c) uriMap

d) urlMapping
83) How many maximum number of Apex jobs we could schedule at one time?

a) 50
b) 100

c) 150

d) 200

84) Identify the correct apex class which allows to submit jobs for asynchronous processing

with member variables of Non-primitive types?

a) AsyncApex
b) Stateful
c) Batchable

d) Queueable

85) Select the second generation of event products related to streaming API. (Select 2)

a) Change Data Capture


b) PushTopic Events

c) Generic Streaming Events

d) Platform Events

86) A Developer, Brian, would like to create an optimized WSLD for use with many salesforce org. Which
type of WSDL should he create?
a) Company WSDL
b) Person WSDL
c) Enterprise WSDL
d) Partner WSDL

87) Identify the correct the attribute of force:recordData component which determines what operations
are available to perform with the record

a) Mode
b) recordID
c) Fields
d) LayoutType

88) Identify the invalid HTTP method from the following

a) UNDELETE

b) GET
c) POST
d) DELETE
e) PUT

89) A developer called a web service from an apex code. Which response status code she should check
to ensure that the request is successful?

a) 500

b) 404
c) 201
d) 200

90) A developer is loading a record from the database using force recordData component. Which
attribute is populated with the loaded record?

a) tagetFields
b) targetRecord

c) targetError

d) targetRow

91) What should be the minimum code coverage % before deploying an apex code?

a) 71
b) 73
c) 75

d) 72

92) Select the inappropriate method from the following which informs the runtime that mock

callouts are used in the test method


a) Test.runAs

b) Test setMock

c) Test Mock

d) Test startTest

93) To make a Lightning component available for any type of page, it must implement which interface?

a) flexipage:availableForAllPageTypes
b) flexipage availableForPageTypes

c) flexipage:availableForAllTypes

d) flexipage:ForAllPageTypes

94) Which annotation will be used to expose an apex class as REST resource?

a) “@”RestResource

b) "@"ResourceRest

c) "@HttpResource

d) "@"RestHttp

95) Which method causes the entire set of operations to be rolled back?
a) error()

b) showError()
c) isError()
d) addError()

96) To get a fresh set of governor limits in an apex test class, which method shall be used?

a) Test.runAs
b) Test.setMock
c) Test.startTest and Test stop Test

d) Test.assert

97) A developer like to monitor the progress of future jobs. Suggest the correct way.
a) From setup, select Apex Jobs

b) Query Cron Trigger to find future job

c) Query AsyncApexJob to find future job


d) Query CronJobDetail to find future job

98) Below given is the controller code for a component. Identify what is missing in the code. Public with
sharing class ExpensesController( Public static List<Expense c> getExpenses(){

Return (SELECT Id, Name, Amount c, Client c, Date _c, Reimbursed c, CreatedDate

FROM Expenses c);

a) @AuraEnabled annotation for getExpense()

b) AllowAccess annotation for getExpense())


c) @isTest annotation for getExpense() d) '@'Aura annotation for getExpense()

99) A component has an attribute message. Select the appropriate statement to set the value of
message from client-controller method with newMessage. handleClick2
function(component,event,helper){

var newMessage = event.getSource().get("v.label");


console.log("handleClick2 Message:+newMessage);

//Add correct statement below

a) component set("message",newMessage);

b) component.set("(!v.message)" newMessage);
c) component.set("v.message" newMessage);

d) component.get("v.message",newMessage);

100) A Developer, Amy, would like to create an optimized WSLD for a single salesforce

org. Which type of WSDL should she create?

e) Company WSDL

1) Person WSDL
g) Enterprise WSDL

h) Partner WSDL
101) A Lightning component developer want to fetch data of a custom object Review_c from database
and want to display on a component. What type of controller should be used?

a) Standard List Controller

b) Extension Controller
c) Client-side Controller with Server-side Controller
d) Standard Controller

102) Identify the correct trigger variable which shows the currently executing code

in apex trigger.

a) isinsert
b) isExecuting
c) isAfter

d) isDelete

104) Which of following API is based on REST principles and is optimized for working with

larger sets of data?

a) Bulk Api
b) SOAP Api

c) Streaming Api

d) None of the above

105) To start the batch processing, we have to use which of the following method?

a) Database

b) Database.executeBatch

c) Database

d) Database

106) Which of the following annotation you will add to your method to expose it as a REST Resource
that can be called by an HTTP GET request? I

a) "@HttpPost

b)”@” HttpGet
c) "@HttpPut

d) "@HttpDelete
107) Which of the following is NOT the use of future methods?
a) Callout to external Web Services

b) Isolating DML operations on different sObject types prevent mixed DML error
c) Override organization-wide sharing defaults

d) Resource intensive calculation or processing of records

108) Which are three methods of Heroku and Salesforce Integration? (Select

a) Heroku Connect
b) Salesforce SOAP APIs.
c) Salesforce REST APIs
d) Callouts.
E)Canvas

109) Suggest an attribute to a developer to declare that the component handles the event

after changes in the record


a) recordEdited

b) recordData

c) recordUpdated

d) recordChanges

110) Below given is the controller code for a component. How would a component use this controller?
Select the appropriate option. Public with sharing class ExpenseController{

//Some code here...


a) <aura:component standardController='ExpenseController'>

b) <aura.component controller="ExpenseController'>
c) <aura:component implements=’ ExpenseController'>

d) <aura:component class='ExpenseController>

111) Select the benefit of Apex Unit tests


a) Ensuring the apex classes and triggers work as expected

b) Meeting the code coverage requirements

c) High quality apps delivered to the production org


d)All of the above

112) State TRUE or FALSE.


By default the org data is accessible in test methods.
a) True
b) False

113)Question don't know

a) Place the callout method in an asynchronous method that is annotated with

@future(callout=true)
b) Place the callout method in an asynchronous method that is annotated with

@future

c) Place the callout method in an asynchronous method that is annotated with @HttpGet(callout=true)

d) Place the callout method in an asynchronous method that is annotated with @HttpPost(callout=true)
SFDC TRAILHEAD QUIZ+Extra Questions

Q.1 which method causes the entire set of operations to be rolled back
a)error()
b)showError()
c)isError()
d)addError()
Q.2 Which Method you will use to declare a method as test method?
a)’@isTest’
b) ’@future’
c) ’@Rest’
d) ’@TestMethod’
Q.3 A developer would like to bypass the total number of records retrieved by SOQL
queries in the start Method.Which class object you would suggest to use?
a)Database.QueryLocator
b)Iteratable
c) Database.QueryRecords
d) Database.Iterable
Q.4 select three different flavours of asynchronous apex ?
a)Batch Apex
b)Future Method
c) Background Queueable
d)Scheduled Apex
Q.5 A developer like to Monitor the progress of future jobs. Suggest the correct way.
a)From Setup ,select Apex Jobs
b) Query ConTrigger to find future job
c) Query AsyncApexJob to find future job
d) Query ConJobDetail to find future job
Q.6 Which Annotation will be used to expose an Apex class as Rest resource?
a) ‘@’RestResource
b) ‘@’ResourceRest
c) ‘@’HttpResource
d) ‘@’RestHttp
Q.7 When making a callout from a method ,the method waits for external service to send
back the callout response. A developer does not want this behaviour. Suggest the
appropriate solution.
a) Place the callout method in an asynchronous method that is annotated with
@future(callout=true)
b) Place the callout method in an asynchronous method that is annotated with
@future.
c) Place the callout method in an asynchronous method that is annotated with
@HttpGet(callout=true).
d) Place the callout method in an asynchronous method that is annotated with
@HttpPost(callout=true).

When making a callout from a method, the method waits for the external service to send
back the callout response before executing subsequent lines of code. Alternatively, you can
place the callout code in an asynchronous method that’s annotated
with @future(callout=true) or use Queueable Apex. This way, the callout runs on a separate
thread, and the execution of the calling method isn’t blocked.

Q.8 select the second generation of event products related to streaming API (select 2)
a) Change Data Capture
b) Push Topic Events
c)Generic streaming events
d)Platform events

Q.9 Which are the three methods of Heroku and Salesforce Integration(Select 3)
a) Heroku Connect
b) Salesforce SOAP API’S
c) Callout
d) Canvas

Q.10 A developer is loading a record from the database using force:recordData


component. Which attribute is populated with the loaded record?
a) targetFields
b) targetRecord
c) targetError
d) targetRow

Q.11 Which of the following statement is true about external callouts:


a) SOAP callouts use XML and may use a WSDL for code generation.
b) HTTP Callouts typically use JSON but can use XML as well.
c) HTTP Callouts are generally easier to work with than SOAP callouts.
d) All of the Above

Q.12 What type of jobs do not show up in the Apex Flex Queue?
a) Future Method Jobs
b) Batch Apex Jobs
c) Queueable Apex Jobs
d) Scheduled Apex Jobs

Q.13 True and False.


By default the org data is accessible in test methods
a) TRUE
b) FALSE

Q. 14 Identify the invalid trigger event from the following.


• Before undelete
• After insert
• Before update
• After delete

Q.15 A component has an attribute message . Select line appropriate statement to set
the value of message from client-controller method with newMessage.

handleClick2: function(component,event,helper){
var newMessage = event.getSource().get(“v.label”);
console.log(“handleClick2: Message:” + newMessage);
// Add correct statement below
---------------------------------------
}

a) component.set(“message”,newMessage);
b) component.set(“{v.message}”,newMessage);
c) component.set(“v.message”,newMessage);
d) component.get(“v.message”,newMessage);

Q.16 Suggest an attribute to a developer to declare that the component handles the
event after changes in the record.
a) recordEdited
b) recordData
c) recordUpdated
d) recordChanged
Q.17 Which attributes of force:recordData is set to localized error message if an error
occurs on loading a component?
a) targetFields
b) targetError
c) error
d) fieldsError

Q.18 True and False


Methods with the future annotation must be static methods and can only return a void
type.
a) True
b) False

Q.19 When we start batch apex , which record is created?


a) AsyncJob
b) AsyncApexBatch
c) AsyncApexJob
d) SyncApexJob

Q.20 A developer called a web services from an apex code which response status code
she should check to ensure that the request is successful?
a) 500
b) 404
c) 201
d) 200

When the server processes the request, it sends a status code in the response. The status
code indicates whether the request was processed successfully or whether errors were
encountered. If the request is successful, the server sends a status code of 200. You’ve
probably seen some other status codes, such as 404 for file not found or 500 for an internal
server error.

Q.21 Identify the invalid HTTP method from the following


a) UNDELETE
b) GET
c) POST
d) DELETE
e) PUT

Q.22 A lightning component developer want to fetch data of a custom object


Review__c from database and want to display on a component. What type of controller
should be used?
a) Standard List Controller
b) Extension Controller
c) Client-Side controller with Server-Side Controller
d) Standard Controller

Q.23 Select the inappropriate reason from the following to integrate apps on Heroku
with salesforce:
a) Data Replication
b) Data Proxies
c) Data Security
d) Custom User Interface

Q.24 Consider the following code. Select appropriate statement to print the value of
message
attribute.
<aura:component>
<aura:attribute name=”message” type=”String”/>
<p>Hello! --------------------</p>
</aura:component>

a. {v.message}
b. {! message}
c. {message}
d. {!v.message}

Q.25 Which of the following annotation you will add to your method to expose it as a
REST resource that can be called by an HTTP GET request?
a.) “@”HttpPost
b.)“@”HttpGet
c.) “@”HttpPut
d. )“@”HttpDelete

Q.26 Which Context variable provides a list of sObjects which we can use only in insert
,update and delete trigger?
a) old
b) oldMap
c) new
d) newMap

27.The API-first approach to development at Salesforce lets customers:


A.Extend functionality across Salesforce features
B.Choose the API that's best suited to their needs
C.Build apps for the AppExchange
D.All of the above
28.REST API is best suited for which of these use cases?
A.Loading lots of data into your org for the first time
B.Writing a mobile or web app
C.Deleting 100,000 records at once
D.Pushing notifications whenever data is changed
29.SOAP API is best suited for which of these use cases?
A.Building a server-to-server integration
B.Writing an app that requires using JSON
C.Updating thousands of records at once
D.Building a slick UI for a mobile app
30.Bulk API is best suited for which of these use cases?
A.Deleting several records, one record at a time
B.Writing a mobile chat app
C.Building a new Salesforce UI
D.Deleting 100,000 records at once
31.Streaming API is best suited for which of these use cases?
A.Notifying users whenever a record is deleted
B.Creating hundreds of account records at once
C.Writing an app where the use of XML is required
D.Using a WSDL file to specify the operations allowed on standard and custom objects
32. What are all the factors that contribute to the total API limit calculation?
A.Org edition and API usage over the previous month
B.Org edition, license type, and expansion packs
C.License type and expansion packs
D.Number of Salesforce employees swabbing the deck

HTTP METHODS FOR REST API


HTTP methods (HEAD, GET, POST, PATCH, DELETE)
A REST request consists of four components: a resource URI, an HTTP method, request
headers, and a request body.

Request headers specify metadata for the request. The request body specifies data for the
request, when necessary. If there’s no data to specify, the body is omitted from the request.

• GET—The HTTP method used for this API call.


• {{_endpoint}}—The place where the request will take place. In this case,
you added the URL of your Trailhead Playground to the _endpoint field
in the variables to connect to Salesforce.
• /services/data—Specifies that you’re making a REST API request.
• /v {{version}}—The API version number. The double curly quotes
indicate that this can be set as a variable.
• /sobjects—Specifies that you’re accessing a resource under the sObject
grouping.
• /:SOBJECT_API_Name—The sObject being actioned; in this case,
Account.
• /describe—An action; in this case, a Describe request.
• 33. Streaming API's push paradigm lets you:
• A.Create more records in a single API call
• B.Use SOSL to listen for event notifications
• C.Avoid making unnecessary API requests by listening for notifications rather
than polling for data
• D.Write code from the crow's nest of a pirate ship
• 34. What is the second generation of PushTopic events?
• A.Platform events
• B.Generic streaming events
• C.Change data capture events
• D.The event bus
• 35. Which replay option specifies that the subscriber receives event notifications
with replay IDs 6, 7, 8, and 9?
• A.6
• B.5
• C.-2
• D.-1
Streaming API lets you push real-time notifications to clients using the publish-subscribe
model.

36. Which of the following scenarios describes how you can use a connected app?
A.Users can create their own connected apps to access their personal email accounts.
B.Users can log in to an external application with their Salesforce or Experience Cloud
credentials.
C.Users can authorize a mobile app to securely access defined Salesforce data on their
behalf.
D.B and C
37. What's the difference between a connected app developer and a connected app
admin?
A.Only developers can set policies that explicitly define who can use connected apps and
where they can access the apps from.
B.Only admins can set policies that explicitly define who can use connected apps and
where they can access the apps from.
C.There isn't a difference between developers and admins when it comes to connected
apps.
D.Only developers use connected apps. Admins have no role with connected apps.

38. True or false: OAuth 2.0 APIs enable a user to work in one app but see the data
from another.
A.True
B.False
39. You're creating a connected app that allows a Smart TV to display a customer's
movie order history. Which OAuth 2.0 flow would you use for the connected app?
A.OAuth 2.0 web server flow
B.OAuth 2.0 device flow
C.OAuth 2.0 JSON Web Token Exchange (JWT) bearer flow
D.OAuth 2.0 user-agent flow

Using OpenID Connect dynamic client registration, resource servers can dynamically create
client apps as connected apps in Salesforce -- TRUE
When Salesforce acts as your identity provider, you can use a connected app to integrate
your service provider with your org. – FALSE

40. True or false: You can integrate identity providers with Salesforce using connected
apps.
A.True
B.False
41. How is OpenID Connect different from SAML?
A.You can't use OpenID Connect to enable SSO between two services.
B.You can only use OpenID Connect to enable SSO between two services.
C.OpenID Connect is built for today's API economy because it adds an authentication
layer on top of OAuth 2.0.
D.B and C

42. True or false: Dynamic client registration enables resource servers to dynamically
create client apps as connected apps.
A.True
B.False
43. What role does your Salesforce org play in providing authorization for external API
gateways?
A.My Salesforce org requests the creation of client apps as connected apps from the
external API gateway.
B.My Salesforce org hosts the protected data.
C.My Salesforce org is the OAuth authorization server that protects resources hosted on
an external API gateway.
D.My Salesforce org asks the external API gateway to authenticate a client app.
44. Which of the following is NOT an advantage of data replication over data proxies?
A.A replicated data set offloads processing and requests from an origin data server.
B.A replicated data set is always and immediately in sync with the origin data.
C.A replicated data set reduces data access latency.
D.A replicated data set supports bidirectional writes.
45. You can use Salesforce Connect to proxy which types of data sources:
A.OData 2.0 and 4.0
B.REST with JSON payloads
C.REST with XML payloads
D.SOAP
E.All of the above
46. Which technology do Salesforce REST APIs use for authentication?
A.Pre-shared keys
B.Basic usernames and passwords
C.OAuth
D.SAML
47. Callouts from Salesforce to Heroku can be made using:
A.Web sockets
B.Apex triggers or outbound messages
C.Message bus
D.Corba

48. You can use Heroku Connect for:


A.One-way data replication
B.Bidirectional data replication
C.Data proxy with Salesforce Connect
D.All of the above
49. How does Heroku Connect work with Salesforce authentication?
A.A single integration user's credentials are stored.
B.OAuth provides Heroku Connect with API tokens after the user authorizes the Heroku
Connect application on Salesforce.
C.SAML authorizes Heroku Connect to make API calls.
D.The end user of a Heroku app authorizes Heroku Connect via OAuth.
50. Heroku Connect data replication happens:
A.Instantly in both directions
B.Near real time in both directions
C.Near real time for writes to Salesforce, and on a 30-second polling window for writes
to Heroku Postgres
D.Near real time for writes to Salesforce, and either on a polling window or near real time
for writes to Heroku Postgres (depending on the user configuration)

51. Salesforce Connect is used for:


A.Developing ETL services
B.Replicating external data into Salesforce
C.Proxying external data into Salesforce
D.Bidirectional syncing of external data in Salesforce
52. Salesforce Connect custom adapters support:
A.Cross-object relationships
B.Data paging
C.Search
D.All of the above
53. Which of the following is NOT an advantage of Salesforce Connect over ETL?
A.The data is always fetched on demand.
B.If the origin is offline, the data is still available via Salesforce Connect.
C.Standard protocols like OData can easily proxy external data into Salesforce.
D.Data security can be enforced using per-user or per-application authentication.
54. Applications on Heroku that use Salesforce REST APIs can use which
authentication mechanisms:
A.Anonymous access without credentials on trusted networks
B.Username and password with an OAuth connected app
C.OAuth web or user-agent flow in which the user authorizes a connected app using
browser redirects
D.B and C
E.A and C
55. You can use the Salesforce REST APIs to:
A.Insert or update records
B.Execute processes as another user
C.Access database log files
D.Feed your kitten

56. The primary benefit of a workflow outbound message over an Apex trigger is:
A.The message can deliver the payload only as SOAP.
B.The message supports different authentication mechanisms.
C.Messages are completely declarative.
D.The message can handle every database event.
57. Callouts in Apex trigger support which authentication mechanisms:
A.Pre-shared keys
B.Username and password credentials
C.OAuth flows using named credentials in the Remote Site settings
D.All of the above

58. Heroku apps that handle callouts from Salesforce can be written in:
A.Node.js / JavaScript
B.Java, Scala, Clojure
C.Python
D.PHP
E.All of the above

59. Canvas apps can authenticate a user with:


A.Username and password
B.OAuth
C.Signed request
D.Either OAuth or signed request
60. You can build Canvas apps and run them on Heroku with of the following
languages:
A.Node.js / JavaScript
B.Java, Scala, Clojure
C.Python
D.PHP
E.All of the above
61. The best use of Canvas apps is to:
A.Display real estate photos in Salesforce for house listings
B.Render custom widgets on Chatter feeds
C.Display third-party apps in Salesforce
D.All of the above

Valid Trigger event

• before insert
• before update
• before delete
• after insert
• after update
• after delete
• after undelete

Invalid Trigger Event → Before undelete

• Before triggers are used to update or validate record values before they’re
saved to the database.
• After triggers are used to access field values that are set by the system (such
as a record's Id or LastModifiedDate field), and to affect changes in other
• records. The records that fire the after trigger are read-only.
62. What is a key benefit of asynchronous processing?
A.Higher governor and execution limits
B.Unlimited number of external callouts
C.Override organization-wide sharing defaults
D.Enabling turbo mode for transactional processing
63. Batch Apex is typically the best type of asynchronous processing when you want to:
A.Make a callout to a web service when a user updates a record.
B.Schedule a task to run on a weekly basis.
C.Update all records in your org.
D.Send a rickroll email to a contact.

Future Apex
Future methods are typically used for:

• Callouts to external Web services. If you are making callouts from a trigger or after
performing a DML operation, you must use a future or queueable method. A callout
in a trigger would hold the database connection open for the lifetime of the callout
and that is a "no-no" in a multitenant environment.
• Operations you want to run in their own thread, when time permits such as some sort
of resource-intensive calculation or processing of records.
• Isolating DML operations on different sObject types to prevent the mixed DML error.
This is somewhat of an edge-case but you may occasionally run across this issue.
See sObjects That Cannot Be Used Together in DML Operations for more details.

Future Method Syntax


Future methods must be static methods, and can only return a void type. The
specified parameters must be primitive data types, arrays of primitive data types, or
collections of primitive data types. Notably, future methods can’t take standard or
custom objects as arguments. A common pattern is to pass the method a List of
record IDs that you want to process asynchronously.

public class SomeClass {

@future

public static void someFutureMethod(List<Id> recordIds) {

List<Account> accounts = [Select Id, Name from Account Where Id IN


:recordIds];

// process account records to do awesome stuff

Status : success returns 200

@isTest
public class SMSCalloutMock implements HttpCalloutMock {
public HttpResponse respond(HttpRequest req) {
// Create a fake response
HttpResponse res = new HttpResponse();
res.setHeader('Content-Type', 'application/json');
res.setBody('{"status":"success"}');
res.setStatusCode(200);
return res;
}

Batch Apex
Batch Apex is used to run large jobs (think thousands or millions of records!) that
would exceed normal processing limits. Using Batch Apex, you can process records
asynchronously in batches (hence the name, “Batch Apex”) to stay within platform
limits. If you have a lot of records to process, for example, data cleansing or
archiving, Batch Apex is probably your best solution.

Batch Apex Syntax


To write a Batch Apex class, your class must implement the Database.Batchable
interface and include the following three methods:

start

Used to collect the records or objects to be passed to the interface method execute
for processing. This method is called once at the beginning of a Batch Apex job and
returns either a Database.QueryLocator object or an Iterable that contains the
records or objects passed to the job.

Most of the time a QueryLocator does the trick with a simple SOQL query to
generate the scope of objects in the batch job. But if you need to do something
crazy like loop through the results of an API call or pre-process records before being
passed to the execute method, you might want to check out the Custom Iterators
link in the Resources section.

With the QueryLocator object, the governor limit for the total number of records
retrieved by SOQL queries is bypassed and you can query up to 50 million records.
However, with an Iterable, the governor limit for the total number of records
retrieved by SOQL queries is still enforced.

execute

Performs the actual processing for each chunk or “batch” of data passed to the
method. The default batch size is 200 records. Batches of records are not guaranteed
to execute in the order they are received from the start method.

This method takes the following:

• A reference to the Database.BatchableContext object.


• A list of sObjects, such as List<sObject>, or a list of parameterized types. If you are
using a Database.QueryLocator, use the returned list.

finish
Used to execute post-processing operations (for example, sending an email) and is called
once after all batches are processed.

Here’s what the skeleton of a Batch Apex class looks like:

public class MyBatchClass implements Database.Batchable<sObject> {

public (Database.QueryLocator | Iterable<sObject>)


start(Database.BatchableContext bc) {

// collect the batches of records or objects to be passed to execute

public void execute(Database.BatchableContext bc, List<P> records){

// process each batch of records

}
public void finish(Database.BatchableContext bc){

// execute any post-processing operations

Queueable Apex allows you to submit jobs for asynchronous processing similar to
future methods with the following additional benefits:

• Non-primitive types: Your Queueable class can contain member variables of


non-primitive data types, such as sObjects or custom Apex types. Those
objects can be accessed when the job executes.
• Monitoring: When you submit your job by invoking the System.enqueueJob
method, the method returns the ID of the AsyncApexJob record. You can use
this ID to identify your job and monitor its progress, either through the
Salesforce user interface in the Apex Jobs page, or programmatically by
querying your record from AsyncApexJob.
• Chaining jobs: You can chain one job to another job by starting a second job
from a running job. Chaining jobs is useful if you need to do some sequential
processing.

Queueable Syntax
To use Queueable Apex, simply implement the Queueable interface.

public class SomeClass implements Queueable {

public void execute(QueueableContext context) {

// awesome code here

• You can add up to 50 jobs to the queue with System.enqueueJob in a single


transaction.
• When chaining jobs, you can add only one job from an executing job with
System.enqueueJob, which means that only one child job can exist for each
parent queueable job. Starting multiple child jobs from the same queueable
job is a no-no.
64. What type of jobs do not show up in the Apex Flex Queue.
A.Future Method Jobs
B.Batch Apex Jobs
C.Queueable Apex Jobs
D.Scheduled Apex Jobs
65.Which statement is true regarding the Flex Queue.
A.You can submit up to 200 batch jobs for execution.
B.Jobs are processed first-in first-out.
C.Jobs can only be scheduled during Taco Tuesdays.
D.Jobs are executed depending upon user license.
66. How many apex jobs we can scheduled at one time
A) 50
B) 100
C) 150
D) 200

Monitoring Future Jobs


Future jobs show up on the Apex Jobs page like any other jobs. However, future jobs
are not part of the flex queue currently.

You can query AsyncApexJob to find your future job, but there’s a caveat. Since
kicking off a future job does not return an ID, you have to filter on some other field
such as MethodName, or JobType, to find your job. There are a few sample SOQL
queries in this Stack Exchange post that might help.

Make Callouts to External Services from Apex


An Apex callout enables you to tightly integrate your Apex code with an external
service. The callout makes a call to an external web service or sends an HTTP request
from Apex code, and then receives the response.

Apex callouts come in two flavors.

• Web service callouts to SOAP web services use XML, and typically require a WSDL
document for code generation.
• HTTP callouts to services typically use REST with JSON.

These two types of callouts are similar in terms of sending a request to a service and
receiving a response. But while WSDL-based callouts apply to SOAP Web services,
HTTP callouts can be used with any HTTP service, either SOAP or REST.
Some Common HTTP Methods
HTTP Method Description
GET Retrieve data identified by a URL.
POST Create a resource or post data to the server.
DELETE Delete a resource identified by a URL.
PUT Create or replace the resource sent in the request body.

RestResource Annotation
The @RestResource annotation is used at the class level and enables you to expose an
Apex class as a REST resource.

These are some considerations when using this annotation:

• The URL mapping is relative


to https://instance.salesforce.com/services/apexrest/.
• A wildcard character (*) may be used.
• The URL mapping is case-sensitive. A URL mapping for my_url will only match a
REST resource containing my_url and not My_Url.
• To use this annotation, your Apex class must be defined as global.

67.which of the following method is used to map the url pattern to RestResource
Annoatation
a)urlPattern
b)urlText
c)urlMap
d)urlMapping

68. Which of the following statements is true about creating apps with Visualforce:
A.Visualforce is designed primarily for page-centric web apps.
B.Visualforce renders the page on the server.
C.Visualforce will be fully supported by Salesforce for years to come.
D.All of the above.
69. Which of the following statements is NOT true about creating apps with Lightning
components:
A.Lightning components are designed primarily for app-centric web apps.
B.Lightning components can be used everywhere Visualforce can be used.
C.Lightning components render the page on the client.
D.All of the above.
70. Which of the following is a poor use of Lightning Components:
A.Developing an app for Salesforce1.
B.Developing a highly interactive app with an innovative user interface.
C.Developing widgets for use in Lightning App Builder.
D.None of the above. All of these are good use cases for Lightning Components.

71. Which of the following features of Visualforce do NOT work in Lightning


Experience:
A.Creating custom apps and tabs.
B.Overriding standard actions with Visualforce pages.
C.Using window.location in JavaScript code.
D.Remote Objects.
72. Which of the following is NOT true about the user interface and visual design in
Lightning Experience:
A.PDFs render with the Lightning Experience visual design.
B.You can't hide the Lightning Experience main navigation header or sidebar.
C.The <apex:inputField> tag renders with the Salesforce Classic appearance.
D.The standard Visualforce header and sidebar are hidden.

73. Which of the following statements about Lightning Components and Lightning
Experience is true?
A.Lightning Experience is something you use directly, Lightning Components are
something you build apps with.
B.Lightning Experience is (mostly) built with Lightning Components.
C.Lightning Experience uses an app-centric development model using Lightning
Components.
D.All of the above.
74. Which of the following is true of Aura Components:
A.Aura Components can only be used in the Lightning Experience and not the Salesforce
mobile app.
B.Aura Components can be used in Visualforce pages.
C.Aura Components are only optimized for the desktop experience.
D.All of the above.

75. Which of the following ISV features are available in Lightning Experience?
A.Trialforce.
B.Usage Metrics Visualization app.
C.Package creation.
D.None of the above are available.
76. As an ISV, which of the following is true about AppExchange:
A.Your apps undergo a review for Lightning Experience readiness.
B.Your apps are available to all customers, whether they have enabled Lightning
Experience or not.
C.The 'Lightning Ready' certification lets AppExchange visitors know your app is
verified for Lightning Experience.
D.All of the above.
77. Which of the following is true of Apex in the new Lightning Experience:
A.You have to update the API version for all your Apex classes in order for them to work
in Lightning Experience.
B.Apex is not supported in the new Lightning Experience.
C.Your Apex code and queries continue to function as before.
D.All of the above
78. What should you look for when reviewing your installed packages before using them
with Lightning Experience?
A.A 'Lightning Ready' sash for the package on AppExchange.
B.An error message saying the package isn't 'Lightning Ready'.
C.A 'Lightning Ready' check mark on the Installed Packages page.
D.Errors in the JavaScript console when using the package.

79. Which of the following descriptions about the Lightning Component framework is
true?
A.It's a UI framework for developing web apps for mobile and desktop devices.
B.It uses JavaScript on the client side and Apex on the server side.
C.It's a modern framework for building single-page applications.
D.All of the above
80. What can you build with the Lightning Component framework?
A.Standalone app
B.Components to use inside Visualforce pages
C.Drag-and-drop components for Lightning App Builder
D.All of the above
81. How is the Lightning Component framework different from other web app
frameworks?
A.It is optimized for both mobile and desktop experiences and proves it with Salesforce1
and Lightning Experience.
B.It connects natively with services provided by the Salesforce platform.
C.It has specific opinions about how data access is performed and has specific security
requirements.
D.All of the above

Aura Attribute
Expressions
Instead of getting lost in words again, let’s dive right into making helloMessage work
as intended.

<aura:component>
<aura:attribute name="message" type="String"/>

<p>Hello! {!v.message}</p>

</aura:component>

Copy

Is that anticlimactic or what?

We’re outputting the contents of message using the expression {!v.message} . That is,
this expression references the message attribute. The expression is evaluated, and
resolves to the text string that’s currently stored in message . And that’s what the
expression outputs into the body of the component.

Ummm…what the heck is an “expression”?

An expression is basically a formula, or a calculation, which you place within


expression delimiters (“ {!” and “ }”). So, expressions look like the following:

{!<expression>}

The formal definition of an expression is a bit intimidating, but let’s look at and then
unpack it: An expression is any set of literal values, variables, sub-expressions, or
operators that can be resolved to a single value.

AURA COMPONENTS Methods - component.set("v.message", newMessage);

Let’s look at the helloMessageInteractive controller in more detail, and make that
explanation a bit more concrete.

({

handleClick: function(component, event, helper) {

let btnClicked = event.getSource(); // the button

let btnMessage = btnClicked.get("v.label"); // the button's label

component.set("v.message", btnMessage); // update our message

})

82. What does SLDS stand for?


A.Salesforce Leadership Does Surf
B.System Limits Detection System
C.Salesforce Lightning Design System
D.sObject Loading Data System
83. What are Lightning Events used for?
A.Salesforce mini developer conferences
B.Communicating between loosely coupled components
C.Logging critical details during app runtime
D.Scheduling sales calls in Lightning Experience
84. What is the name of the framework that includes Aura components?
A.Lightning Components
B.Angular
C.jQuery
D.WebObjects
85. In which language do you write Aura components action handlers?
A.Java
B.Visualforce
C.JavaScript
D.Objective-C
86. What is Lightning Data Service?
A.A set of UI elements that display record data
B.A subset of Visualforce
C.Lightning's data layer
D.A cloud-based storage and hosting service
87. What are the benefits of adopting LDS?
A.Fewer XHRs
B.Shared record data across components
C.Local offline cache
D.All of the above
88. What attributes are required when using force:recordData to load a record when
the component loads?
A.recordId, mode, layoutType, fields
B.recordId, mode, and layoutType or fields
C.recordId, mode, targetRecord
D.recordId, mode, fields, targetRecord, targetError

The force:recordData tag also supports a set of target * attributes, which are
attributes that force:recordData populates itself. The target * attributes can be used to
allow access from the UI.

• targetRecord is populated with the loaded record


• targetFields is populated with the simplified view of the loaded record
• targetError is populated with any errors

89. Which tool you will use to add a Lightning Component on a Record Page?
a) Flow Builder
b) Report Builder
c) Form Builder
d) App Builder

90. A developer andrew would like to execute or run jobs sequentially. Suggest
which would be the appropriate class?

a) Queueable
b) Database.Batchable
c) Database.Stateful
d) Database.Iterable

91. Which class contains the RestRequest and RestResponse objects in RESTful
webservices?
a) Resthttp
b) RestContent
c) RestContext
d) RestContainer

92.Which access specifier you will use for a class and methods to publish them
as SOAP web-service?
a) Public, webservice
b) Public, webmethod
c) Global, webmethod
d) Global , webservices

93. To start the batch processing we have to use which of the following
method?
a) Database.StartBatch
b) Database.executeBatch
c) Database.processBatch
d) Database.runBatch
94. Select the appropriate options to fill in the blanks which should call the
client-side controller method by clicking on a button of a component

Greet.cmp
<div>
<lightning button label = “You look nice today”
Onclick=”--------------------------”
</div>
Greet.js
{
handleClick : function(cmp,event,helper)
{
alert(“Welcome”);
}
}

a) {!handleClick}
b) {!c.handleClick}
c) {c.handleClick}
d) {!chandleClick }

Ex:-
<aura:component>
<aura:attribute name="text" type="String" default="Just a string. Waiting
for change."/>
<input type="button" value="Flawed HTML Button"
onclick="alert('this will not work')"/>
<br/>
<lightning:button label="Framework Button" onclick="{!c.handleClick}"/>
<br/>
{!v.text}
</aura:component>

95. Select the form-based component from the following which can be used to
display records only.
a) lightning:recordDisplayForm
b) lightning:recordForm
c) lightning:recordEditForm
d) lightning:recordViewForm

96. Below given is the controller code for a component. Identify what is missing in the
code.
public with sharing class ExpensesController {
public static List<Expense_c> getExpenses() {
return [SELECT Id, Name, Amount_c, Client_c, Date_c,
Reimbursed_c, CreatedDate
FROM Expense_c];
}
}
a. “@”AuraEnabled annotation for getExpense() ✓
b. “@”AllowAccess annotation for getExpense()
c. “@”isTest annotation for getExpense()
d. “@”Aura annotation for getExpense()

Use the force... recordData Tag


In the last unit, we covered the nifty performance upgrades and quality-of-life
features that Lightning Data Service provides. Now let’s learn how to use them.

Remember, force:recordData doesn’t inherently include any UI elements.


The force:recordData tag is just the logic used to communicate with the server and
manage the local cache. For your users to view and modify the data fetched by LDS,
you have to include UI elements. The force:recordData tag uses the UI API to provide
data to your UI components.

When using force:recordData , load the data once and pass it to child components as
attributes. This approach reduces the number of listeners and minimizes server calls,
which improves performance and ensures that your components show consistent
data.

Loading Records
The first thing you do to make a record available for your UI components is to load it.
Load the record by including force:recordData in your component while specifying
the recordId , mode , and layoutType or fields attributes. Valid values
for layoutType are FULL and COMPACT .

ldsDisplayRecord.cmp

<aura:component implements="flexipage:availableForRecordHome, force:hasRecordId">


<!--inherit recordId attribute-->

<aura:attribute name="record" type="Object"

description="The record object to be displayed"/>


<aura:attribute name="simpleRecord" type="Object"

description="A simplified view record object to be displayed"/>

<aura:attribute name="recordError" type="String"

description="An error message bound to force:recordData"/>

<force:recordData aura:id="record"

fields="Name,BillingCity,BillingState"

recordId="{!v.recordId}"

targetError="{!v.recordError}"

targetRecord="{!v.record}"

targetFields ="{!v.simpleRecord}"

mode="VIEW"/>

Enterprise and Partner WSDLs


If you’ve sailed the straits of another SOAP-based API, you know that the Web Services
Description Language (WSDL) file is basically your map to understanding how to use the API.
It contains the bindings, protocols, and objects to make API calls.

Salesforce provides two SOAP API WSDLs for two different use cases. The enterprise WSDL is
optimized for a single Salesforce org. It’s strongly typed, and it reflects your org’s specific
configuration, meaning that two enterprise WSDL files generated from two different orgs
contain different information.

The partner WSDL is optimized for use with many Salesforce orgs. It’s loosely typed,
and it doesn’t change based on an org’s specific configuration. Typically, if you’re
writing an integration for a single Salesforce org, use the enterprise WSDL. For
several orgs, use the partner WSDL.

For this unit, we’re using the enterprise WSDL to explore SOAP API. The first step is
to generate a WSDL file for your org. In your Trailhead Playground, from Setup, enter
API in the Quick Find box, then select API. On the API WSDL page, click Generate
Enterprise WSDL.
On the Generate Enterprise WSDL page, click Generate. When the WSDL is
generated, right-click on the page and save the WSDL file somewhere on your
computer. We’ll be using it shortly.

Here’s a tip for working with the enterprise WSDL. The enterprise WSDL reflects your
org’s specific configuration, so whenever you make a metadata change to your org,
regenerate the WSDL file. This way, the WSDL file doesn’t fall out of sync with your
org’s configuration.

ENDD---------------------------------------------------------------------------------------------------
SFDC TRAILHEAD QUIZ+Extra Questions

Q.1 which method causes the entire set of operations to be rolled back
a)error()
b)showError()
c)isError()
d)addError()
Q.2 Which Method you will use to declare a method as test method?
a)’@isTest’
b) ’@future’
c) ’@Rest’
d) ’@TestMethod’
Q.3 A developer would like to bypass the total number of records retrieved by SOQL
queries in the start Method.Which class object you would suggest to use?
a)Database.QueryLocator
b)Iteratable
c) Database.QueryRecords
d) Database.Iterable
Q.4 select three different flavours of asynchronous apex ?
a)Batch Apex
b)Future Method
c) Background Queueable
d)Scheduled Apex
Q.5 A developer like to Monitor the progress of future jobs. Suggest the correct way.
a)From Setup ,select Apex Jobs
b) Query ConTrigger to find future job
c) Query AsyncApexJob to find future job
d) Query ConJobDetail to find future job
Q.6 Which Annotation will be used to expose an Apex class as Rest resource?
a) ‘@’RestResource
b) ‘@’ResourceRest
c) ‘@’HttpResource
d) ‘@’RestHttp
Q.7 When making a callout from a method ,the method waits for external service to send
back the callout response. A developer does not want this behaviour. Suggest the
appropriate solution.
a) Place the callout method in an asynchronous method that is annotated with
@future(callout=true)
b) Place the callout method in an asynchronous method that is annotated with
@future.
c) Place the callout method in an asynchronous method that is annotated with
@HttpGet(callout=true).
d) Place the callout method in an asynchronous method that is annotated with
@HttpPost(callout=true).

When making a callout from a method, the method waits for the external service to send
back the callout response before executing subsequent lines of code. Alternatively, you can
place the callout code in an asynchronous method that’s annotated
with @future(callout=true) or use Queueable Apex. This way, the callout runs on a separate
thread, and the execution of the calling method isn’t blocked.

Q.8 select the second generation of event products related to streaming API (select 2)
a) Change Data Capture
b) Push Topic Events
c)Generic streaming events
d)Platform events

Q.9 Which are the three methods of Heroku and Salesforce Integration(Select 3)
a) Heroku Connect
b) Salesforce SOAP API’S
c) Callout
d) Canvas

Q.10 A developer is loading a record from the database using force:recordData


component. Which attribute is populated with the loaded record?
a) targetFields
b) targetRecord
c) targetError
d) targetRow

Q.11 Which of the following statement is true about external callouts:


a) SOAP callouts use XML and may use a WSDL for code generation.
b) HTTP Callouts typically use JSON but can use XML as well.
c) HTTP Callouts are generally easier to work with than SOAP callouts.
d) All of the Above

Q.12 What type of jobs do not show up in the Apex Flex Queue?
a) Future Method Jobs
b) Batch Apex Jobs
c) Queueable Apex Jobs
d) Scheduled Apex Jobs

Q.13 True and False.


By default the org data is accessible in test methods
a) TRUE
b) FALSE

Q. 14 Identify the invalid trigger event from the following.


• Before undelete
• After insert
• Before update
• After delete

Q.15 A component has an attribute message . Select line appropriate statement to set
the value of message from client-controller method with newMessage.

handleClick2: function(component,event,helper){
var newMessage = event.getSource().get(“v.label”);
console.log(“handleClick2: Message:” + newMessage);
// Add correct statement below
---------------------------------------
}

a) component.set(“message”,newMessage);
b) component.set(“{v.message}”,newMessage);
c) component.set(“v.message”,newMessage);
d) component.get(“v.message”,newMessage);

Q.16 Suggest an attribute to a developer to declare that the component handles the
event after changes in the record.
a) recordEdited
b) recordData
c) recordUpdated
d) recordChanged
Q.17 Which attributes of force:recordData is set to localized error message if an error
occurs on loading a component?
a) targetFields
b) targetError
c) error
d) fieldsError

Q.18 True and False


Methods with the future annotation must be static methods and can only return a void
type.
a) True
b) False

Q.19 When we start batch apex , which record is created?


a) AsyncJob
b) AsyncApexBatch
c) AsyncApexJob
d) SyncApexJob

Q.20 A developer called a web services from an apex code which response status code
she should check to ensure that the request is successful?
a) 500
b) 404
c) 201
d) 200

When the server processes the request, it sends a status code in the response. The status
code indicates whether the request was processed successfully or whether errors were
encountered. If the request is successful, the server sends a status code of 200. You’ve
probably seen some other status codes, such as 404 for file not found or 500 for an internal
server error.

Q.21 Identify the invalid HTTP method from the following


a) UNDELETE
b) GET
c) POST
d) DELETE
e) PUT

Q.22 A lightning component developer want to fetch data of a custom object


Review__c from database and want to display on a component. What type of controller
should be used?
a) Standard List Controller
b) Extension Controller
c) Client-Side controller with Server-Side Controller
d) Standard Controller

Q.23 Select the inappropriate reason from the following to integrate apps on Heroku
with salesforce:
a) Data Replication
b) Data Proxies
c) Data Security
d) Custom User Interface

Q.24 Consider the following code. Select appropriate statement to print the value of
message
attribute.
<aura:component>
<aura:attribute name=”message” type=”String”/>
<p>Hello! --------------------</p>
</aura:component>

a. {v.message}
b. {! message}
c. {message}
d. {!v.message}

Q.25 Which of the following annotation you will add to your method to expose it as a
REST resource that can be called by an HTTP GET request?
a.) “@”HttpPost
b.)“@”HttpGet
c.) “@”HttpPut
d. )“@”HttpDelete

Q.26 Which Context variable provides a list of sObjects which we can use only in insert
,update and delete trigger?
a) old
b) oldMap
c) new
d) newMap

27.The API-first approach to development at Salesforce lets customers:


A.Extend functionality across Salesforce features
B.Choose the API that's best suited to their needs
C.Build apps for the AppExchange
D.All of the above
28.REST API is best suited for which of these use cases?
A.Loading lots of data into your org for the first time
B.Writing a mobile or web app
C.Deleting 100,000 records at once
D.Pushing notifications whenever data is changed
29.SOAP API is best suited for which of these use cases?
A.Building a server-to-server integration
B.Writing an app that requires using JSON
C.Updating thousands of records at once
D.Building a slick UI for a mobile app
30.Bulk API is best suited for which of these use cases?
A.Deleting several records, one record at a time
B.Writing a mobile chat app
C.Building a new Salesforce UI
D.Deleting 100,000 records at once
31.Streaming API is best suited for which of these use cases?
A.Notifying users whenever a record is deleted
B.Creating hundreds of account records at once
C.Writing an app where the use of XML is required
D.Using a WSDL file to specify the operations allowed on standard and custom objects
32. What are all the factors that contribute to the total API limit calculation?
A.Org edition and API usage over the previous month
B.Org edition, license type, and expansion packs
C.License type and expansion packs
D.Number of Salesforce employees swabbing the deck

HTTP METHODS FOR REST API


HTTP methods (HEAD, GET, POST, PATCH, DELETE)
A REST request consists of four components: a resource URI, an HTTP method, request
headers, and a request body.

Request headers specify metadata for the request. The request body specifies data for the
request, when necessary. If there’s no data to specify, the body is omitted from the request.

• GET—The HTTP method used for this API call.


• {{_endpoint}}—The place where the request will take place. In this case,
you added the URL of your Trailhead Playground to the _endpoint field
in the variables to connect to Salesforce.
• /services/data—Specifies that you’re making a REST API request.
• /v {{version}}—The API version number. The double curly quotes
indicate that this can be set as a variable.
• /sobjects—Specifies that you’re accessing a resource under the sObject
grouping.
• /:SOBJECT_API_Name—The sObject being actioned; in this case,
Account.
• /describe—An action; in this case, a Describe request.
• 33. Streaming API's push paradigm lets you:
• A.Create more records in a single API call
• B.Use SOSL to listen for event notifications
• C.Avoid making unnecessary API requests by listening for notifications rather
than polling for data
• D.Write code from the crow's nest of a pirate ship
• 34. What is the second generation of PushTopic events?
• A.Platform events
• B.Generic streaming events
• C.Change data capture events
• D.The event bus
• 35. Which replay option specifies that the subscriber receives event notifications
with replay IDs 6, 7, 8, and 9?
• A.6
• B.5
• C.-2
• D.-1
Streaming API lets you push real-time notifications to clients using the publish-subscribe
model.

36. Which of the following scenarios describes how you can use a connected app?
A.Users can create their own connected apps to access their personal email accounts.
B.Users can log in to an external application with their Salesforce or Experience Cloud
credentials.
C.Users can authorize a mobile app to securely access defined Salesforce data on their
behalf.
D.B and C
37. What's the difference between a connected app developer and a connected app
admin?
A.Only developers can set policies that explicitly define who can use connected apps and
where they can access the apps from.
B.Only admins can set policies that explicitly define who can use connected apps and
where they can access the apps from.
C.There isn't a difference between developers and admins when it comes to connected
apps.
D.Only developers use connected apps. Admins have no role with connected apps.

38. True or false: OAuth 2.0 APIs enable a user to work in one app but see the data
from another.
A.True
B.False
39. You're creating a connected app that allows a Smart TV to display a customer's
movie order history. Which OAuth 2.0 flow would you use for the connected app?
A.OAuth 2.0 web server flow
B.OAuth 2.0 device flow
C.OAuth 2.0 JSON Web Token Exchange (JWT) bearer flow
D.OAuth 2.0 user-agent flow

Using OpenID Connect dynamic client registration, resource servers can dynamically create
client apps as connected apps in Salesforce -- TRUE
When Salesforce acts as your identity provider, you can use a connected app to integrate
your service provider with your org. – FALSE

40. True or false: You can integrate identity providers with Salesforce using connected
apps.
A.True
B.False
41. How is OpenID Connect different from SAML?
A.You can't use OpenID Connect to enable SSO between two services.
B.You can only use OpenID Connect to enable SSO between two services.
C.OpenID Connect is built for today's API economy because it adds an authentication
layer on top of OAuth 2.0.
D.B and C

42. True or false: Dynamic client registration enables resource servers to dynamically
create client apps as connected apps.
A.True
B.False
43. What role does your Salesforce org play in providing authorization for external API
gateways?
A.My Salesforce org requests the creation of client apps as connected apps from the
external API gateway.
B.My Salesforce org hosts the protected data.
C.My Salesforce org is the OAuth authorization server that protects resources hosted on
an external API gateway.
D.My Salesforce org asks the external API gateway to authenticate a client app.
44. Which of the following is NOT an advantage of data replication over data proxies?
A.A replicated data set offloads processing and requests from an origin data server.
B.A replicated data set is always and immediately in sync with the origin data.
C.A replicated data set reduces data access latency.
D.A replicated data set supports bidirectional writes.
45. You can use Salesforce Connect to proxy which types of data sources:
A.OData 2.0 and 4.0
B.REST with JSON payloads
C.REST with XML payloads
D.SOAP
E.All of the above
46. Which technology do Salesforce REST APIs use for authentication?
A.Pre-shared keys
B.Basic usernames and passwords
C.OAuth
D.SAML
47. Callouts from Salesforce to Heroku can be made using:
A.Web sockets
B.Apex triggers or outbound messages
C.Message bus
D.Corba

48. You can use Heroku Connect for:


A.One-way data replication
B.Bidirectional data replication
C.Data proxy with Salesforce Connect
D.All of the above
49. How does Heroku Connect work with Salesforce authentication?
A.A single integration user's credentials are stored.
B.OAuth provides Heroku Connect with API tokens after the user authorizes the Heroku
Connect application on Salesforce.
C.SAML authorizes Heroku Connect to make API calls.
D.The end user of a Heroku app authorizes Heroku Connect via OAuth.
50. Heroku Connect data replication happens:
A.Instantly in both directions
B.Near real time in both directions
C.Near real time for writes to Salesforce, and on a 30-second polling window for writes
to Heroku Postgres
D.Near real time for writes to Salesforce, and either on a polling window or near real time
for writes to Heroku Postgres (depending on the user configuration)

51. Salesforce Connect is used for:


A.Developing ETL services
B.Replicating external data into Salesforce
C.Proxying external data into Salesforce
D.Bidirectional syncing of external data in Salesforce
52. Salesforce Connect custom adapters support:
A.Cross-object relationships
B.Data paging
C.Search
D.All of the above
53. Which of the following is NOT an advantage of Salesforce Connect over ETL?
A.The data is always fetched on demand.
B.If the origin is offline, the data is still available via Salesforce Connect.
C.Standard protocols like OData can easily proxy external data into Salesforce.
D.Data security can be enforced using per-user or per-application authentication.
54. Applications on Heroku that use Salesforce REST APIs can use which
authentication mechanisms:
A.Anonymous access without credentials on trusted networks
B.Username and password with an OAuth connected app
C.OAuth web or user-agent flow in which the user authorizes a connected app using
browser redirects
D.B and C
E.A and C
55. You can use the Salesforce REST APIs to:
A.Insert or update records
B.Execute processes as another user
C.Access database log files
D.Feed your kitten

56. The primary benefit of a workflow outbound message over an Apex trigger is:
A.The message can deliver the payload only as SOAP.
B.The message supports different authentication mechanisms.
C.Messages are completely declarative.
D.The message can handle every database event.
57. Callouts in Apex trigger support which authentication mechanisms:
A.Pre-shared keys
B.Username and password credentials
C.OAuth flows using named credentials in the Remote Site settings
D.All of the above

58. Heroku apps that handle callouts from Salesforce can be written in:
A.Node.js / JavaScript
B.Java, Scala, Clojure
C.Python
D.PHP
E.All of the above

59. Canvas apps can authenticate a user with:


A.Username and password
B.OAuth
C.Signed request
D.Either OAuth or signed request
60. You can build Canvas apps and run them on Heroku with of the following
languages:
A.Node.js / JavaScript
B.Java, Scala, Clojure
C.Python
D.PHP
E.All of the above
61. The best use of Canvas apps is to:
A.Display real estate photos in Salesforce for house listings
B.Render custom widgets on Chatter feeds
C.Display third-party apps in Salesforce
D.All of the above

Valid Trigger event

• before insert
• before update
• before delete
• after insert
• after update
• after delete
• after undelete

Invalid Trigger Event → Before undelete

• Before triggers are used to update or validate record values before they’re
saved to the database.
• After triggers are used to access field values that are set by the system (such
as a record's Id or LastModifiedDate field), and to affect changes in other
• records. The records that fire the after trigger are read-only.
62. What is a key benefit of asynchronous processing?
A.Higher governor and execution limits
B.Unlimited number of external callouts
C.Override organization-wide sharing defaults
D.Enabling turbo mode for transactional processing
63. Batch Apex is typically the best type of asynchronous processing when you want to:
A.Make a callout to a web service when a user updates a record.
B.Schedule a task to run on a weekly basis.
C.Update all records in your org.
D.Send a rickroll email to a contact.

Future Apex
Future methods are typically used for:

• Callouts to external Web services. If you are making callouts from a trigger or after
performing a DML operation, you must use a future or queueable method. A callout
in a trigger would hold the database connection open for the lifetime of the callout
and that is a "no-no" in a multitenant environment.
• Operations you want to run in their own thread, when time permits such as some sort
of resource-intensive calculation or processing of records.
• Isolating DML operations on different sObject types to prevent the mixed DML error.
This is somewhat of an edge-case but you may occasionally run across this issue.
See sObjects That Cannot Be Used Together in DML Operations for more details.

Future Method Syntax


Future methods must be static methods, and can only return a void type. The
specified parameters must be primitive data types, arrays of primitive data types, or
collections of primitive data types. Notably, future methods can’t take standard or
custom objects as arguments. A common pattern is to pass the method a List of
record IDs that you want to process asynchronously.

public class SomeClass {

@future

public static void someFutureMethod(List<Id> recordIds) {

List<Account> accounts = [Select Id, Name from Account Where Id IN


:recordIds];

// process account records to do awesome stuff

Status : success returns 200

@isTest
public class SMSCalloutMock implements HttpCalloutMock {
public HttpResponse respond(HttpRequest req) {
// Create a fake response
HttpResponse res = new HttpResponse();
res.setHeader('Content-Type', 'application/json');
res.setBody('{"status":"success"}');
res.setStatusCode(200);
return res;
}

Batch Apex
Batch Apex is used to run large jobs (think thousands or millions of records!) that
would exceed normal processing limits. Using Batch Apex, you can process records
asynchronously in batches (hence the name, “Batch Apex”) to stay within platform
limits. If you have a lot of records to process, for example, data cleansing or
archiving, Batch Apex is probably your best solution.

Batch Apex Syntax


To write a Batch Apex class, your class must implement the Database.Batchable
interface and include the following three methods:

start

Used to collect the records or objects to be passed to the interface method execute
for processing. This method is called once at the beginning of a Batch Apex job and
returns either a Database.QueryLocator object or an Iterable that contains the
records or objects passed to the job.

Most of the time a QueryLocator does the trick with a simple SOQL query to
generate the scope of objects in the batch job. But if you need to do something
crazy like loop through the results of an API call or pre-process records before being
passed to the execute method, you might want to check out the Custom Iterators
link in the Resources section.

With the QueryLocator object, the governor limit for the total number of records
retrieved by SOQL queries is bypassed and you can query up to 50 million records.
However, with an Iterable, the governor limit for the total number of records
retrieved by SOQL queries is still enforced.

execute

Performs the actual processing for each chunk or “batch” of data passed to the
method. The default batch size is 200 records. Batches of records are not guaranteed
to execute in the order they are received from the start method.

This method takes the following:

• A reference to the Database.BatchableContext object.


• A list of sObjects, such as List<sObject>, or a list of parameterized types. If you are
using a Database.QueryLocator, use the returned list.

finish
Used to execute post-processing operations (for example, sending an email) and is called
once after all batches are processed.

Here’s what the skeleton of a Batch Apex class looks like:

public class MyBatchClass implements Database.Batchable<sObject> {

public (Database.QueryLocator | Iterable<sObject>)


start(Database.BatchableContext bc) {

// collect the batches of records or objects to be passed to execute

public void execute(Database.BatchableContext bc, List<P> records){

// process each batch of records

}
public void finish(Database.BatchableContext bc){

// execute any post-processing operations

Queueable Apex allows you to submit jobs for asynchronous processing similar to
future methods with the following additional benefits:

• Non-primitive types: Your Queueable class can contain member variables of


non-primitive data types, such as sObjects or custom Apex types. Those
objects can be accessed when the job executes.
• Monitoring: When you submit your job by invoking the System.enqueueJob
method, the method returns the ID of the AsyncApexJob record. You can use
this ID to identify your job and monitor its progress, either through the
Salesforce user interface in the Apex Jobs page, or programmatically by
querying your record from AsyncApexJob.
• Chaining jobs: You can chain one job to another job by starting a second job
from a running job. Chaining jobs is useful if you need to do some sequential
processing.

Queueable Syntax
To use Queueable Apex, simply implement the Queueable interface.

public class SomeClass implements Queueable {

public void execute(QueueableContext context) {

// awesome code here

• You can add up to 50 jobs to the queue with System.enqueueJob in a single


transaction.
• When chaining jobs, you can add only one job from an executing job with
System.enqueueJob, which means that only one child job can exist for each
parent queueable job. Starting multiple child jobs from the same queueable
job is a no-no.
64. What type of jobs do not show up in the Apex Flex Queue.
A.Future Method Jobs
B.Batch Apex Jobs
C.Queueable Apex Jobs
D.Scheduled Apex Jobs
65.Which statement is true regarding the Flex Queue.
A.You can submit up to 200 batch jobs for execution.
B.Jobs are processed first-in first-out.
C.Jobs can only be scheduled during Taco Tuesdays.
D.Jobs are executed depending upon user license.
66. How many apex jobs we can scheduled at one time
A) 50
B) 100
C) 150
D) 200

Monitoring Future Jobs


Future jobs show up on the Apex Jobs page like any other jobs. However, future jobs
are not part of the flex queue currently.

You can query AsyncApexJob to find your future job, but there’s a caveat. Since
kicking off a future job does not return an ID, you have to filter on some other field
such as MethodName, or JobType, to find your job. There are a few sample SOQL
queries in this Stack Exchange post that might help.

Make Callouts to External Services from Apex


An Apex callout enables you to tightly integrate your Apex code with an external
service. The callout makes a call to an external web service or sends an HTTP request
from Apex code, and then receives the response.

Apex callouts come in two flavors.

• Web service callouts to SOAP web services use XML, and typically require a WSDL
document for code generation.
• HTTP callouts to services typically use REST with JSON.

These two types of callouts are similar in terms of sending a request to a service and
receiving a response. But while WSDL-based callouts apply to SOAP Web services,
HTTP callouts can be used with any HTTP service, either SOAP or REST.
Some Common HTTP Methods
HTTP Method Description
GET Retrieve data identified by a URL.
POST Create a resource or post data to the server.
DELETE Delete a resource identified by a URL.
PUT Create or replace the resource sent in the request body.

RestResource Annotation
The @RestResource annotation is used at the class level and enables you to expose an
Apex class as a REST resource.

These are some considerations when using this annotation:

• The URL mapping is relative


to https://instance.salesforce.com/services/apexrest/.
• A wildcard character (*) may be used.
• The URL mapping is case-sensitive. A URL mapping for my_url will only match a
REST resource containing my_url and not My_Url.
• To use this annotation, your Apex class must be defined as global.

67.which of the following method is used to map the url pattern to RestResource
Annoatation
a)urlPattern
b)urlText
c)urlMap
d)urlMapping

68. Which of the following statements is true about creating apps with Visualforce:
A.Visualforce is designed primarily for page-centric web apps.
B.Visualforce renders the page on the server.
C.Visualforce will be fully supported by Salesforce for years to come.
D.All of the above.
69. Which of the following statements is NOT true about creating apps with Lightning
components:
A.Lightning components are designed primarily for app-centric web apps.
B.Lightning components can be used everywhere Visualforce can be used.
C.Lightning components render the page on the client.
D.All of the above.
70. Which of the following is a poor use of Lightning Components:
A.Developing an app for Salesforce1.
B.Developing a highly interactive app with an innovative user interface.
C.Developing widgets for use in Lightning App Builder.
D.None of the above. All of these are good use cases for Lightning Components.

71. Which of the following features of Visualforce do NOT work in Lightning


Experience:
A.Creating custom apps and tabs.
B.Overriding standard actions with Visualforce pages.
C.Using window.location in JavaScript code.
D.Remote Objects.
72. Which of the following is NOT true about the user interface and visual design in
Lightning Experience:
A.PDFs render with the Lightning Experience visual design.
B.You can't hide the Lightning Experience main navigation header or sidebar.
C.The <apex:inputField> tag renders with the Salesforce Classic appearance.
D.The standard Visualforce header and sidebar are hidden.

73. Which of the following statements about Lightning Components and Lightning
Experience is true?
A.Lightning Experience is something you use directly, Lightning Components are
something you build apps with.
B.Lightning Experience is (mostly) built with Lightning Components.
C.Lightning Experience uses an app-centric development model using Lightning
Components.
D.All of the above.
74. Which of the following is true of Aura Components:
A.Aura Components can only be used in the Lightning Experience and not the Salesforce
mobile app.
B.Aura Components can be used in Visualforce pages.
C.Aura Components are only optimized for the desktop experience.
D.All of the above.

75. Which of the following ISV features are available in Lightning Experience?
A.Trialforce.
B.Usage Metrics Visualization app.
C.Package creation.
D.None of the above are available.
76. As an ISV, which of the following is true about AppExchange:
A.Your apps undergo a review for Lightning Experience readiness.
B.Your apps are available to all customers, whether they have enabled Lightning
Experience or not.
C.The 'Lightning Ready' certification lets AppExchange visitors know your app is
verified for Lightning Experience.
D.All of the above.
77. Which of the following is true of Apex in the new Lightning Experience:
A.You have to update the API version for all your Apex classes in order for them to work
in Lightning Experience.
B.Apex is not supported in the new Lightning Experience.
C.Your Apex code and queries continue to function as before.
D.All of the above
78. What should you look for when reviewing your installed packages before using them
with Lightning Experience?
A.A 'Lightning Ready' sash for the package on AppExchange.
B.An error message saying the package isn't 'Lightning Ready'.
C.A 'Lightning Ready' check mark on the Installed Packages page.
D.Errors in the JavaScript console when using the package.

79. Which of the following descriptions about the Lightning Component framework is
true?
A.It's a UI framework for developing web apps for mobile and desktop devices.
B.It uses JavaScript on the client side and Apex on the server side.
C.It's a modern framework for building single-page applications.
D.All of the above
80. What can you build with the Lightning Component framework?
A.Standalone app
B.Components to use inside Visualforce pages
C.Drag-and-drop components for Lightning App Builder
D.All of the above
81. How is the Lightning Component framework different from other web app
frameworks?
A.It is optimized for both mobile and desktop experiences and proves it with Salesforce1
and Lightning Experience.
B.It connects natively with services provided by the Salesforce platform.
C.It has specific opinions about how data access is performed and has specific security
requirements.
D.All of the above

Aura Attribute
Expressions
Instead of getting lost in words again, let’s dive right into making helloMessage work
as intended.

<aura:component>
<aura:attribute name="message" type="String"/>

<p>Hello! {!v.message}</p>

</aura:component>

Copy

Is that anticlimactic or what?

We’re outputting the contents of message using the expression {!v.message} . That is,
this expression references the message attribute. The expression is evaluated, and
resolves to the text string that’s currently stored in message . And that’s what the
expression outputs into the body of the component.

Ummm…what the heck is an “expression”?

An expression is basically a formula, or a calculation, which you place within


expression delimiters (“ {!” and “ }”). So, expressions look like the following:

{!<expression>}

The formal definition of an expression is a bit intimidating, but let’s look at and then
unpack it: An expression is any set of literal values, variables, sub-expressions, or
operators that can be resolved to a single value.

AURA COMPONENTS Methods - component.set("v.message", newMessage);

Let’s look at the helloMessageInteractive controller in more detail, and make that
explanation a bit more concrete.

({

handleClick: function(component, event, helper) {

let btnClicked = event.getSource(); // the button

let btnMessage = btnClicked.get("v.label"); // the button's label

component.set("v.message", btnMessage); // update our message

})

82. What does SLDS stand for?


A.Salesforce Leadership Does Surf
B.System Limits Detection System
C.Salesforce Lightning Design System
D.sObject Loading Data System
83. What are Lightning Events used for?
A.Salesforce mini developer conferences
B.Communicating between loosely coupled components
C.Logging critical details during app runtime
D.Scheduling sales calls in Lightning Experience
84. What is the name of the framework that includes Aura components?
A.Lightning Components
B.Angular
C.jQuery
D.WebObjects
85. In which language do you write Aura components action handlers?
A.Java
B.Visualforce
C.JavaScript
D.Objective-C
86. What is Lightning Data Service?
A.A set of UI elements that display record data
B.A subset of Visualforce
C.Lightning's data layer
D.A cloud-based storage and hosting service
87. What are the benefits of adopting LDS?
A.Fewer XHRs
B.Shared record data across components
C.Local offline cache
D.All of the above
88. What attributes are required when using force:recordData to load a record when
the component loads?
A.recordId, mode, layoutType, fields
B.recordId, mode, and layoutType or fields
C.recordId, mode, targetRecord
D.recordId, mode, fields, targetRecord, targetError

The force:recordData tag also supports a set of target * attributes, which are
attributes that force:recordData populates itself. The target * attributes can be used to
allow access from the UI.

• targetRecord is populated with the loaded record


• targetFields is populated with the simplified view of the loaded record
• targetError is populated with any errors

89. Which tool you will use to add a Lightning Component on a Record Page?
a) Flow Builder
b) Report Builder
c) Form Builder
d) App Builder

90. A developer andrew would like to execute or run jobs sequentially. Suggest
which would be the appropriate class?

a) Queueable
b) Database.Batchable
c) Database.Stateful
d) Database.Iterable

91. Which class contains the RestRequest and RestResponse objects in RESTful
webservices?
a) Resthttp
b) RestContent
c) RestContext
d) RestContainer

92.Which access specifier you will use for a class and methods to publish them
as SOAP web-service?
a) Public, webservice
b) Public, webmethod
c) Global, webmethod
d) Global , webservices

93. To start the batch processing we have to use which of the following
method?
a) Database.StartBatch
b) Database.executeBatch
c) Database.processBatch
d) Database.runBatch
94. Select the appropriate options to fill in the blanks which should call the
client-side controller method by clicking on a button of a component

Greet.cmp
<div>
<lightning button label = “You look nice today”
Onclick=”--------------------------”
</div>
Greet.js
{
handleClick : function(cmp,event,helper)
{
alert(“Welcome”);
}
}

a) {!handleClick}
b) {!c.handleClick}
c) {c.handleClick}
d) {!chandleClick }

Ex:-
<aura:component>
<aura:attribute name="text" type="String" default="Just a string. Waiting
for change."/>
<input type="button" value="Flawed HTML Button"
onclick="alert('this will not work')"/>
<br/>
<lightning:button label="Framework Button" onclick="{!c.handleClick}"/>
<br/>
{!v.text}
</aura:component>

95. Select the form-based component from the following which can be used to
display records only.
a) lightning:recordDisplayForm
b) lightning:recordForm
c) lightning:recordEditForm
d) lightning:recordViewForm

96. Below given is the controller code for a component. Identify what is missing in the
code.
public with sharing class ExpensesController {
public static List<Expense_c> getExpenses() {
return [SELECT Id, Name, Amount_c, Client_c, Date_c,
Reimbursed_c, CreatedDate
FROM Expense_c];
}
}
a. “@”AuraEnabled annotation for getExpense() ✓
b. “@”AllowAccess annotation for getExpense()
c. “@”isTest annotation for getExpense()
d. “@”Aura annotation for getExpense()

Use the force... recordData Tag


In the last unit, we covered the nifty performance upgrades and quality-of-life
features that Lightning Data Service provides. Now let’s learn how to use them.

Remember, force:recordData doesn’t inherently include any UI elements.


The force:recordData tag is just the logic used to communicate with the server and
manage the local cache. For your users to view and modify the data fetched by LDS,
you have to include UI elements. The force:recordData tag uses the UI API to provide
data to your UI components.

When using force:recordData , load the data once and pass it to child components as
attributes. This approach reduces the number of listeners and minimizes server calls,
which improves performance and ensures that your components show consistent
data.

Loading Records
The first thing you do to make a record available for your UI components is to load it.
Load the record by including force:recordData in your component while specifying
the recordId , mode , and layoutType or fields attributes. Valid values
for layoutType are FULL and COMPACT .

ldsDisplayRecord.cmp

<aura:component implements="flexipage:availableForRecordHome, force:hasRecordId">


<!--inherit recordId attribute-->

<aura:attribute name="record" type="Object"

description="The record object to be displayed"/>


<aura:attribute name="simpleRecord" type="Object"

description="A simplified view record object to be displayed"/>

<aura:attribute name="recordError" type="String"

description="An error message bound to force:recordData"/>

<force:recordData aura:id="record"

fields="Name,BillingCity,BillingState"

recordId="{!v.recordId}"

targetError="{!v.recordError}"

targetRecord="{!v.record}"

targetFields ="{!v.simpleRecord}"

mode="VIEW"/>

Enterprise and Partner WSDLs


If you’ve sailed the straits of another SOAP-based API, you know that the Web Services
Description Language (WSDL) file is basically your map to understanding how to use the API.
It contains the bindings, protocols, and objects to make API calls.

Salesforce provides two SOAP API WSDLs for two different use cases. The enterprise WSDL is
optimized for a single Salesforce org. It’s strongly typed, and it reflects your org’s specific
configuration, meaning that two enterprise WSDL files generated from two different orgs
contain different information.

The partner WSDL is optimized for use with many Salesforce orgs. It’s loosely typed,
and it doesn’t change based on an org’s specific configuration. Typically, if you’re
writing an integration for a single Salesforce org, use the enterprise WSDL. For
several orgs, use the partner WSDL.

For this unit, we’re using the enterprise WSDL to explore SOAP API. The first step is
to generate a WSDL file for your org. In your Trailhead Playground, from Setup, enter
API in the Quick Find box, then select API. On the API WSDL page, click Generate
Enterprise WSDL.
On the Generate Enterprise WSDL page, click Generate. When the WSDL is
generated, right-click on the page and save the WSDL file somewhere on your
computer. We’ll be using it shortly.

Here’s a tip for working with the enterprise WSDL. The enterprise WSDL reflects your
org’s specific configuration, so whenever you make a metadata change to your org,
regenerate the WSDL file. This way, the WSDL file doesn’t fall out of sync with your
org’s configuration.

ENDD---------------------------------------------------------------------------------------------------
1) True or false: OAuth 2.0 APIs enable a user to work in one app but see the data from

another.

a) True
b) False

2) You're creating a connected app that allows a Smart TV to display a customer's movie order history.
Which OAuth 2.0 flow would you use for the connected app?

a) OAuth 2.0 web server flow

b) OAuth 2.0 device flow

c) OAuth 20 JSON Web Token Exchange (JWT) bearer flow


d) OAuth 2.0 user agent flow

3) What is a key benefits of asynchronous processing?

a) Higher governor and execution limits

b) Unlimited number of external callouts

c) Override organization-wide sharing defaults


d) Enabling turbo mode for transactional processing

4) Batch Apex is typically the best type of asynchronous processing when you want to:
a) Make a callout to a web service when a user updates a record

b) Schedule a task to run on a weekly basis


c) Update all records in your org

d) Send a rickroll email to a contact

5) Which tools are included with the Salesforce Flow product?


a) Lightning Experience and Flow Builder
b) Lightning App Builder and Process Builder

c) Flow Builder and Process Builder

d) Flow Builder, Process Builder and Approvals

6) Which declarative tool would you use for the following use case? Guide customers

through the process of troubleshooting issues with your product

a) Flow Builder

b) Approvals
c) Apex

7) Which declarative tool would you use for the following use case? When an opportunity's discount is
higher than 40%, notify the CEO via email and request sign-off. Provide a way for the CEO to leave
comments.

a) Flow Builder

b) Approvals

c) Apex

8) Which declarative tool would you use for the following use case? When the Annual Revenue field
exceeds $500,000 on an account, automatically update the Customer

Priority field to High.

a) Flow Builder
b) Approvals

c) Apex

9) What does SLDS stand for?


a) Salesforce Leadership Does Surf

b) System Limits Detection System


c) Salesforce Lightning Design System

d) sObject Loading Data System

10) What are Lightning Events used for?


a) Salesforce mini developer conferences

b) Communicating between loosely coupled components

c) Logging critical details during app runtime


d) Scheduling sales calls in Lightning Experience

11) What is the name of the framework that includes Aura components?

a) Lightning Components

b) Angular
c) jQuery

d) WebObjects

12) In which language do you write Aura components action handlers?


a) Java

b) VisualForce
c) JavaScript
d) Objective-C

13) Which of the following descriptions about the Lightning Component framework is true?

a) It's a UI framework for developing web apps for mobile and desktop devices.

b) It uses JavaScript on the client-side and Apex on the server-side.

c) It's a modern framework for building single-page applications


d) All of the above

14) What can you build with the Lightning Component framework?

a) Standalone app
b) Components to use inside Visualforce pages

c) Drag-and-drop components for Lightning App Builder


d) All of the above

15) How is the Lightning Component framework different from other web app frameworks?
a) It is optimized for both mobile and desktop experiences and proves it with

Salesforce 1 and Lightning Experience

b) It connects natively with services provided by the Salesforce platform

c) It has specific opinions about how data access is performed and has specific

security requirements
d) All of the above

16) What is Lightning data service?

a) A set of Ul elements that displays record data


b) A subset of Visualforce

c) Lightning's data layer


d) A cloud-based storage and hosting service

17) What are the benefits of adopting LDS?

a) Fewer XHRS
b) Shared record data across components

c) Local offline cache

d) All the above

18) What attributes are required when using force record Data to load a record when the

component loads?
a) recordid, mode, layout Type, fields

b) recordid, mode, and layout Type or fleits

c) recordid, mode, targetRecord

d) recordid, mode, felds, targetRecord targetEmor

19) Which of the following is NOT an advantage of data replication over data proxies?
a) A replicated data set offloads processing and requests from an origin data

server

b) A replicated data set is always and immediately in sync with the origin

data
c) A replicated data set reduces data access latency d) A replicated data set supports bidirectional
writes..

20) You can use Salesforce Connect to proxy which types of data sources:

a) OData 2.0 and 4.0


b) REST with JSON payloads

c) REST with XML payloads


d) SOAP
e) All of the above

21) Which technology do Salesforce REST APIs use for authentication?

a) Pre-shared keys
b) Basic usernames and passwords

c) OAuth

d) SAML

22) Callouts from Salesforce to Heroku can be made using:

a) Web sockets

b) Apex triggers or outbound messages

c) Message bus
d) Corba

23) The API-first approach to development at salesforce lets customers:


a) Extend functionality across Salesforce features
b) Choose the API that's best suited to their needs
c) Build apps for the AppExchange
d) All of the above

24) REST API is best suited for which of these use cases?

a) Loading lots of data into your org for the first time
b) Writing a mobile or web app

c) Deleting 100,000 records at once

d) Pushing notifications whenever data is changed

25) SOAP API is best suited for which of these use cases?

a) Building a server-to-server integration

b) Writing an app that requires using JSON

c) Updating thousands of records at once

d) Building a slick UI for a mobile app

26) Bulk API is best suited for which of these use cases?

a) Deleting several records, one record at a time


b) Writing a mobile chat app

c) Building a new Salesforce UI

d) Deleting 100,000 records at once

27) Streaming API is best suited for which of these use cases?
a) Notifying users whenever a record is deleted
b) Creating hundreds of account records at once
c) Writing an app where the use of XML is required

d) Using a WSDL file to specify the operations allowed on standard and custom
objects

28) What are all the factors that contribute to the total API limit calculation?
a) Org edition and API usage over the previous month

b) Org edition, license type, and expansion packs


c) License type and expansion packs

d) Number of Salesforce employees swabbing the deck

29) You can use Heroku connect for:

a) One-way data replication


b) Bidirectional data replication
c) Data proxy with Salesforce Connect
d) All the above

30) How does Heroku Connect work with Salesforce Authentication?

a) A single integration user's credentials are stored.

b) OAuth provides Heroku Connect with API tokens after the user authorizes the

Heroku Connect application on Salesforce

c) SAML authorizes Heroku Connect to make API calls.

d) The end user of a Heroku app authorizes Heroku Connect via OAuth.
31) Heroku Connect data replication happens:

a) Instantly in both directions

b) Near real time in both directions

c) Near real time for writes to Salesforce, and on a 30-second polling window for
writes to Heroku Postgres

d) Near real time for writes to Salesforce, and either on a polling window or near

real time for writes to Heroku Postgres (depending on the user configuration)

32) Salesforce Connect is used for:


a) Developing ETL services

b) Replicating external data into Salesforce

c) Proxying external data into Salesforce


d) Bidirectional syncing of external data in Salesforce

33) Salesforce Connect custom adapters support:

a) Cross-object relationships

b) Data paging
c) Search
d) All of the above

34) Which of the following is NOT an advantage of Salesforce Connect over ETL?

a) The data is always fetched on demand.

b) If the origin is offline, the data is still available via Salesforce Connect
c) Standard protocols like OData can easily proxy external data into Salesforce.

d) Data security can be enforced using per-user or per-application authentication

35) True or false: You can integrate identity providers with Salesforce using connected apps.

a) True
b) False

36) How is OpenID Connect different from SAML a) You can't use Openld Connect to enable SSO
between two services

b) You can only use Openld Connect to enable SSO between two services.
c) Openld Connect is built for today's API economy because it adds an authentication layer on top of
OAuth 20
d) B and C

37) Which of the following scenarios describes how you can use a connected app?

a) Users can create their own connected apps to access their personal email
accounts.
b) Users can log in to an external application with their Salesforce or Experience
Cloud credentials
c) Users can authorize a mobile app to securely access defined Salesforce data on
their behalf.
d) B and C

38) What's the difference between a connected app developer and a connected app admin?
a) Only developers can set policies that explicitly define who can use connected
apps and where they can access the apps from...
b) Only admins can set policies that explicitly define who can use connected apps
and where they can access the apps from
c) There isn't a difference between developers and admins when it comes connected apps I
to
d) Only developers use connected apps. Admins have no role with connected apps

39) What type of jobs do not show up in the Apex Flex Queue.

a) Future Method Jobs


b) Batch Apex Jobs
c) Queueable Apex Jobs
d) Scheduled Apex Jobs

40) Which statement is true regarding the Flex Queue

a) You can submit up to 200 batch jobs for execution.

b) Jobs are processed first-in-first-out.

c) Jobs can only be scheduled during Taco Tuesdays

d) Jobs are executed depending upon user license.

41) True or false: Dynamic client registration enables resource servers to dynamically create
client apps as connected apps.

a) True
b) False

42) What role does your Salesforce org play in providing authorization for external API

gateways?
a) My Salesforce org requests the creation of client apps as connected apps from

the external API gateway.


b) My Salesforce org hosts the protected data
c) My Salesforce org is the OAuth authorization server that protects resources
hosted on an external API.
d) My Salesforce org asks the external API gateway to authenticate a client app

43) Which of the following ISV features are available in Lightning Experience?

a) Trialforce
b) Usage Metrics Visualization app.
c) Package creation.
d) None of the above are available.

44) As an ISV, which of the following is true about AppExchange:

a) Your apps undergo a review for Lightning Experience readiness.


b) Your apps are available to all customers, whether they have enabled Lightning
Experience or not.
c) The 'Lighting Ready' sash lets AppExchange visitors know your app is verified forLighting Experience

d) All of the above

45) Which of the following is true of Apex in the new Lightning Experience:

a) You have to update the API version for all your Apex classes in order for them to

work in Lightning Experience.

b) Apex is not supported in the new Lightning Experience.


c) Your Apex code and queries continue to function as before.
d) All of the above

46) What should you look for when reviewing your installed packages before using them with

Lightning Experience?

a) A 'Lightning Ready' sash for the package on AppExchange.


b) An error message saying the package isn't 'Lightning Ready'.

c) A 'Lightning Ready' check mark on the Installed Packages page.

d) Errors in the JavaScript console when using the package.

47) The primary benefit of a workflow outbound message over an Apex trigger is:

a) The message can deliver the payload only as SOAP.


b) The message supports different authentication mechanisms
c) Messages are completely declarative.

d) The message can handle every database event.

48) Callouts in Apex trigger support which authentication mechanisms:

a) Pre-shared keys I
b) Username and password credentials
c) OAuth flows using named credentials in the Remote Site settings

d) All of the above

49) Heroku apps that handle callouts from Salesforce can be written in:

a) Node js/ JavaScript

b) Java, Scala, Clojure

c) Python

d) PHP

e) All of the above

50) Canvas apps can authenticate a user with:


a) Username and password

b) OAuth

c) Signed request
d) Either OAuth or signed request

51) You can build Canvas apps and run them on Heroku with of the following languages:

a) Node.js / JavaScript

b) Java, Scala, Clojure

c) Python

đ) PHP

e) All of the above

52) The best use of Canvas apps is to:


a) Display real estate photos in Salesforce for house listings

b) Render custom widgets on Chatter feeds

c) Display third-party apps in Salesforce

d) All of the above

53) Which of the following statements about Lightning Components and Lightning
Experience is true?
a) Lightning Experience is something you use directly, Lightning Components are
something you build apps with.
b) Lightning Experience is (mostly) built with Lightning Components.
c) Lightning Experience uses an app-centric development model using Lightning
Components.

d) All of the above

54) Which of the following is true of Aura Components:

a) Aura Components can only be used in the Lightning Experience and not the Salesforce mobile app

b) Aura Components can be used in Visualforce pages


c) Aura Components are only optimized for the desktop experience

d) All of the above

55) Applications on Heroku that use Salesforce REST APIs can use which authentication
mechanisms.
a) Anonymous access without credentials on trusted networks
b) Username and password with an OAuth connected app
c) OAuth web or user-agent flow in which the user authorizes a connected app
using browser redirects
d) B and C
e) A and C

56) You can use the Salesforce REST APIs to:


a) Insert or update records
b) Execute processes as another user
c) Access database log files
d) Feed your kitten

57) Streaming API's push paradigm lets you:


a) Create more records in a single API call
b) Use SOSL to listen for event notifications
c) Avoid making unnecessary API requests by listening for notifications rather than
polling for data

d) Write code from the crow's nest of a pirate ship

58) What is the second generation of Push Topic events?

a) Platform events
b) Generic streaming events
c) Change data capture events
d) The event bus

59) Which replay option specifies that the subscriber receives event notifications with replay IDs 6, 7, 8,
and 9?
a) 6
b) 5
c) -2
d) -1

60) Which of the following SOQL query a valid pushtopic query? SELECT Name, Phone

FROM Contact WHERE MailingCity="Indianapolis'


a) WHERE clauses aren't supported for Push Topics
b) The SELECT statement doesn't include an ID
c) Contact isn't a supported object for push Topic queries

d) The query is valid

61) What channel name corresponds to a platform event that you defined with the label of

solar panel event?

a) /event/Solar_panel_Event
b) /topic/Solar_panel_Event
c) /event/Solar_panel_Event C

d) /event/Solar panel Event

e) /event/Solar_ panel_Event_e

62) How do you broadcast a message with generic streaming?


a) Create a generic streaming channel, and then POST a request to
StreamingChannel/<streaming channel ID>/push

b) Create a Push Topic, and then POST a request to /Push Topic/<PushTopic/d>push c) POST a request to
/PushTopic/Push

d) POST a request to /StreamingChannel/push

63) Which of the following features of Visualforce do NOT work in Lightning Experience?

a) Creating custom apps and tabs


b) Overriding standard actions with Visualforce pages

c) Using window location in JavaScript code


d) Remote Objects

64) Which of the following is NOT true about the user interface and visual design in

Lightning Experience:

a) PDFs render with the Lightning Experience visual design


b) You can't hide the Lightning Experience main navigation header or sidebar
c) The <apex:inputField> tag renders with the Salesforce Classic appearance

d) The Standard Visualforce header and sidebar are hidden

Which of the following statements is true about creating apps with visualforce:
a) Visualforce is designed primarily for page-centric web apps.
b) Visualforce renders the page on the server.

c) Visualforce will be fully supported by Salesforce for years to come.


d) All of the above

66) Which of the following statements is NOT true about creating apps with Lightning

components:

a) Lightning components are designed primarily for app-centric web apps.

b) Lightning components can be used everywhere Visualforce can be used.

c) Lightning components render the page on the client.


d) All of the above

67) Which of the following is a poor use of Lightning Components:


a) Developing an app for Salesforce1.

b) Developing a highly interactive app with an innovative user interface.


c) Developing widgets for use in Lightning App Builder.
d) None of the above. All of these are good use cases for Lightning Components.

68) Which attribute of force:recordData is set to a localized error message if an error occurs

on loading a component?

a) targetFields
b) targetError

c) Error

d) fieldsError
69) My Domain is NOT required at the very beginning to develop with Lightning Components?

a) True

b) False

70) Which tool you will use to add a lightning component on a record page?

a) Flow Builder b) Report Builder

c) Form Builder
d) App Builder

71) Select the inappropriate reason from the following to integrate apps on Heroku with salesforce:

a) Data replication

b) Data proxies

c) Data Security
d) Custom user interfaces

72) Which are two types of SOAP API WSDLS provided by Salesforce? (Select 2)

a) Company WSDL
b) Enterprise WSDL

c) Partner WSDL
d) Person WSDL

73) SOAP web services are commonly used for:

a) Simple, light weight services that are typically stateless.


b) Public APIs that use HTTP and JSON.
c) Enterprise apps that require a formal exchange format or stateful operations.
d) No one uses SOAP any longer

74) Which type of app enables an external application to integrate with Salesforce using API

and standard protocols? a) Salesforce app

b) Service app

c) Connected app

d) External app

75) Which of the following statements is true about external gellouts: a) SOAP callouts use xml and may
use a wsdl for code generation.

b) HTTP callouts typically use JSON but can use XML as well.

c) HTTP callouts are generally easier to work with than SOAP callouts,

d) All of the above

76) A developer, Andrew would like to execute or run jobs sequentially. Suggest which would

be the appropriate class?

a) Queueable

b) Database Batchable

c) Database Stateful d) Database.Iterable

77) A developer would like to bypass the total number of records retrieved by SOQL queries in the start
method. Which class object you would suggest to use?

a) Database.QueryLocator
b) Iterable

c) Database QueryRecords
d) Database.Iterable

78) A developer want to send JSON data through a POST request in the web service. Which

request header should be set to JSON?

a) Data-Type
b) Endpoint

c) Content-Type

d) body

79) Identify the invalid trigger event from the following

a) Before undelete
b) After insert

c) Before update
d) After delete

80) Which annotation you will use to declare a method as test method?

a) "@isTest”

b) "@future

c) "@Rest
d) "@TestMethod"

81) Which class contains the RestRequest and RestResponse objects in RESTful
webservice?

a) RestHttp

b) RestContent
c) RestContext

d) RestContainer

82) Which of the following attribute is used to map the URL pattern to RestResource annotation?

a) urlPattern

b) urlText

c) uriMap

d) urlMapping
83) How many maximum number of Apex jobs we could schedule at one time?

a) 50
b) 100

c) 150

d) 200

84) Identify the correct apex class which allows to submit jobs for asynchronous processing

with member variables of Non-primitive types?

a) AsyncApex
b) Stateful
c) Batchable

d) Queueable

85) Select the second generation of event products related to streaming API. (Select 2)

a) Change Data Capture


b) PushTopic Events

c) Generic Streaming Events

d) Platform Events

86) A Developer, Brian, would like to create an optimized WSLD for use with many salesforce org. Which
type of WSDL should he create?
a) Company WSDL
b) Person WSDL
c) Enterprise WSDL
d) Partner WSDL

87) Identify the correct the attribute of force:recordData component which determines what operations
are available to perform with the record

a) Mode
b) recordID
c) Fields
d) LayoutType

88) Identify the invalid HTTP method from the following

a) UNDELETE

b) GET
c) POST
d) DELETE
e) PUT

89) A developer called a web service from an apex code. Which response status code she should check
to ensure that the request is successful?

a) 500

b) 404
c) 201
d) 200

90) A developer is loading a record from the database using force recordData component. Which
attribute is populated with the loaded record?

a) tagetFields
b) targetRecord

c) targetError

d) targetRow

91) What should be the minimum code coverage % before deploying an apex code?

a) 71
b) 73
c) 75

d) 72

92) Select the inappropriate method from the following which informs the runtime that mock

callouts are used in the test method


a) Test.runAs

b) Test setMock

c) Test Mock

d) Test startTest

93) To make a Lightning component available for any type of page, it must implement which interface?

a) flexipage:availableForAllPageTypes
b) flexipage availableForPageTypes

c) flexipage:availableForAllTypes

d) flexipage:ForAllPageTypes

94) Which annotation will be used to expose an apex class as REST resource?

a) “@”RestResource

b) "@"ResourceRest

c) "@HttpResource

d) "@"RestHttp

95) Which method causes the entire set of operations to be rolled back?
a) error()

b) showError()
c) isError()
d) addError()

96) To get a fresh set of governor limits in an apex test class, which method shall be used?

a) Test.runAs
b) Test.setMock
c) Test.startTest and Test stop Test

d) Test.assert

97) A developer like to monitor the progress of future jobs. Suggest the correct way.
a) From setup, select Apex Jobs

b) Query Cron Trigger to find future job

c) Query AsyncApexJob to find future job


d) Query CronJobDetail to find future job

98) Below given is the controller code for a component. Identify what is missing in the code. Public with
sharing class ExpensesController( Public static List<Expense c> getExpenses(){

Return (SELECT Id, Name, Amount c, Client c, Date _c, Reimbursed c, CreatedDate

FROM Expenses c);

a) @AuraEnabled annotation for getExpense()

b) AllowAccess annotation for getExpense())


c) @isTest annotation for getExpense() d) '@'Aura annotation for getExpense()

99) A component has an attribute message. Select the appropriate statement to set the value of
message from client-controller method with newMessage. handleClick2
function(component,event,helper){

var newMessage = event.getSource().get("v.label");


console.log("handleClick2 Message:+newMessage);

//Add correct statement below

a) component set("message",newMessage);

b) component.set("(!v.message)" newMessage);
c) component.set("v.message" newMessage);

d) component.get("v.message",newMessage);

100) A Developer, Amy, would like to create an optimized WSLD for a single salesforce

org. Which type of WSDL should she create?

e) Company WSDL

1) Person WSDL
g) Enterprise WSDL

h) Partner WSDL
101) A Lightning component developer want to fetch data of a custom object Review_c from database
and want to display on a component. What type of controller should be used?

a) Standard List Controller

b) Extension Controller
c) Client-side Controller with Server-side Controller
d) Standard Controller

102) Identify the correct trigger variable which shows the currently executing code

in apex trigger.

a) isinsert
b) isExecuting
c) isAfter

d) isDelete

104) Which of following API is based on REST principles and is optimized for working with

larger sets of data?

a) Bulk Api
b) SOAP Api

c) Streaming Api

d) None of the above

105) To start the batch processing, we have to use which of the following method?

a) Database

b) Database.executeBatch

c) Database

d) Database

106) Which of the following annotation you will add to your method to expose it as a REST Resource
that can be called by an HTTP GET request? I

a) "@HttpPost

b)”@” HttpGet
c) "@HttpPut

d) "@HttpDelete
107) Which of the following is NOT the use of future methods?
a) Callout to external Web Services

b) Isolating DML operations on different sObject types prevent mixed DML error
c) Override organization-wide sharing defaults

d) Resource intensive calculation or processing of records

108) Which are three methods of Heroku and Salesforce Integration? (Select

a) Heroku Connect
b) Salesforce SOAP APIs.
c) Salesforce REST APIs
d) Callouts.
E)Canvas

109) Suggest an attribute to a developer to declare that the component handles the event

after changes in the record


a) recordEdited

b) recordData

c) recordUpdated

d) recordChanges

110) Below given is the controller code for a component. How would a component use this controller?
Select the appropriate option. Public with sharing class ExpenseController{

//Some code here...


a) <aura:component standardController='ExpenseController'>

b) <aura.component controller="ExpenseController'>
c) <aura:component implements=’ ExpenseController'>

d) <aura:component class='ExpenseController>

111) Select the benefit of Apex Unit tests


a) Ensuring the apex classes and triggers work as expected

b) Meeting the code coverage requirements

c) High quality apps delivered to the production org


d)All of the above

112) State TRUE or FALSE.


By default the org data is accessible in test methods.
a) True
b) False

113)Question don't know

a) Place the callout method in an asynchronous method that is annotated with

@future(callout=true)
b) Place the callout method in an asynchronous method that is annotated with

@future

c) Place the callout method in an asynchronous method that is annotated with @HttpGet(callout=true)

d) Place the callout method in an asynchronous method that is annotated with @HttpPost(callout=true)
1) True or false: OAuth 2.0 APIs enable a user to work in one app but see the data from
another.
a) True
b) False

2) You're creating a connected app that allows a Smart TV to display a customer's movie
order history. Which OAuth 2.0 flow would you use for the connected app?
a) OAuth 2.0 web server flow
b) OAuth 2.0 device flow
c) OAuth 2.0 JSON Web Token Exchange (JWT) bearer flow
d) OAuth 2.0 user agent flow

3) What is a key benefits of asynchronous processing?


a) Higher governor and execution limits
b) Unlimited number of external callouts
c) Override organization-wide sharing defaults
d) Enabling turbo mode for transactional processing

4) Batch Apex is typically the best type of asynchronous processing when you want to:
a) Make a callout to a web service when a user updates a record.
b) Schedule a task to run on a weekly basis.
c) Update all records in your org.
d) Send a rickroll email to a contact

5) Which tools are included with the Salesforce Flow product?


a) Lightning Experience and Flow Builder
b) Lightning App Builder and Process Builder
c) Flow Builder and Process Builder
d) Flow Builder, Process Builder and Approvals

6) Which declarative tool would you use for the following use case? Guide customers
through the process of troubleshooting issues with your product.
a) Flow Builder
b) Approvals
c) Apex

7) Which declarative tool would you use for the following use case? When an opportunity's
discount is higher than 40%, notify the CEO via email and request sign-off. Provide a
way for the CEO to leave comments.
a) Flow Builder
b) Approvals
c) Apex
8) Which declarative tool would you use for the following use case? When the Annual
Revenue field exceeds $500,000 on an account, automatically update the Customer
Priority field to High.
a) Flow Builder
b) Approvals
c) Apex

9) What does SLDS stand for?


a) Salesforce Leadership Does Surf
b) System Limits Detection System
c) Salesforce Lightning Design System
d) sObject Loading Data System

10) What are Lightning Events used for?


a) Salesforce mini developer conferences
b) Communicating between loosely coupled components
c) Logging critical details during app runtime
d) Scheduling sales calls in Lightning Experience

11) What is the name of the framework that includes Aura components?
a) Lightning Components
b) Angular
c) jQuery
d) WebObjects

12) In which language do you write Aura components action handlers?


a) Java
b) VisualForce
c) JavaScript
d) Objective-C

13) Which of the following descriptions about the Lightning Component framework is true?
a) It’s a UI framework for developing web apps for mobile and desktop devices.
b) It uses JavaScript on the client-side and Apex on the server-side.
c) It’s a modern framework for building single-page applications.
d) All of the above

14) What can you build with the Lightning Component framework?
a) Standalone app
b) Components to use inside Visualforce pages
c) Drag-and-drop components for Lightning App Builder
d) All of the above
15) How is the Lightning Component framework different from other web app frameworks?
a) It is optimized for both mobile and desktop experiences and proves it with
Salesforce1 and Lightning Experience.
b) It connects natively with services provided by the Salesforce platform.
c) It has specific opinions about how data access is performed and has specific
security requirements.
d) All of the above

16) What is Lightning data service?


a) A set of UI elements that displays record data
b) A subset of Visualforce
c) Lightning’s data layer
d) A cloud-based storage and hosting service

17) What are the benefits of adopting LDS?


a) Fewer XHRs
b) Shared record data across components
c) Local offline cache
d) All the above

18) What attributes are required when using force:recordData to load a record when the
component loads?
a) recordId, mode, layoutType, fields
b) recordId, mode, and layoutType or fields
c) recordId, mode, targetRecord
d) recordId, mode, fields, targetRecord, targetError

19) Which of the following is NOT an advantage of data replication over data proxies?
a) A replicated data set offloads processing and requests from an origin data
server.
b) A replicated data set is always and immediately in sync with the origin
data.
c) A replicated data set reduces data access latency.
d) A replicated data set supports bidirectional writes.

20) You can use Salesforce Connect to proxy which types of data sources:
a) OData 2.0 and 4.0
b) REST with JSON payloads
c) REST with XML payloads
d) SOAP
e) All of the above
21) Which technology do Salesforce REST APIs use for authentication?
a) Pre-shared keys
b) Basic usernames and passwords
c) OAuth
d) SAML

22) Callouts from Salesforce to Heroku can be made using:


a) Web sockets
b) Apex triggers or outbound messages
c) Message bus
d) Corba

23) The API-first approach to development at salesforce lets customers:


a) Extend functionality across Salesforce features
b) Choose the API that’s best suited to their needs
c) Build apps for the AppExchange
d) All of the above

24) REST API is best suited for which of these use cases?
a) Loading lots of data into your org for the first time
b) Writing a mobile or web app
c) Deleting 100,000 records at once
d) Pushing notifications whenever data is changed

25) SOAP API is best suited for which of these use cases?
a) Building a server-to-server integration
b) Writing an app that requires using JSON
c) Updating thousands of records at once
d) Building a slick UI for a mobile app

26) Bulk API is best suited for which of these use cases?
a) Deleting several records, one record at a time
b) Writing a mobile chat app
c) Building a new Salesforce UI
d) Deleting 100,000 records at once

27) Streaming API is best suited for which of these use cases?
a) Notifying users whenever a record is deleted
b) Creating hundreds of account records at once
c) Writing an app where the use of XML is required
d) Using a WSDL file to specify the operations allowed on standard and custom
objects
28) What are all the factors that contribute to the total API limit calculation?
a) Org edition and API usage over the previous month
b) Org edition, license type, and expansion packs
c) License type and expansion packs
d) Number of Salesforce employees swabbing the deck

29) You can use Heroku connect for:


a) One-way data replication
b) Bidirectional data replication
c) Data proxy with Salesforce Connect
d) All the above

30) How does Heroku Connect work with Salesforce Authentication?


a) A single integration user’s credentials are stored.
b) OAuth provides Heroku Connect with API tokens after the user authorizes the
Heroku Connect application on Salesforce.
c) SAML authorizes Heroku Connect to make API calls.
d) The end user of a Heroku app authorizes Heroku Connect via OAuth.

31) Heroku Connect data replication happens:


a) Instantly in both directions
b) Near real time in both directions
c) Near real time for writes to Salesforce, and on a 30-second polling window for
writes to Heroku Postgres
d) Near real time for writes to Salesforce, and either on a polling window or near
real time for writes to Heroku Postgres (depending on the user configuration)

32) Salesforce Connect is used for:


a) Developing ETL services
b) Replicating external data into Salesforce
c) Proxying external data into Salesforce
d) Bidirectional syncing of external data in Salesforce

33) Salesforce Connect custom adapters support:


a) Cross-object relationships
b) Data paging
c) Search
d) All of the above

34) Which of the following is NOT an advantage of Salesforce Connect over ETL?
a) The data is always fetched on demand.
b) If the origin is offline, the data is still available via Salesforce Connect.
c) Standard protocols like OData can easily proxy external data into Salesforce.
d) Data security can be enforced using per-user or per-application authentication.
35) True or false: You can integrate identity providers with Salesforce using connected apps.
a) True
b) False

36) How is OpenID Connect different from SAML?


a) You can’t use OpenId Connect to enable SSO between two services.
b) You can only use OpenId Connect to enable SSO between two services.
c) OpenId Connect is built for today’s API economy because it adds an
authentication layer on top of OAuth 2.0
d) B and C

37) Which of the following scenarios describes how you can use a connected app?
a) Users can create their own connected apps to access their personal email
accounts.
b) Users can log in to an external application with their Salesforce or Experience
Cloud credentials
c) Users can authorize a mobile app to securely access defined Salesforce data on
their behalf.
d) B and C

38) What’s the difference between a connected app developer and a connected app admin?
a) Only developers can set policies that explicitly define who can use connected
apps and where they can access the apps from.
b) Only admins can set policies that explicitly define who can use connected apps
and where they can access the apps from.
c) There isn’t a difference between developers and admins when it comes to
connected apps
d) Only developers use connected apps. Admins have no role with connected apps

39) What type of jobs do not show up in the Apex Flex Queue.
a) Future Method Jobs
b) Batch Apex Jobs
c) Queueable Apex Jobs
d) Scheduled Apex Jobs

40) Which statement is true regarding the Flex Queue.


a) You can submit up to 200 batch jobs for execution.
b) Jobs are processed first-in-first-out.
c) Jobs can only be scheduled during Taco Tuesdays.
d) Jobs are executed depending upon user license.
41) True or false: Dynamic client registration enables resource servers to dynamically create
client apps as connected apps.
a) True
b) False

42) What role does your Salesforce org play in providing authorization for external API
gateways?
a) My Salesforce org requests the creation of client apps as connected apps from
the external API gateway.
b) My Salesforce org hosts the protected data
c) My Salesforce org is the OAuth authorization server that protects resources
hosted on an external API.
d) My Salesforce org asks the external API gateway to authenticate a client app.

43) Which of the following ISV features are available in Lightning Experience?
a) Trialforce
b) Usage Metrics Visualization app.
c) Package creation.
d) None of the above are available.

44) As an ISV, which of the following is true about AppExchange:


a) Your apps undergo a review for Lightning Experience readiness.
b) Your apps are available to all customers, whether they have enabled Lightning
Experience or not.
c) The 'Lighting Ready' sash lets AppExchange visitors know your app is verified for
Lighting Experience
d) All of the above

45) Which of the following is true of Apex in the new Lightning Experience:
a) You have to update the API version for all your Apex classes in order for them to
work in Lightning Experience.
b) Apex is not supported in the new Lightning Experience.
c) Your Apex code and queries continue to function as before.
d) All of the above

46) What should you look for when reviewing your installed packages before using them with
Lightning Experience?
a) A 'Lightning Ready' sash for the package on AppExchange.
b) An error message saying the package isn't 'Lightning Ready'.
c) A 'Lightning Ready' check mark on the Installed Packages page.
d) Errors in the JavaScript console when using the package.
47) The primary benefit of a workflow outbound message over an Apex trigger is:
a) The message can deliver the payload only as SOAP.
b) The message supports different authentication mechanisms.
c) Messages are completely declarative.
d) The message can handle every database event.

48) Callouts in Apex trigger support which authentication mechanisms:


a) Pre-shared keys
b) Username and password credentials
c) OAuth flows using named credentials in the Remote Site settings
d) All of the above

49) Heroku apps that handle callouts from Salesforce can be written in:
a) Node.js / JavaScript
b) Java, Scala, Clojure
c) Python
d) PHP
e) All of the above

50) Canvas apps can authenticate a user with:


a) Username and password
b) OAuth
c) Signed request
d) Either OAuth or signed request

51) You can build Canvas apps and run them on Heroku with of the following languages:
a) Node.js / JavaScript
b) Java, Scala, Clojure
c) Python
d) PHP
e) All of the above

52) The best use of Canvas apps is to:


a) Display real estate photos in Salesforce for house listings
b) Render custom widgets on Chatter feeds
c) Display third-party apps in Salesforce
d) All of the above

53) Which of the following statements about Lightning Components and Lightning
Experience is true?
a) Lightning Experience is something you use directly, Lightning Components are
something you build apps with.
b) Lightning Experience is (mostly) built with Lightning Components.
c) Lightning Experience uses an app-centric development model using Lightning
Components.
d) All of the above

54) Which of the following is true of Aura Components:


a) Aura Components can only be used in the Lightning Experience and not the
Salesforce mobile app
b) Aura Components can be used in Visualforce pages
c) Aura Components are only optimized for the desktop experience
d) All of the above

55) Applications on Heroku that use Salesforce REST APIs can use which authentication
mechanisms:
a) Anonymous access without credentials on trusted networks
b) Username and password with an OAuth connected app
c) OAuth web or user-agent flow in which the user authorizes a connected app
using browser redirects
d) B and C
e) A and C

56) You can use the Salesforce REST APIs to:


a) Insert or update records
b) Execute processes as another user
c) Access database log files
d) Feed your kitten

57) Streaming API’s push paradigm lets you:


a) Create more records in a single API call
b) Use SOSL to listen for event notifications
c) Avoid making unnecessary API requests by listening for notifications rather than
polling for data
d) Write code from the crow’s nest of a pirate ship

58) What is the second generation of PushTopic events?


a) Platform events
b) Generic streaming events
c) Change data capture events
d) The event bus

59) Which replay option specifies that the subscriber receives event notifications with replay
IDs 6, 7, 8, and 9?
a) 6
b) 5
c) -2
d) -1

60) Which of the following SOQL query a valid pushtopic query? SELECT Name, Phone
FROM Contact WHERE MailingCity=’Indianapolis’
a) WHERE clauses aren’t supported for PushTopics
b) The SELECT statement doesn’t include an ID
c) Contact isn’t a supported object for pushTopic queries
d) The query is valid

61) What channel name corresponds to a platform event that you defined with the label of
solar panel event?
a) /event/Solar_panel_Event
b) /topic/Solar_panel_Event
c) /event/Solar_panel_Event__c
d) /event/Solar panel Event
e) /event/Solar_panel_Event__e

62) How do you broadcast a message with generic streaming?


a) Create a generic streaming channel, and then POST a request to
/StreamingChannel/<streaming channel ID>/push
b) Create a PushTopic, and then POST a request to /PushTopic/<PushTopicId>push
c) POST a request to /PushTopic/Push
d) POST a request to /StreamingChannel/push

63) Which of the following features of Visualforce do NOT work in Lightning Experience?
a) Creating custom apps and tabs
b) Overriding standard actions with Visualforce pages
c) Using window location in JavaScript code
d) Remote Objects

64) Which of the following is NOT true about the user interface and visual design in Lightning
Experience:
a) PDFs render with the Lightning Experience visual design
b) You can’t hide the Lightning Experience main navigation header or sidebar
c) The <apex:inputField> tag renders with the Salesforce Classic appearance
d) The Standard Visualforce header and sidebar are hidden

65) Which of the following statements is true about creating apps with visualforce:
a) Visualforce is designed primarily for page-centric web apps.
b) Visualforce renders the page on the server.
c) Visualforce will be fully supported by Salesforce for years to come.
d) All of the above
66) Which of the following statements is NOT true about creating apps with Lightning
components:
a) Lightning components are designed primarily for app-centric web apps.
b) Lightning components can be used everywhere Visualforce can be used.
c) Lightning components render the page on the client.
d) All of the above

67) Which of the following is a poor use of Lightning Components:


a) Developing an app for Salesforce1.
b) Developing a highly interactive app with an innovative user interface.
c) Developing widgets for use in Lightning App Builder.
d) None of the above. All of these are good use cases for Lightning Components.
—----------------------------------------------------------------------------------------------------------------------------

68) Which attribute of force:recordData is set to a localized error message if an error occurs
on loading a component?
a) targetFields
b) targetError
c) Error
d) fieldsError

69) My Domain is NOT required at the very beginning to develop with Lightning
Components?
a) True
b) False

70) Which tool you will use to add a lightning component on a record page?
a) Flow Builder
b) Report Builder
c) Form Builder
d) App Builder

71) Select the inappropriate reason from the following to integrate apps on Heroku with
salesforce:
a) Data replication
b) Data proxies
c) Data Security
d) Custom user interfaces

72) Which are two types of SOAP API WSDLs provided by Salesforce? (Select 2)
a) Company WSDL
b) Enterprise WSDL
c) Partner WSDL
d) Person WSDL
73) SOAP web services are commonly used for:
a) Simple, light weight services that are typically stateless.
b) Public APIs that use HTTP and JSON.
c) Enterprise apps that require a formal exchange format or stateful operations.
d) No one uses SOAP any longer

74) Which type of app enables an external application to integrate with Salesforce using API
and standard protocols?
a) Salesforce app
b) Service app
c) Connected app
d) External app

75) Which of the following statements is true about external callouts:


a) SOAP callouts use xml and may use a wsdl for code generation.
b) HTTP callouts typically use JSON but can use XML as well.
c) HTTP callouts are generally easier to work with than SOAP callouts.
d) All of the above.

76) A developer, Andrew would like to execute or run jobs sequentially. Suggest which would
be the appropriate class?
a) Queueable
b) Database.Batchable
c) Database.Stateful
d) Database.Iterable

77) A developer would like to bypass the total number of records retrieved by SOQL queries
in the start method. Which class object you would suggest to use?
a) Database.QueryLocator
b) Iterable
c) Database.QueryRecords
d) Database.Iterable

78) A developer want to send JSON data through a POST request in the web service. Which
request header should be set to JSON?
a) Data-Type
b) Endpoint
c) Content-Type
d) body

79) Identify the invalid trigger event from the following


a) Before undelete
b) After insert
c) Before update
d) After delete

80) Which annotation you will use to declare a method as test method?
a) “@isTest”
b) “@future”
c) “@Rest”
d) “@TestMethod”

81) Which class contains the RestRequest and RestResponse objects in RESTful
webservice?
a) RestHttp
b) RestContent
c) RestContext
d) RestContainer

82) Which of the following attribute is used to map the URL pattern to RestResource
annotation?
a) urlPattern
b) urlText
c) urlMap
d) urlMapping

83) How many maximum number of Apex jobs we could schedule at one time?
a) 50
b) 100
c) 150
d) 200

84) Identify the correct apex class which allows to submit jobs for asynchronous processing
with member variables of Non-primitive types?
a) AsyncApex
b) Stateful
c) Batchable
d) Queueable

85) Select the second generation of event products related to streaming API. (Select 2)
a) Change Data Capture
b) PushTopic Events
c) Generic Streaming Events
d) Platform Events

86) A Developer, Brian, would like to create an optimized WSLD for use with many
salesforce org. Which type of WSDL should he create?
a) Company WSDL
b) Person WSDL
c) Enterprise WSDL
d) Partner WSDL

87) Identify the correct the attribute of force:recordData component which determines what
operations are available to perform with the record
a) Mode
b) recordID
c) Fields
d) LayoutType

88) Identify the invalid HTTP method from the following


a) UNDELETE
b) GET
c) POST
d) DELETE
e) PUT

89) A developer called a web service from an apex code. Which response status code she
should check to ensure that the request is successful?
a) 500
b) 404
c) 201
d) 200

90) A developer is loading a record from the database using force:recordData component.
Which attribute is populated with the loaded record?
a) tagetFields
b) targetRecord
c) targetError
d) targetRow

91) What should be the minimum code coverage % before deploying an apex code?
a) 71
b) 73
c) 75
d) 72

92) Select the inappropriate method from the following which informs the runtime that mock
callouts are used in the test method
a) Test.runAs
b) Test.setMock
c) Test.Mock
d) Test.startTest
93) To make a Lightning component available for any type of page, it must implement which
interface?
a) flexipage:availableForAllPageTypes
b) flexipage:availableForPageTypes
c) flexipage:availableForAllTypes
d) flexipage:ForAllPageTypes

94) Which annotation will be used to expose an apex class as REST resource?
a) “@”RestResource
b) “@”ResourceRest
c) “@”HttpResource
d) “@”RestHttp

95) Which method causes the entire set of operations to be rolled back?
a) error()
b) showError()
c) isError()
d) addError()

96) To get a fresh set of governor limits in an apex test class, which method shall be used?
a) Test.runAs
b) Test.setMock
c) Test.startTest and Test.stopTest
d) Test.assert

97) A developer like to monitor the progress of future jobs. Suggest the correct way.
a) From setup, select Apex Jobs
b) Query CronTrigger to find future job
c) Query AsyncApexJob to find future job
d) Query CronJobDetail to find future job

98) Below given is the controller code for a component. Identify what is missing in the code.
Public with sharing class ExpensesController{
Public static List<Expense__c> getExpenses(){
Return [SELECT Id, Name, Amount__c, Client__c, Date__c,
Reimbursed__c, CreatedDate
FROM Expenses__c];
}
}
a) ‘@’AuraEnabled annotation for getExpense()
b) ‘@’AllowAccess annotation for getExpense()
c) ‘@’isTest annotation for getExpense()
d) ‘@’Aura annotation for getExpense()
99) A component has an attribute message. Select the appropriate statement to set the
value of message from client-controller method with newMessage.
handleCLick2:function(component,event,helper){
var newMessage = event.getSource().get(“v.label”);
console.log(“handleClick2:Message:”+newMessage);
//Add correct statement below
—--------------------------------
}
a) component.set(“message”,newMessage);
b) component.set(“{!v.message}”,newMessage);
c) component.set(“v.message”,newMessage);
d) component.get(“v.message”,newMessage);

100) A Developer, Amy, would like to create an optimized WSLD for a single salesforce
org. Which type of WSDL should she create?
e) Company WSDL
f) Person WSDL
g) Enterprise WSDL
h) Partner WSDL

101) A Lightning component developer want to fetch data of a custom object Review__c
from database and want to display on a component. What type of controller should be
used?
a) Standard List Controller
b) Extension Controller
c) Client-side Controller with Server-side Controller
d) Standard Controller

102) Identify the correct trigger variable which shows the currently executing code in apex
trigger.
a) isInsert
b) isExecuting
c) isAfter
d) isDelete

103) Select the appropriate option to fill in the blanks which should call the client-side
controller method by clicking on a button of a component
greet.cmp
<div>
<lightning:button labels=”You look nice today”
onClick =”-----------”/>
</div>
greet.js
{
handleClick : function(comp,event,helper){
alert(‘Welcome’);
}
}
a) {!handleClick}
b) {!c.handleClick}
c) {c.handleClick}
d) {!chandleClick}

104) Which of following API is based on REST principles and is optimized for working with
larger sets of data?
a) Bulk Api
b) SOAP Api
c) Streaming Api
d) None of the above

105) To start the batch processing, we have to use which of the following method?
a) Database
b) Database.executeBatch
c) Database
d) Database

106) Which of the following annotation you will add to your method to expose it as a REST
Resource that can be called by an HTTP GET request?
a) “@”HttpPost
b) “@”HttpGet
c) “@”HttpPut
d) “@”HttpDelete

107) Which of the following is NOT the use of future methods?


a) Callout to external Web Services
b) Isolating DML operations on different sObject types prevent mixed DML error
c) Override organization-wide sharing defaults
d) Resource intensive calculation or processing of records

108) Which are three methods of Heroku and Salesforce Integration? (Select 3)
a) Heroku Connect.
b) Salesforce SOAP APIs.
c) Salesforce REST APIs
d) Callouts.
e) Canvas.

109) Suggest an attribute to a developer to declare that the component handles the event
after changes in the record (NOT SURE first marked c)
a) recordEdited
b) recordData
c) recordUpdated
d) recordChanges

110) Below given is the controller code for a component. How would a component use this
controller? Select the appropriate option.
Public with sharing class ExpenseController{
//Some code here…
}
a) <aura:component standardController=’ExpenseController’>
b) <aura:component controller=’ExpenseController’>
c) <aura:component implements=’ExpenseController’>
d) <aura:component class=’ExpenseController’>

111) Select the benefit of Apex Unit tests


a) Ensuring the apex classes and triggers work as expected
b) Meeting the code coverage requirements
c) High quality apps delivered to the production org
d) All of the above

112) State TRUE or FALSE.


By default the org data is accessible in test methods.
a) True
b) False

113) When making a callout from a method, the method waits for external service to send
back the callout response. A developer does not want this behaviour. Suggest the
appropriate solution.
a) Place the callout method in an asynchronous method that is annotated with
@future(callout=true) or use Queueable Apex
b) Place the callout method in an asynchronous method that is annotated with
@future
c) Place the callout method in an asynchronous method that is annotated with
@HttpGet(callout=true)
d) Place the callout method in an asynchronous method that is annotated with
@HttpPost(callout=true)

114) select three different flavours of asynchronous apex ?


a) Batch Apex
b) Future Method
c) Background Queueable
d) Scheduled Apex
115) True or False
Methods with the future annotation must be static methods and can only return a
void type.
a) True
b) False

116) When we start batch apex, which record is created?


a) AsyncJob
b) AsyncApexBatch
c) AsyncApexJob
d) SyncApexJob

117) Consider the following code. Select appropriate statement to print the value of
message attribute.
<aura:component>
<aura:attribute name=”message” type=”String”/>
<p>Hello! --------------------</p>
</aura:component>
a) {v.message}
b) {! message}
c) {message}
d) {!v.message}

118) Which Context variable provides a list of sObjects which we can use only in insert
,update and delete trigger?
a) old
b) oldMap
c) new
d) newMap

119) Which access specifier you will use for a class and methods to publish them as
SOAP web-service?
a) Public, webservice
b) Public, webmethod
c) Global, webmethod
d) Global , webservices

120) Select the form-based component from the following which can be used to display
records only.
a) lightning:recordDisplayForm
b) lightning:recordForm
c) lightning:recordEditForm
d) lightning:recordViewForm

You might also like