0% found this document useful (0 votes)
275 views140 pages

PD 1 v24.4.2 - 250 - SP23 Qj0cce

The document contains a series of practice test questions and answers related to Salesforce development, covering topics such as SalesforceDX, Visualforce, Apex, and Lightning components. Each question includes multiple-choice options and the correct answer is provided. The document serves as a study aid for developers preparing for Salesforce certification exams.
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)
275 views140 pages

PD 1 v24.4.2 - 250 - SP23 Qj0cce

The document contains a series of practice test questions and answers related to Salesforce development, covering topics such as SalesforceDX, Visualforce, Apex, and Lightning components. Each question includes multiple-choice options and the correct answer is provided. The document serves as a study aid for developers preparing for Salesforce certification exams.
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/ 140

CloudCertified Practice Tests

Salesforce PD 1 Practice Tests SP23

Question #:1 When using SalesforceDX, what does a developer need to enable to create and
manage scratch orgs?

A. Production

B. Dev Hub

C. Environment Hub

D. Sandbox

Answer: B

Explanation

https://developer.salesforce.com/docs/atlas.enus.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs.
htm

Question #:2 Which three web technologies can be integrated into a Visualforce page? (Choose
three.)

A. JavaScript

B. CSS

C. Java

D. PHP

E. HTML

Answer: A B E
CloudCertified Practice Tests

Question #:3 A developer needs to have records with specific field values in order to test a new
Apex class.

What should the developer do to ensure the data is available to the test?

A. Use Anonymous Apex to create the required data.

B. UseSOQL to query the org for the required data.

C. Use Test.Loaddata () and reference a static resource.

D. Use Test.Loaddata () and reference a CSV file

Answer: C

Question #:4 Which salesforce org has a complete duplicate copy of theproduction org including
data and configuration?

A. Developer Pro Sandbox

B. Partial Copy Sandbox

C. Production

D. Full Sandbox

Answer: D

Question #:5 Which annotation exposes an Apex class as a RESTful web service?

A. ©AuraEnabled

B. ©RestResource

C. ©Remote Action

D. ©Httplnvocable

Answer: A

Question #:6 What are two use cases for executing Anonymous Apex code? Choose 2 answers

To delete 15,000 inactive Accounts In a single transaction after a deployment

A. To schedule an Apex class to run periodically

B. To run a batch Apex class to update all Contacts

C. To add unit test code coverage to an org

Answer: B C
CloudCertified Practice Tests

Question #:7 Which code should be used to update an existing Visualforce page that uses
standard Visualforce components so that the page matches the look and feel of Lightning
Experience?

A. <apex:page lightningStyleSheets=”true”>

B. <apex:page>

C. <apex:commandButton styleClass="slds-vf-button_brand" value="Refresh the Page">

D. apex:actionStatus

Answer: A

Question #:8 A developer wants to retrieve the Contacts and Users with the email address
'dev@uc.com'.

Which SOSL statement should the developer use?

A. FIND {dev@uc.com} IN Email Fields RETURNING Contact (Email), User (Email)

B. FIND {Email = 'dev@uc.com'} IN Contact, User

C. FIND {Email = 'dev@uc.com'} RETURNING Contact (Email), User (Email)

D. FIND Email IN Contact, User FOR {dev2uc.com}

Answer: A

Question #:9 Which three statements are true regarding custom exceptions in Apex? (Choose
three.)

A custom exception class must extend the system Exception class.

A. Acustom exception class can implement one or many interfaces.

B. A custom exception class cannot contain member variables or methods.

C. A custom exception class name must end with “Exception”.

D. A custom exception class can extend other classes besides the Exception class.
CloudCertified Practice Tests

Answer: B D E

Question #:10 A developer must write an Apex method that will be called from a Lightning
component. The method may delete an Account stored in theaccountRecvariable.

Which method should a developer use to ensure only users that should be able to delete Accounts
can successfully perform deletions?

A. Schema.sObjectType.Account.isDeletable()

B. Account.isDeletable()

C. accountRec.isDeletable()

D. accountRec.sObjectType.isDeletable()

Answer: A

Question #:11

Which Lightning code segment should be written to declare dependencies on a Lightning


component, c:accountList, that is usedin a Visualforce page?

Option A

Option B

Option C

Option D
CloudCertified Practice Tests

Answer: A

Question #:12 A custom object Trainer_c has a lookup field to another custom object Gym

Which SOQL query will get the record forthe Viridian City gym and it's trainers?

A. SELECT Id, (SELECT Id FROM Trainers) FROM Gym_C WHERE Name . Viridian City Gym'

B. SELECT Id, (SELECT Id FROM Trainer_c) FROM Gym_c WHERE Name - Viridian City Gym'

C. SELECT ID FROM Trainer_c WHERE Gym r.Name -Viridian City Gym'

D. SELECT Id, (SELECT Id FROM Trainers) FROM Gym_C WHERE Name - Viridian City Gym'

Answer: A

Question #:13

A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an
entire suite of testallowing them to test independent requirements various types of Salesforce
Cases.

Which approach can efficiently generate the required data for each unit test?

A. Use @TestSetup with a viod method.

B. Create test data before Test.startTest() in the unittest.

C. Add @isTest(seeAllData=true) at the start of the unit test class.

D .Create a nock using the Stud API

Answer: A
CloudCertified Practice Tests

Question #:14

A developer writes a trigger on the Account object on the before update event that increments a
count field. A workflow rule also increments the count field every time that an Account is created or
updated. The field update in the workflow rule is configured to not re-evaluate workflow rules.

What is the value of the count fieldif an Account is inserted with an initial value of zero, assuming no
other automation logic is implemented on the Account?

A. 1

B. 3

C. 4

D. 2

Answer: D

Question #:15 A developer needs to implement a custom SOAP Web Service that is used by an
external Web Application.

The developer chooses to Include helper methods that are not used by the Web Application In the
Implementation of the Web Service Class.

Which code segment shows the correct declaration of the class and methods?
CloudCertified Practice Tests

A. Option A

B. Option B

C. Option C

D. Option D

Answer: C

Question #:16
CloudCertified Practice Tests

A team of many developers work in their own individual orgs that have the same configuration at
the production org. Which type of org is best suited forthis

A. Developer Sandbox

B. Developer Edition

C. Full Sandbox

D. Partner Developer Edition

Answer: A

Question #:17

Since Aura application events follow the traditionalpublish-subscribe model, which method is used
to fire an event?

A. ernit()

B. fireEvent()

C. fire()

D. registerEvent()

Answer: C

Question #:18

A Salesforce Administrator used Flow Builder to create a flownamed ‘’accountOnboarding’’. The flow
must be used inside an Aura component.

Which tag should a developer use to display the flow in the component?

A. Lightning-flow

B. Aura:flow

C. Lightning:flow

D. Aura:flow

Answer: C
CloudCertified Practice Tests

Question #:19

An Apex method,getAccounts, that returns a List of Accounts given a searchTerm, is available for
Lightning Web components to use.

What is the correct definition of a Lightning Web component property that uses
thegetAccountsmethod?

A. Option A

B. Option B

C. Option C

D. Option D

Answer: A

Question #:20

Universal Containersstores Orders and Line Items in Salesforce. For security reason, financial
representatives are allowed to see information on the Order such as order amount, but they are not
allowed to see the Line items on the Order. Which type of relationship should be used?

A. Lookup
CloudCertified Practice Tests

B. Direct Lookup

C. Indirect lookup

D. Master Detail

Answer: A

Question #:21

A developer wants to mark each Account in a List<Account> as either or Inactive based on the
LastModified field value being more than 90 days.

Which Apex technique should the developer use?

A. A for loop, with a switch statement inside

B. A Switch statement, with a for loop inside

C. An If/else statement, with a for loop inside

D. A for loop, with an if/else statement inside

Answer: D

Question #:22

A developer needs to prevent the creation of Request_c records when certain conditions exist in the
system. A RequestLogic class exists to checks the conditions. What is the correct implementation?

A. Trigger RequestTrigger on Request (after insert) { RequestLogic.validateRecords


{trigger.new};

B. Trigger RequestTrigger on Request (before insert) { RequestLogic.validateRecords


{trigger.new};

C. Trigger RequestTrigger on Request (before insert) { if (RequestLogic.isvalid{Request})

Request.addError {'Your request cannot be created at this time.'};


CloudCertified Practice Tests

D. Trigger RequestTrigger on Request (after insert) { if (RequestLogic.isValid{Request})

Request.addError {'Your request cannot be created atthis time.'};

Answer: B

Question #:23 Which code displays the contents of a Visualforce page as a PDF?

A. <apex:page contentType="pdf">

B. <apex:page rendersAs="application/pdf">

C. <apex:pagecontentType="application/pdf">

D. <apex:page renderAs="pdf">

Answer: D

Explanation

https://developer.salesforce.com/docs/atlas.en-
us.pages.meta/pages/pages_output_pdf_renderas.htm

You can generate a downloadable, printable PDF file of a Visualforce page using the PDF rendering
service. Converta page to PDF by changing the <apex:page> tag.

<apex:page renderAs="pdf">

Question #:24 Howshould a developer write unit tests for a private method in an Apex class?

A. Use the SeeAllData annotation.

B. Add a test method in the Apex class.

C. Use the TestVisible annotation.

D. Mark the Apex class as global.

Answer: C

Question #:25
CloudCertified Practice Tests

While writing a test class that covers an OpportunityLineItem trigger, aDeveloper is unable to create
a standard PriceBook since one already exists in the org.

How should the Developer overcome this problem?

A. Use Test.getStandardPricebookId() to get the standard PriceBook ID.

B. Use @IsTest(SeeAllData=true) and delete theexisting standard PriceBook.

C. Use Test.loadData() and a Static Resource to load a standard Pricebook.

D. Use @TestVisible to allow the test method to see the standard PriceBook.

Answer: A

Question #:26 What are three techniques that adeveloper can use to invoke an anonymous block
of code? (Choose three.)

A. Use the SOAP API to make a call to execute anonymous code.

B. Create a Visualforce page that uses a controller class that is declared without sharing.

C. Run code using the Anonymous Apex feature of the Developer’s IDE.

D. Type code into the Developer Console and execute it directly.

E. Create and execute a test method that does not specify a runAs() call.

Answer: A C D

Question #:27

A developer writes a single trigger on the Account object on the after insert and after update events.
A workflow rule modifies a field every timean Account is created or updated.

How many times will the trigger fire if a new Account is inserted, assuming no other automation logc
is iplemented on the Account?

A. 4

B. 1

C. 2

D. 8

Answer: C
CloudCertified Practice Tests

Question #:28

An org has an existing Flow that creates an Opportunity withan Update Records element. A
developer update the Flow to also create a Contact and store the created Contact's ID on the
Opportunity.

Which update should the developer make in the Flow?

A. Add a new Get Records element.

B. Add a new Update Records element.

C. Add a new Quick Action element(of type Create).

D. Add a new Create Records element.

Answer: D

Question #:29 developer created this Apex trigger that calls MyClass .myStaticMethod:

trigger myTriggeron Contact(before insert) ( MyClass.myStaticMethod(trigger.new, trigger.oldMap);


}

The developer creates a test class with a test method that calls MyClass.mystaticMethod, resulting
in 81% overall code coverage. What happens when the developer tries to deploy the trigger and two
classes to production, assuming no other code exist?

A. The deployment fails because the Apex trigger has no code coverage.

B. The deployment fails because no assertions were made in the test method.

C. The deployment passes becausethe Apex code has required (>75%) code coverage.

D. The deployment passes because both classes and the trigger were included in the
deployment.

Answer: A

Question #:30
CloudCertified Practice Tests

A Lightning component has a wired property, searchResults, that stores a list of Opportunities.
Which definition of the Apex method, to which the searchResults property is wired, should be used?

A. @AuraEnabled(cacheable=true)

public static List<Opportunity> search(String term) { /* implementation*/ }

B. @AuraEnabled(cacheable=true)

public List<Opportunity> search(String term) { /*implementation*/ }

C. @AuraEnabled(cacheable=false)

public static List<Opportunity> search(String term) { /*implementation*/ }

D. @AuraEnabled(cacheable=false)

public List<Opportunity> search(String term) { /*implementation*/ }

Answer: A

Question #:31

A developer has to identify a method in en Apex class that performsresource intensive actions in
memory by iterating over the result set of a SOQL statement on the account. The method also
performs a SOQL statement to save the changes to the database.

Which two techniques should the developer implement as a best practiceto ensure transaction
control and avoid exceeding governor limits?

Choose 2 answers

A. Use the @ReadOnly annotation to bypass the number of rows returned by a SOQL.

B. Use Partial DHL statements to ensure only valid data is committed.

C. Use the Database.Savepoint method to enforce database integrity.

D. Use the System.Limit class to monitor the current CPU governor limit consumption.

Answer: C D
CloudCertified Practice Tests

Question #:32

A developer wants to import 500 Opportunity records into a sandbox. Why should the developer
choose to use data Loader instead of Data Import Wizard?

A. Data Loader runs from the developer's browser.

B. Data Import Wizard does not support Opportunities.

C. Data Loader automatically relates Opportunities to Accounts.

D. Data Import Wizard can not import all 500 records.

Answer: B

Question #:33

A developer must modify the following code snippet to prevent the number of SOQL queries issued
fromexceeding the platform governor limit. public class without sharing OpportunityService( public
static List<OpportunityLineItem> getOpportunityProducts(Set<Id> opportunityIds){
List<OpportunitylineItem> oppLineItems = new List<OpportunityLineItem>(); for(Id thisOppId :
opportunityIds){ oppLineItems.addAll([Select Id FROM OpportunityLineItems WHERE OpportunityId
= :thisOppId)]; } return oppLineItems; } }

The above method might be called during a trigger execution via a Lightning component. Which
technique should be implemented to avoid reaching the governor limit?

A. Use the System.Limits.getQueries() method to ensure the number of queries is less than
100.

B. Use the System.Limits.getlimitQueries() method to ensure the number of queries is less than
100.

C. Refector the code above to perform the SOQL query only if the Set of opportunityIds
contains less 100 Ids.

D. Refactor the code above to perform only one SOQL query, filtering by the Set of
opportunityIds.

Answer: D
CloudCertified Practice Tests

Question #:34 Which two are phases in the Salesforce Application Event propagation framework?
Choose

2 answers

A. Bubble

B. Default

C. Capture

Answer: B C

Question #:35

Universal Containers (UC)uses a custom object called Vendor. The Vendor custom object has a
Master-Detail relationship with the standard Account object. Based on some internal discussion, the
UC administrator tried to change the Master-Detail relationship to a Lookup relationshipbut was not
able to do so. What is a possible reason that this change was not permitted?

A. The Account records contain Vendor roll-up summary fields.

B. The Vendor object must use a Master-Detail field for reporting.

C. The Vendor records have existing values in the Account object.

D. The Account object is included on a workflow on the Vendor object.

Answer: A

Question #:36 Universal Container uses Service Cloud with a custom field, stage_c, on the Case
object.

Management wants to send a follow-up email reminder 6 hours after the stage_c field isset to
‘’;Waiting on customer’’ The …. Administrator wants to ensure the solution used is bulk safe.

Which two automation tools should a developer recommend to meet these business requirements?
Choose 2 answers

A. Scheduled Flow
CloudCertified Practice Tests

B. Einstein Next Best Action

C. Record_Triggered Flow

D. Process Builder

Answer: A C

Question #:37

A developer created a custom order management app that uses an Apex class. The order is
represented by an Order object and an Orderltem object that has a master-detail relationship to
Order. During order processing, an order may be split into multiple orders.

What should a developer do to allow their code to move some existing Orderltem records to a new
Order record?

A. Change the master-detailrelationship to an external lookup relationship.

B. Add without sharing to the Apex class declaration.

C. Create a junction object between Orderltem and Order.

D. Select the Allow reparenting option on the master-detail relationship.

Answer: D

Explanation

QUESTIONNO: 190

A developer created these three Rollup Summary fields in the custom object, Project_ct,

Total -Timesheets -c

Total-Approved -Timesheets-c

Total -Rejected-Timesheet-c
CloudCertified Practice Tests

The developer is asked to create a new field that shows the ratio between rejected and approved
timesheets for a given project.

Which should the developer useto Implement the business requirement in order to minimize
maintenance overhead?

A. Record-triggered Flow

B. Formula field

C. Apex Trigger

D. Process Builder

Answer: B

Question #:38

The following Apex method is part of the ContactService class that is called from atrigger: public
static void setBusinessUnitToEMEA(Contact thisContact){ thisContact.Business_Unit c = "EMEA" ;
update thisContact; } How should the developer modify the code to ensure best practice are met?

A. Public static void setBusinessUnitToEMEA(List<Contact> contacts){ for(Contact thisContact :


contacts){

thisContact.Business_Unit c = 'EMEA' ; update contacts[0];

B. Public static void setBusinessUnitToEMEA(List<Contact> contacts){ for(Contact thisContact :


contacts) {

thisContact.Business_Unit c = 'EMEA' ;

update contacts;
CloudCertified Practice Tests

C. Public static void setBusinessUnitToEMEA(Contact thisContact){ List<Contact> contacts =


new List<Contact>(); contacts.add(thisContact.Business_Unit c = 'EMEA');

update contacts;

D. Public voidsetBusinessUnitToEMEA(List<Contact> contatcs){ contacts[0].Business_Unit c =


'EMEA' ;

update contacts[0];

Answer: C

Question #:39

How many accounts will be inserted by the following block ofcode? for(Integer i = 0 ; i < 500; i++) {
Account a = new Account(Name='New Account ' + i); insert a; }

A. 150

B. 0

C. 500

D. 100

Answer: B

Question #:40
CloudCertified Practice Tests

A developer must create a ShippingCalculator class that cannot be instantiated and must include a
working default implementation of a calculate method, that sub-classes can override.

What is the correct implementation of the ShippingCalculator class?

A. Option A

B. Option B

C. Option C

D. Option D

Answer: B

Question #:41

How can a developer check the test coverage of active Process Builder and Flows deploying them in
a Changing Set?

A. Use the Flow properties page.

B. Use the code Coverage Setup page


CloudCertified Practice Tests

C. Use the Apex testresult class

D. Use SOQL and the Tooling API

Answer: D

Question #:42 Which two characteristics are true for Aura component events? Choose 2 answers

A. The event propagates to every owner in the containment hierarchy

B. Depending on the current propagation phase, calling event. Stoppropagation () may not stop
theevent propagation.

C. If a container component needs to handle a component event, add a includeFacets" true”


attribute to its handler.

D. By default, containers can handle events thrown by components they contain.

Answer: A B

Question #:43

A developer must create a DrawList class that provides capabilities defined in the Sortable and
Drawable interfaces. public interface Sortable { void sort(); } public interface Drawable { void draw();
} Which is the correct implementation?

A.Public class DrawList implements Sortable, Implements Drawable { public void sort() {
/*implementation*/}

public void draw() { /*implementation*/}

B.Public class DrawList extends Sortable, Drawable { public void sort() { /*implementation*/}
CloudCertified Practice Tests

public void draw() { /*implementation*/}

C.Public class DrawList implements Sortable, Drawable { public void sort() { /*implementation*/}

public void draw() { /*implementation*/}

D Public class DrawList extends Sortable, extends Sortable, extendsDrawable { public void sort() {
/*implementation*/ }

public void draw() { /* implementation */}

Answer: C

Question #:44 Considering the following code snippet:

When the code executes a DML exception is thrown.

How should the developer modify the code to ensure exceptions are handled gracefully?

A. Implement a try/catch block for the DML.

B. Remove null items from the list if Accounts.

C. Implement the upsert DML statement.

D. Implement Change Data Capture

Answer: A
CloudCertified Practice Tests

Question #:45

A developer has a Apex controller for a Visualforce page that takes an ID as a URL parameter. How
should the developer prevent a cross site scripting vulnerability?

A. ApexPages.currentPage() .getParameters() .get('url_param')

B. ApexPages.currentPage() .getParameters() .get('url_param') .escapeHtml4()

C. String.ValueOf(ApexPages.currentPage() .getParameters() .get('url_param'))

D. String.escapeSingleQuotes(ApexPages.currentPage() .getParameters(). get('url_param'))

Answer: B

Question #:46 what are the methods used toshow input in classic and lightning ?

Use visualforce page in classic and lightning component in lightning

Question #:47 Which three resources in an Aura Component can contain Javascript functions?
Choose 3 answers

A. Controller

B. Helper

C. Renderer

Answer: A B C

Question #:48 What is a key difference between a Master-Detail Relationship and a


LookupRelationship?

A. A Master-Detail Relationship detail record inherits the sharing and security of its master
record.

B. When a record of a master object in a Lookup Relationship is deleted, the detail records are
also deleted.

C. A Lookup Relationship is arequired field on an object.


CloudCertified Practice Tests

D. When a record of a master object in a Master-Detail Relationship is deleted, the detail


records are kept and not deleted.

Answer: A

Question #:49

UniversalContainer use a simple order Management app. On the Order Lines, the order line total is
calculated by multiplying the item price with the quantity ordered. There is a Master-Detail
relationship between the Order and the Order Lines object.

What is the practice to get the sum of all order line totals on the order header?

A. Roll-Up Summary Field

B. Apex Trigger

C. Process Builder

D. Declarative Roll-Up Summaries App

Answer: A

Question #:50

An org tracks customer orders on an Order object and the items of an Order onthe Line Item object.
The Line Item object has a MasterDetail relationship to the order object. A developer has a
requirement to calculate the order amount on an Order and the line amount on each Line item
based on quantity and price.
CloudCertified Practice Tests

What is the correct implementation?

A. Implement the line amount as a numeric formula field and the order amount as a roll-up
summary field.

B. Write a single before trigger on the Line Item that calculates the item amount and updates
the order amount on the Order.

C. Implement the Line amount as a currency field and the order amount as a SUM formula
field.

D. Write a process on the Line item that calculates the item amount and order amount and
updates the filed on the Line Item and the order.

Answer: A

Question #:51

When a user edits the Postal Code on an Account, a custom Account text field named "Timezone"
must be update based on the values in a PostalCodeToTimezone c custom object. How should
adeveloper implement this feature?

A. Build an Account Assignment Rule.

B. Build an Account custom Trigger.

C. Build an account Approval Process

D. Build an Account Workflow Rule.

Answer: B
CloudCertified Practice Tests

Question #:52 A developer wrote the following two classes:

The StatusFetcher class successfully compiled and saved. However, the Calculator class has a
compile time error.

How should the developer fix this code?

A. Change the class declaration for the statusFetcher class to public with inherited sharing.

B. Make the isActive method in the StatusFetcher class public.

C. Make the doCalculations methodin the Calculation class private.

D. Change the class declaration for the Calculator class to public with inherited sharing.

Answer: B

Question #:53 Which two sfdx commands can be used to add testing data to a Developer sandbox?

A. Forced: data:bulk:upsert

B. Forced: data: object :upsert

C. Forced: data: tree: upsert


CloudCertified Practice Tests

D. Forced: data:async:upsert

Answer: A

Question #:54 Which code in a Visualforce page and/or controller might present a security
vulnerability?

A. <apex:outputField value="{!ctrl.userInput}" />

B. <apex:outputText escape="false" value=" {!$CurrentPage.parameters.userInput}" />

C. <apex:outputText value="{!£CurrentPage.parameters.userInput}" />

D. <apex:outputField escape="false" value="{!ctrl.userInput}" />

Answer: B

Question #:55

A developeris debugging the following code to determinate why Accounts are not being created
Account a = new Account(Name = 'A'); Database.insert(a, false); How should the code be altered to
help debug the issue?

A. Add a System.debug() statement before the insert method

B. Add a try/catch around the insert method

C. Set the second insert method parameter to TRUE

D. Collect the insert method return value a Saveresult variable

Answer: B

Question #:56 Which three data types can a SOQL query return? Choose 3 answers

A. List

B. Long
CloudCertified Practice Tests

C. Integer

D. sObject

Answer: A C D

Question #:57 Universal Containers (UC) decided it will not to send emails to support personnel
directly from Salesforce in

the event that an unhandled exception occurs. Instead, UC wants an external system be notified of
theerror. What is the appropriate publish/subscribe logic to meet these requirements?

A. Publish the error event using the addError() method and have the external system subscribe
to the event using CometD.

B. Publish the error event using the Eventbus.publish() method and have the external system
subscribe to the event using CometD.

C. Have the external system subscribe to the BatchApexError event, no publishing is necessary.

D. Publish the error event using the addError() method and write a trigger to subscribe to the
event and notify the external system.

Answer: B

Question #:58

Which statement should be used to allow some of the records in a list of records to be inserted rf
others fail to be inserted?

A. insert records

B. Database.insert(records, true)

C. insert (records, false)

D. Database.insert(records, false)

Answer: C

Question #:59

Universal Containers wants toback up all of the data and attachments in its Salesforce org once
month. Which approach should a developer use to meet this requirement?

A. Use the Data Loader command line.


CloudCertified Practice Tests

B. Create a Schedulable Apex class.

C. Schedule a report.

D. Define a Data Exportscheduled job.

Answer: D

Question #:60

A Next Best Action strategy uses an Enhance Element that invokes an Apex method to determinea
discount level for a Contact, based on a number of factors. What is the correct definition of the Apex
method?

A.@InvocableMethod

global static ListRecommendation getLevel(List<ContactWrapper> input)

{ /*implementation*/ }

B.@InvocableMethod

globalstatic List<List<Recommendation>> getLevel(List<ContactWrapper> input)

{ /*implementation*/ }

C.@InvocableMethod

global List<List<Recommendation>> getLevel(List<ContactWrapper> input)

{ /*implementation*/ }

D@InvocableMethod

global RecommendationgetLevel (ContactWrapper input)

{ /*implementation*/ }
CloudCertified Practice Tests

Answer: B

Question #:62 When using SalesforceDX, what does a developer need to enable to create
andmanage scratch orgs?

A. Production

B. Dev Hub

C. Environment Hub

D. Sandbox

Answer: B

Question #:63 In the following example, which sharing context will myMethod execute when it is
invoked?

A. Sharing rules will be inherited from the calling context.

B. Sharing rules Ail be enforced by the instantiating class

C. Sharing rules Ml be enforced for the running user.

D. Sharing rules will not be enforced for the running user.

Answer: A

Question #:64

Refer to the following code snippet for an environment has more than 200 Accounts belonging to
the Technology' industry:

When the codeexecution, which two events occur as a result of the Apex transaction? When the
code executes, which two events occur as a result of the Apex transaction? Choose 2 answers

A. If executed in an asynchronous context, the apex transaction is likely to fallby exceeding the
DML governor limit

B. The Apex transaction succeeds regardless of any uncaught exception and all processed
accounts are updated.
CloudCertified Practice Tests

C. The Apex transaction fails with the following message. "SObject row was retrieved via SOQL
without queryingthe requested field Account.Is.Tech c''.

D. If executed In a synchronous context, the apex transaction is likely to fall by exceeding the
DHL governor limit.

Answer: C

Question #:65 A developer Edition org has five existing accounts. A developer wants to add 10
more accounts for …

The following code is executed in the Developer Console using the Executor Anonymous window:

Account a = new Account(Name='My Account');

insert myAccount;

Integer x=1,

List< Account> newAccount=new LIST<Account>{),

Do(

Account acct= new Accounts=new Account(Name=`New Account`+x++)

newAccounts, add(acct),

) while(x<10),

How many total accounts will be in the org after this code is executed?

A. 5

B. 6
CloudCertified Practice Tests

C. 10

D. 15

Answer: C

Question #:66 What are three considerations when using the @InvocableMethod annotation in
Apex?

Choose 3 answers

A. A method using the @InvocableMethod annotation must define areturn value.

B. A method using the @InvocableMethod annotation can have multiple input parameters.

C. A method using the @InvocableMethod annotation must be declared as static

D. A method using the @InvocableMethod annotation can be declared as Public orGlobal.

E. Only one method using the @InvocableMethod annotqation can be defined per Apex class.

Answer: C D E

Question #:67 A developer has two custom controller extensions where each has a save() method.

Which save() method will be called for the following Visualforce page?

<apex:page standardController =”Account”,extensions=”ExtensionA, ExtensionB”>

<apex:commandButton action =”{!save}” value=”Save”/>

</apex:page>
CloudCertified Practice Tests

A. Runtime error will be generated

B. Standard controller save()

C. ExtensionB save()

D. ExtensionA save()

Answer: A

Question #:68

An after trigger on the Account object performs a DML update operation on all of the child
Opportunities of an Account. There are no active triggers on the Opportunity object, yet a
“maximum trigger depth exceeded” error occurs in certain situations.

Which two reasons possibly explain the Account trigger firing recursively? (Choose two.)

A. Changes to Opportunities arecausing cross-object workflow field updates to be made on the


Account.

B. Changes to Opportunities are causing roll-up summary fields to update on the Account.

C. Changes are being made to the Account during an unrelated parallel save operation.

D. Changesare being made to the Account during Criteria Based Sharing evaluation.

Answer: A B

Question #:69
CloudCertified Practice Tests

A developer must troubleshoot to pinpoint the causes of performance issues when a custom page
loads in their org. Which tool should the developer use to troubleshoot?

A. AppExchange

B. Salesforce CLI

C. Visual Studio Core IDE

D. Developer Console

Answer: D

Question #:70 What does the Lightning Component framework provide to developers?

A. Extended governor limits for applications

B. Prebuilt component that can be reused.

C. Templates to create custom components.

D. Support for Classic and Lightning UIS.

Answer: B

Question #:71

AW Computing (AWC) handles orders In Salesforce and stores Its product Inventory In a fter,
inventory c, on a custom object, Product c. When en order for aProduct c Is placed, the inventory
c field Is reduced by the quantity of the order using an Apex trigger.
CloudCertified Practice Tests

AWC wants the real-time inventory reduction for a product to be sent to many of Its external
systems, Including some future systems the company Iscurrently planning.

What should a developer add to the code at the placeholder to meet these requirements?

A)

B)
CloudCertified Practice Tests

A. Option

B. Option

C. Option

D. Option

Answer: A

Question #:72 Which scenario is valid for execution by unit tests?

A. Load data from a remote site with a callout.

B. Set the created date of a record using a system method.

C. Execute anonymous Apex as a different user.

D. Generate a Visualforce PDF with geccontentAsPDF ().

Answer: B

Question #:73

Universal Containers stores the availability date on each Line Item of an Order and Orders are only
shipped when all of the Line Items are available. Which method should be used to calculate the
estimated shipdate for an Order?

A. Use a CEILING formula on each of the Latest availability date fields.

B. Use a DAYS formula on each of the availability date fields and a COUNT Roll-Up Summary
field on the Order.

C. Use a LATEST formula on each of the latest availability date fields.

D. Use a Max Roll-Up Summary field on the Latest availability date fields.
CloudCertified Practice Tests

Answer: D

Question #:74

A developer creates a new Apex trigger with a helper class, and writes a test class that only exercises
95% coverage of new Apex helper class. Change Set deployment to production fails with the test
coverage warning: "Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is
required" Whatshould the developer do to successfully deploy the new Apex trigger and helper
class?

A. Create a test class and methods to cover the Apex trigger

B. Run the tests using the 'Run All Tests' method.

C. Remove the falling test methods from the test class.

D. Increase the test class coverage on the helper class

Answer: C

Question #:75 What are three characteristics of change set deployments?

Choose 3 answers

A. Change sets can only be usedbetween related organizations.

B. Change sets can be used to transfer records.

C. Sending a change set between two orgs requires a deployment connection.

D. Change sets can deploy custom settings data.

E. Deployment is done in a one-way, single transaction.

Answer: A B E
CloudCertified Practice Tests

Question #:76 Which three Salesforce resources can be accessed from a Lightning
webcomponent?

Choose 3 answers

A. SVG resources

B. Third-party web components

C.Content asset files

D. Static resources

E. All external libraries

Answer: A D E

Question #:77 A software company uses the following objects and relationships:

Case: to handle customer support issues

Defect_c: a custom object to represent known issues with the company's software

case_Defect c: a junction object between Case and Defector to represent that a defect Is a customer
issue

What should be done to share a specific Case-Defect_c recordwith a user?

A. Share the Case_Defect_c record.

B. Share the parent Case record.

C. Share the parent Defect_c record.

D. Share the parent Case and Defect_c records.

Answer: D
CloudCertified Practice Tests

Question #:78

A developer wants to get access to the standard price bookin the org while writing a test class that
covers an OpportunityLineItem trigger. Which method allows access to the price book?

A. Use Test.loadData ( )and a static resource to load a standard price book

B. Use @TestVisible to allow the test method to seethe standard price book.

C. Use Test,getStandardPricebookid ( ) to get the standard price book ID.

D. Use @IsTest (SeeAllData=True) and delete the existing standard price book

Answer: C

Question #:79 A developer created a Lightning web component called statusComponent tobe
inserted into the Account

record page.

Which two things should the developer do to make the component available?

A. Add <isExposed> true</isExposed> to the statusComponent.js-meta ml file.

B. Add <target> lighting _RecordPage </target> to thestatusComponent.js-meta ml file.

C. Add < masterLabel>Account</master Label> to the statusComponent.js-meta ml file.

D. Add<target> Lightning_RecordPage </target> to the statusComponent.js file.

Answer: A B
CloudCertified Practice Tests

Question #:80 A developer has a requirement to create an Order When an Opportunityreaches a


"Closed-Won" status.

Which tool should be used to implement this requirement?

A. Process Builder

B. Lightning Component

C. Lightning

D. Apex trigger

Answer: A

Question #:81 A recursive transaction is limited by a DML statement creating records for these two
objects:

Accounts

Contacts

The Account trigger hits a stack depth of 16.

Which statement is true regarding the outcome of thetransaction?

A. The transaction fails only if the Contact trigger stack depth is greater or equal to 16.

B. The transaction succeeds as long as the Contact trigger stack depth is less than 16.

C. The transaction fails and all the changes are rolled back.

D. The transaction succeeds and all the changes are committed to the database.
CloudCertified Practice Tests

Answer: D

Question #:82 A developer is implementingan Apex class for a financial system. Within the class,
the

variables ‘creditAmount’ and ‘debtAmount’ should not be able to change once a value is assigned. In
which two ways can the developer declare the variables to ensure their value can only be assigned
one time? Choose 2 answers

A. Use the static keyword and assign its value in the class constructor.

B. Use the final keyword and assign its value in the class constructor.

C. Use the static keyword and assign its value in a static initializer.

D. Usethe final keyword and assign its value when declaring the variable.

Answer: B

Question #:83

A developer created a child Lightning web component nested inside a parent Lightning web
component, parent component needs to pass a string value to the child component.

In which two ways can this be accomplished? Choose 2 answers

A. The parent component can use a custom event to pass the data to the child component,

B. The parent component can use the Apex controller class to send data to the child
component.

C. Theparent component can invoke a method in the child component

D. The parent component can use a public property to pass the data to the child component.
CloudCertified Practice Tests

Answer: A D

Question #:84 Which two are phases in the Aura application event propagation framework?
Choose 2 answers

A. Emit

B. Control

C. Default

D. Bubble

Answer: C D

Question #:85 A developer identifies the following triggers on the Expense_c object:

DeleteExpense, applyDefaultstoexpense validateexpenseupdate;

The triggers process before delete, before insert,and before update events respectively. Which two
techniques should the developer implement to ensure trigger best practice are followed

A. Unify the before insert and before update triggers and use Process Builder for the delete
action.

B. Maintain all three triggers on the Expense c object, but move the Apex logic out for the
trigger definition.

C. Create helper classes to execute the appropriate logic when a record is saved.

D. Unify all three triggers in a single trigger on the Expense c object thatincludes all events.

Answer: C D
CloudCertified Practice Tests

Question #:86

Einstein Next Best Action Is configured at Universal Containers to display recommendations to


internal users on the Account detail page.

If the recommendation is approved, a new opportunity record and task should be generated. If the
recommendation is rejected, an Apex method must be executed to perform a callout to an external
system.

Which three factors should a developer keep Hi mind when implementing the Apex method? Choose
3 answers

A. The method must use the @AuraEnabled annotation.

B. The method must use the@Future annotation.

C. The method must use the @invocableMethod annotation.

D. The method must be defined as static.

E. The method must be defined as public.

Answer: B D E

Question #:87

A developer has an integer variable called maxAttempts. The developer meeds to ensure that once
maxAttempts is initialized, it preserves its value for the lenght of the Apex transaction; while being
able to share the variable's state between trigger executions. How should the developer declare
maxAttempts to meet these requirements?

A. Declare maxattempts as a member variable on the trigger definition.

B. Declare maxattempts as a private static variable on a helper class


CloudCertified Practice Tests

C. Declare maxattempts as a constant using the static and final keywords

D. Declare maxattempts as a variable on a helper class

Answer: C

Question #:88 Which standard field is required when creating a new contact record?

A. LastName

B. Name

C. AccountId

D. FirstName

Answer: A

Question #:89 What are two characteristics related to formulas? Choose 2 answers.

A. Formula can reference themselves.

B. Formulas are calculated at runtime and are not stored in the database.

C. Formulascan reference values in related objects.

D. Fields that are used in a formula field can be deleted or edited without the formula.

Answer: B C
CloudCertified Practice Tests

Question #:90 What can used to delete components from production?

A. A change set deployment with the delete option checked

B. An ant migration tool deployment with destructivechanges xml file and the components to
delete inthe package .xml file

C. A change set deployment with a destructivechanges XML file

D. An ant migration tool deployment with a destructivechanges XML file and an empty package
.xml file

Answer: B

Question #:91 The following automations already exist on the Account object;

A workflow rule that updates a field when a certain criteria is met

A custom validation on a field

A How that updates related contact records Adeveloper created a trigger on the Account object.

What should the developer consider while testing the trigger code?

A. The flow may be launched multiple times.

B. Workflow rules will fire only after the trigger has committed all DML operations to the
database.

C. A workflow rule field update will cause the custom validation to run again.

D. The trigger may fire multiple times during a transaction.


CloudCertified Practice Tests

Answer: D

Question #:92 Which two statements true about Getter and Setter methods as they relate to
Visualforce? Choose 2 answers

A. Getter methods can pass a value from a controller to a page.

B. There is no guarantee for the order in which Getter or Setter methods are executed.

C. Setter methods always have to be declared global.

D. Setter methods can pass a value from a controller to a page.

Answer: A D

Question #:93 A developer is migrating a Visualforce page into a Lightning web component.

The Visualforce page shows information about a single record. The developer decides to use
Lightning DataService to access record data.

Which security consideration should the developer be aware of?

A. Lightning Data Service handles sharing rules and field-level security.

B. Lightning Data Service ignores field-level security.

C. The with sharing keyword must be used to enforce sharing rules.

D. The isAccessible ( ) method must be used for field-level access checks

Answer: A
CloudCertified Practice Tests

Question #:94

The following code snippet is executed by a Lightning web component in an environment with more
than 2,000 lead records:

Which governor limit will likely be exceeded within the Apex transaction?

A. Total number of DML statement issued

B. Total number of SOQL queries issued

C. Total number of records retrieved by SOQL queries

D. Total number of records processed as a result of DML statements

Answer: C

Question #:95

Universal Containers has an order system that uses on Order Number to identify an order for
customers service agents. Order records will be imported into Salesforce.

How should the "Order Number field be defined in Salesforce.

A. Lookup
CloudCertified Practice Tests

B. Direct Lookup1

C. Number with External ID

D. Indirect Lookup

Answer: C

Question #:96 What are two ways for a developer to execute tests in an org?

A. Tooling API

B. Developer console

C. Bulk API

D. Matadata API

Answer: A B

Question #:97 which statement is true regarding execution order when triggers are associated to
the same object and event?

A. Trigger execution order cannot be guaranteed.

B. executed In the order they are modified.

C. Triggers are executed alphabetically by trigger name.

D. Triggers are executed in the order they are created.

Answer: A

Question #:98 An Opportunity needs to have an amount rolled up from a custom object that is not
in a
CloudCertified Practice Tests

master-detailrelationship. How can this be achieved?

A. Write a trigger on the child object and use a red-black tree sorting to sum the amount for all
related child objects under the Opportunity.

B. Write a Process Builder that links the custom object to the Opportunity.

C. Write a trigger on the child object and use an aggregate function to sum the amount for all
related child objects under the Opportunity

D. Use the Streaming API to create real-time roll-up summaries.

Answer: C

Question #:99

A developer observes that an Apex test method fails in the Sandbox. To identify the issue, the
developer copies the code inside the test method and executes it via the Execute Anonymous tool in
the Developer Console. The code then executes with no exceptions or errors. Why did the test
method fail in the sandbox and pass in the Developer Console?

A. The test method has a syntax error in the code.

B. The test method relies on existing data in the sandbox.

C. The test method is calling an @future method.

D. The test method does not useSystem.runAs to execute as a specific user.

Answer: B

Question #:100
CloudCertified Practice Tests

Which Salesforce feature allows a developer to see when a user last logged in to Salesforce if real-
time notification is not required?

A. Asynchronous Data Capture Events

B. Developer Log

C. Event Monitoring Log

D. Calendar Events

Answer: C

Question #:101

AW Computing tracks order information in custom objects called order c and order_Line_ c -
Currently, all shipping information is stored in the order c object.

The company wants to expand Its order application to support split shipments so that any number of
order_Line c records on a single order c can be shipped to different locations.

What should a developer add to fulfill this requirement?

A. Order_shipment_Group_c object and master-detail field on order_Line_c

B. Order_shipment_Group_c object and master-detail field on order_c

C. Order_shipment_Group_c object and master-detail field to order_c and Order Line_c

D. Order_shipment_Group_c object and master-detail field on order_shipment_Group_c


CloudCertified Practice Tests

Answer: C

Question #:102 A develop completed modification to a customized feature that is comprised of two
elements:

Apex trigger

Trigger handler Apex class

What are two factors that the developer must take into account to properly deploy the modification
to the production environment?

A. Apex classes must have at least 75% code coverage org-wide.

B. At least one line of code must be executed for the Apex trigger.

C. All methods in the test classes must use @isTest.

D. Test methods must be declared with the testMethod keyword.

Answer: A B

Question #:103 A developer creates a custom exception as shown below:

Whatare two ways the developer can fire the exception in Apex? Choose 2 answers

A. Throw new ParityException (parity does not match);

B. New ParityException( );

C. New ParityException (parity does not match);

D. Throw new parityException ( );


CloudCertified Practice Tests

Answer: A D

Question #:104

Universal Containers hires a developer to build a custom search page to help user- find the Accounts
they want. Users will be able to search on Name, Description, and a custom comments field.

Which consideration should the developer be aware of when deciding between SOQL and SOSL?
Choose 2 answers

A. SOSL is able to return more records.

B. SOQL is faster for text searches.

C. SOSL is faster for tent searches.

D. SOQL is able to return more records.

Answer: C D

Question #:105

In terms of the MVC paradigm, what are two advantages of implementing the layer of a Salesforce
application using Aura Component-based development over Visualforce? Choose 2 answers

A. Self-contained and reusable units of an application

B. Rich component ecosystem

C. Automatic code generation

D. Server-side run-timedebugging
CloudCertified Practice Tests

Answer: A B

Question #:106

A developer receives an error when trying to call a global server-side method using the
©remoteAction decorator.

How can the developer resolve the error?

A. Change the function signature to be private static.

B. Add static to the server-side method signature.

C. A Decoratethe server-side method with (static=true).

D. Decorate the server-side method with (static=false).

Answer: B

Question #:107 Which statement generates a list of Leads and Contacts that have a field with the
phrase'ACME'?

A. List <sObject> searchList = (FIND "*ACME*" IN ALL FIELDS RETURNING Contact, Lead);

B. List<List <sObject>> searchList = (FIND "*ACME*" IN ALL FIELDS RETURNING Contact, Lead);

C. Map <sObject> searchList = (FIND "*ACME*" IN ALL FIELDS RETURNINGContact, Lead);

D. List<List < sObject>> searchList = (SELECT Name, ID FROM Contact, Lead WHERE Name like
'%ACME%');
CloudCertified Practice Tests

Answer: B

Question #:108 Which two operations can be performed using a formula field? Choose 2 answers

A. Displaying the last four digits of an encrypted Social Security number

B. Triggering a Process Builder

C. Displaying an Image based on the Opportunity Amount

D. Calculating a score on a Lead based on the information from another field

Answer: C D

Question #:109

Universal Container is building a recruiting app with an Applicant object that stores information
about an individual person that represents a job. Each application may apply for more than one job.

What should a developer implement to represent that an applicant has applied for a job?

A. Master-detail field from Applicant to Job

B. Formula field on Applicant that references Job

C. Junction object between Applicant and Job

D. Lookup field from Applicant to Job


CloudCertified Practice Tests

Answer: C

Question #:110 UniversalContainers decides to use purely declarative development to build out a
new Salesforce application. Which three options can be used to build out the business logic layer for
this application?

Choose 3 answers

A. Flow Builder

B. Validation Rules

C. Processbuilder

Answer: A B C

Question #:111 How does the Lightning Component framework help developersimplement
solutions faster?

A. By providing an Agile process with default steps

B. By providing code review standards and processes

C. By providing device-awareness for mobile and desktops

D. By providing change history and version control

Answer: C

Question #:112
CloudCertified Practice Tests

A developer is creating a page that allows users to create multiple Opportunities. The developer is
asked to verify the current user's default } |

Opportunity record type, and set certain default values based on the record type before inserting
the record. i, J Calculator

How can the developer find the current user's default record type? ns

A.

Query the Profile where the ID equals userInfo.getProfileID() and then use the
profile.Opportunity.getDefaultRecordType() | |

method. ] |

B.

Use Opportunity. SObjectType.getDescribe().getRecordTypelnfos() to get a list of record types, and


iterate through them until [ J

isDefaultRecordTypeMapping() is true. Pencil & Paper |

C.

Use the Schema.userlnfo.Opportunity.getDefaultRecordType() method. <

Create the opportunity and check the opportunity.recordType before inserting, which willhave the
record ID of the current Dal

user's default record type.

Answer: B

Question #:113 A developer writes a trigger on the Account object on the before update event that
increments a count field.
CloudCertified Practice Tests

Aworkflow rule also increments the count field every time that an Account is created or update. The
field update in the workflow rule is configured to not re-evaluate workflow rules. What is the value
of the count field if an Account is inserted with an initial value of zero, assuming no other
automation logic is implemented on the Account?

A. 3

B. 2

C. 1

D. 4

Answer: B

Question #:114

If apex code executes inside the execute() methodof an Apex class when implementing the
Batchable interface, which statement are true regarding governor limits? Choose 2 answers

A. The Apex governor limits might be higher due to the asynchronous nature of the
transaction.

B. The apex governor limits arereset for each iteration of the execute() method.

C. The Apex governor limits are relaxed while calling the constructor of the Apex class.

D. The Apex governor limits cannot be exceeded due to the asynchronous nature of the
transaction,

Answer: A B
CloudCertified Practice Tests

Question #:115

Which three resources inan Azure Component can contain JavaScript functions?

A. Controllers

B. helper

C. Design

D. Style

E. Renderer

Answer: A B E

Question #:116

A Visual Flow uses an apex Action to provide additional information about multiple Contacts, stored
in a custom class, contactInfo. Which is the correct definition of the Apex method that gets
additional information?

A.@InvocableMethod(label='Additional Info')

public List<ContactInfo> getInfo(List<Id> contactIds)

{ /*implementation*/ }

B.@InvocableMethod(label='additional Info') public static ContactInfo getInfo(Id contactId)

{ /*implementation*/ }
CloudCertified Practice Tests

C.@invocableMethod(label)='Additional Info')

public static List<ContactInfo> getInfo(List<Id> contactIds)

{ /*Implementation*/ }

D.@InvocableMethod(Label='additional Info') public ContactInfo(Id contactId)

{ /*implementation*/ }

Answer: C Explanation

QUESTIONNO: 11

A developer needs to confirm that a Contact trigger works correctly without changing the
organization's data.

what should the developer do to test the Contact trigger?

Answer: D

Question #:117 Which three per-transaction limits have higher governor limits in asynchronous
Apex transactions?

A. Maximum CPU time

B. Maximum heap size

C. Total SOQL queries

D. Maximum execution time

E. Records returned by SOQL

Answer: A C E

Question #:118
CloudCertified Practice Tests

A developer created a trigger on the Account object and wants to test if the trigger is properly
bulklfield. The developer team decided that the trigger should be tested with 200 account records
with unique names.

What two things should be done to create the test data within the unit test with the least amount of
code? Choose 2 answers

A developer created a trigger on the Account object and wants to test if the trigger is properly
bulklfield. The developer team decided that the trigger should be tested with 200 account records
with unique names.

What two things should be done to create the test data within the unit test with the least amount of
code? Choose 2 answers

A. Use the @isTest(isParallel=true) annotation in the test class.

B. Use Test.loadData to populate data in your test methods.

C. Use the @isTest(seeAllData=true) annotation in the test class

D. Create a static resource containing test data.

Answer: B D

Question #:119 A developer needs to save a List of existing Account records named myAccounts to
the database, but the

records do not contain Salesforce Id values. Only the valueof a custom text field configured as an
External ID with an API name of Foreign_Key c is known.

Which two statements enable the developer to save the records to the database without an Id?
(Choose two.)

A. Upsert myAccounts Foreign_Key c;

B. Upsert myAccounts(Foreign_Key c);

C. Database.upsert (myAccounts, Foreign_Key c);

D. Database.upsert(myAccounts).Foreign_Key c;

Answer: A C

Question #:120
CloudCertified Practice Tests

Aspart of a data cleanup strategy, AW Computing wants to proactively delete associated opportunity
records when the related Account is deleted.

Which automation tool should be used to meet this business requirement?

A. Workflow Rules

B. Scheduled job

C. Record-Triggered Flow

D. Process Builder

Answer: C

Question #:121

A developer must create a ShippingCalculator class that cannot be instantiated and must include a
working default implementation of a calculate method, that sub-classes can override. What is the
correct implementation of the ShippingCalculator class?

A. Public abstract class ShippingCalculator

public override calculate() { /*implementation*/ }

B.Public abstract class ShippingCalculator {

public virtual void calculate() {/*implementation*/ }


CloudCertified Practice Tests

C.Public abstract class ShippingCalculator {

public abstract calculate() { /*implementation*/ }

D.Public abstract class ShippingCalculator { public void calculate() { /*implementation*/ }

Answer: B

Explanation

the extendingclass can override the existing virtual methods by using the override keyword in the
method definition. Overriding a virtual method allows you to provide a different implementation for
an existing methodhttps://developer.salesforce.com/docs/atlas.en-
us.apexcode.meta/apexcode/apex_classes_extending.htm

Question #:122

A team of developers is working on a source-driven project that allows them to work independently,
with many different org configurations. Which type of Salesforce orgs should they use for their
development?

A. Developersandboxes

B. Scratch orgs

C. Full Copy sandboxes

D. Developer orgs
CloudCertified Practice Tests

Answer: B

Question #:123 A developer must create an Apex class, contactcontroller, that a Lightning
component can

use to search for Contact records. User of the Lightning component should only be able to search
Contact records to which they have access. Which two will restrict the records correctly?

A. public class ContactController

B. public with sharing class ContactController

C. public without sharing class ContactController

D. public inherited sharing class ContactController

Answer: B D

Question #:124

Universal Containers implemented a private sharing model for the Account object. A custom
Account search tool was developed with Apex to help sales representatives find accounts that match
multiple criteria they specify. Since its release, users of the tool report they can see Accounts they
do not own. What should the developer use to enforce sharing permission for the currently logged-
in user while using the custom search tool?

A. Use the schema describe calls to determine if the logged-in users has access to the Account
object.

B. Use the without sharing keyword on the class declaration.


CloudCertified Practice Tests

C. Use the UserInfo Apex class to filter all SOQL queries to returned records owned by the
logged-in user.

D. Use the with sharing keyword on the class declaration.

Answer: D

Question #:125 Which two statements are true about using the @testSetup annotation in an Apex
test class?

Choose 2 answers

A. Records created in the test setup method cannot be updated in individual test methods.

B. Qo The @testSetup annotation is not supported when the GisTest(SeeAllData=True)


annotation is used.

C. Test data is inserted once for all test methods in a class.

D. A method defined with the @testSetup annotation executes once for each test method in
the test class and counts towards system limits.

Answer: B D

Question #:126

A developer needs to update an unrelated object when a record gets saved. Which two trigger types
should the developer create?

A. After insert
CloudCertified Practice Tests

B. After update

C. Before update

D. Before insert

Answer: C D

Question #:127 What are three capabilities of the<ltng : require> tag when loading JavaScript
resources in Aura components? Choose 3 answers

A. Loading files from Documents

B. One-time loading for duplicate scripts

C. Specifying loading order

D. Loading scripts In parallel

E. Loading externally hosted scripts

Answer: B C D

Question #:128 A developer needs to implement the functionality for a service agent to gather
multiple

pieces of information from a customer in order to send a replacement credit card. Which
automation tool meets these requirements?

Flow Builder

Question #:129 Get Cloudy Consulting (GCC) has a multitude of servers that host its customers’
websites. GCC wants to
CloudCertified Practice Tests

provide a servers status page that is always on display in its call center. It should update in real time
with any changes made to any servers. To accommodate this on the server side, a developer created
a server Update platform event.

The developer is working on a Lightning web component to display the information.

A. import ( subscribe, unsubscribe, onError ) from 'lightning/empApi '

B. import (subscribe, unsubscribe, onError ) from 'lightning/MessageChannel'

C. import ( subscribe, unsubscribe, onError ) from 'lightning/ServerUpdate'

D. import ( subscribe, unsubscribe, onError ) from 'lightning/pubsub'

Answer: A

Question #:130 What is the order of operations when a record is saved in Salesforce?

A. Process flows, triggers, workflow,commit

B. Workflow, process flows, triggers, commit

C. Workflow, triggers, process flows, commit

D. Triggers, workflow, process flows, commit

Answer: D

Explanation QUESTION 160

TheJob_Application ccustom object has a field that is a Master-Detail relationship


totheContactobject, where theContactobject is the Master. As part of a feature implementation, a
developer needs to retrieve a list containing allContactrecords where the related Account Industry is
‘Technology’ while also retrieving the contact’sJob_Application crecords.
CloudCertified Practice Tests

Based on the object’s relationships, what is the most efficient statement to retrieve the list of
contacts? A.[SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE

Account.Industry = ‘Technology’];

B.[SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE Accounts.Industry =


‘Technology’];

C.[SELECT Id, (SELECT Id FROM Job_Applications_c) FROM Contact WHERE Accounts.Industry =


‘Technology’];

D.[SELECT Id, (SELECT Id FROM Job_Application_c) FROM Contact WHERE Account.Industry =


‘Technology’];

Answer:B

Question #:131 What should a developer use to fix a Lightning web component bug in a sandbox?

A. Developer Console

B. Force.com IDE

C. Execute Anonumous

D. VS Code

Answer: D

Question #:132 What is the value of the Trigger.old context variable in a Before Insert trigger?

A. A list of newly created sObjectswithout IDS

B. Undefined

C. null
CloudCertified Practice Tests

D. An empty list of sObjects

Answer: C

Question #:133 what are the three languages used in the visualforce page?

A. Javascript, CSS, HTML

B. Apex, Json, SQL

C. C++, CSS, query

Answer: A

Question #:134

A developer creates aLightning web component that imports a method within an Apex class. When a
Validate button is pressed, the method runs to execute complex validations.

In this implementation scenario, which artifact is part of the Controller according to the MVC
architecture?

A. HTML file

B. JavaScript file

C. XML file

D. Apex class
CloudCertified Practice Tests

Answer: D

Question #:135 Given the following code snippet, that is part of a custom controller for a
Visualforce page:

In which two ways can the try/catch be enclosed to enforce object and field-level permissions and
prevent the DML statement from being executed if the current logged-in user does not have the
appropriate level of access? Choose 2 answers

A. Use if (Schema, sobjectType, Contact, isUpdatable ( ) )

B. Use if (Schema , sobjectType. Contact. Field, Is_Active_c. is Updateable ( ) )

C. Use if (Schema.sObjectType.Contact.isAccessible ( ) )

D. Use if (thisContact.Owner = = UserInfo.getuserId ( ) )

Answer: A B

Question #:136

Which threestatements are accurate about debug logs? Choose 3 answers

A. Amount of information logged in the debug log can be controlled programmatically.

B. Debug Log levels are cumulative, where FINE lop level includes all events logged at the
DEBUG, INFO, WARN, and ERROR levels.

C. Amount of information logged in the debug log can be controlled by the log levels.

D. To View Debug Logs, "Manager Users" or "View All Data" permission is needed.

E. To View Debug Logs, "Manager Users" or "Modify All Data" permission isneeded.

Answer: A C

Question #:137
CloudCertified Practice Tests

A developer is creating a test coverage for a class and needs to insert records to validate
functionality. Which method annotation should be used to create records forevery method in the
test class?

A. @BeforeTest

B. @isTest(SeeAllData=True)

C. @TestSetup

D. @PreTest

Answer: C

Question #:138 code below deserializes input into a list of Accounts.

Which code modification should be made to insert the Accounts so that field-level security is
respected?

A. 01: Public with sharing class AcctCreator

B. 05: If (SobjectType.Account,isCreatable())

C. 05: Accts = database.stripinaccesible (accts, Database. CREATEABLE);

D. 05: SobjectAcessDecision sd= Security,stripINaccessible(AccessType,CREATABLE,

Answer: A

Question #:139 Which declarative process automation featuresupports iterating over multiple
records?

A. Flows

B. Validation Rules
CloudCertified Practice Tests

C. Approval Process

D. Workflow rules

Answer: A

Question #:140 A businessimplemented a magnification plan to encourage its customers to watch


some educational videos.

Customers can watch videos over several days, and their progress is recorded. Award points are
granted to customers for all completed videos. When the video is marked as completed in
Salesforce, an external web

service must be called so that points can be awarded to the user.

A developer implemented these requirements in the after update trigger by making a calf to an
external web service. However, a System.CalloutException is occurring.

What should the developer do to fix this error?

A. Surround the external call with a try-catch block to handle the exception.

B. Write a REST service to integrate with the external web service.

C. Move the callout to an asynchronousmethod with structure (callout=true) annotation.

D. Replace the after update trigger with a before insert trigger.

Answer: C
CloudCertified Practice Tests

Question #:141

A developer has aVisualforce page and custom controller to save Account records. The developer
wants to display any validation rule violation to the user. How can the developer make sure that
validation rule violations are displayed?

A. Add cuatom controller attributes todisplay the message.

B. Include <apex:message> on the Visualforce page.

C. Use a try/catch with a custom exception class.

D. Perform the DML using the Database.upsert() method.

Answer: B

Question #:142 What should a developer do to check the code coverage of a class after running all
tests?

A. View the Code Coverage column in the list view on the Apex Classes page.

B. View the Class Test Percentage tab on the Apex Class fist view m Salesforce Setup.

C. View Use cede coverage percentage for the class using the Overall Code Coverage panel in
the Developer Console Tests tab.

D. Select and run the class on the Apex Test Execution page in the DeveloperConsole.

Answer: B
CloudCertified Practice Tests

Question #:143 Universal Containers wants Opportunities to nolonger be editable when reaching
the Closed/Won stage.

How should a developer accomplish this?

A. Use a validation rule.

B. Use the Process Automation settings.

C. Use Flow Builder.

D. Mark fields as read-only on the page layout.

Answer: A

Question #:144

A developer must implement a CheckPaymentProcessor class that provides check processing


payment capabilities that adhere to what defined for payments in the PaymentProcessor interface.
public interface PaymentProcessor { void pay(Decimal amount); } Which is the correct
implementation to use the PaymentProcessor interface class?

A. Public class CheckPaymentProcessor implements PaymentProcessor { public void


pay(Decimal amount) {}

B. Public class CheckPaymentProcessor implements PaymentProcessor { public void


pay(Decimal amount);

C. Public class CheckPaymentProcessor extends PaymentProcessor { public void pay(Decimal


amount);

}
CloudCertified Practice Tests

D. Public class CheckPaymentProcessor extendsPaymentProcessor { public void pay(Decimal


amount) {}

Answer: B

Question #:145

While writing an Apex class that creates Accounts, a developer wants to make sure that all required
fields are handled properly.

Which approach should the developer use to be sure that the Apex class works correctly? Include a
try/catch block to the Apex class.

Question #:146 What can be developed using the LightningComponent framework?

A. Hosted web applications

B. Single-page web apps

C. Dynamic web sites

D. Salesforce integrations

Answer: B

Question #:147
CloudCertified Practice Tests

A developer must provide custom userinterfaces when users edit a Contact in either Salesforce
Classic or Lightning Experience.

What should the developer use to override the Contact's Edit button and provide this functionality?

A. A Visualforce page in Salesforce Classic and a Lightning component in Lightning Experience

B. A Lightning component in 5alesforce Classic and a Lightning component in lightning


Experience

C. A Visualforce page in Salesforce Classic and a Lightning page in Lightning Experience

D. A Lightning page in Salesforce Classicand a Visualforce page in Lightning Experience

Answer: A

Question #:148

A developer is tasked with performing a complex validation using Apex as part of advanced business
logic. certain criteria are met for a PurchaseOrder, the developer must throw a custom exception.

What is the correct way for the developer to declare a class that can be used as an exception?

A. public class PurchaseOrderException implements Exception ()

B. public class PurchaseOrderException extends Exception ()

C. public class PurchaseOrder implements Exception ()

D. public class PurchaseOrder extends Exception ()

Answer: B
CloudCertified Practice Tests

Question #:149 What is an example of a polymorphic lookup field in Salesforce?

A. The LeadId and Contactid fields on the standard Campaign Member object

B. A custom field, Link c, on the standard Contact object that looks up toan Account or a
Campaign

C. The Whatld field on the standard Event object

D. The Parentid field on the standard Account object

Answer: C

Question #:150 A developer is tasked to perform a security review of theContactSearch Apex class
that exists in the system.

Whithin the class, the developer identifies the following method as a security threat: List<Contact>
performSearch(String lastName){ return Database.query('Select Id, FirstName, LastName FROM
Contact WHERE LastName Like %'+lastName+'%); } What are two ways the developer can update the
method to prevent a SOQL injection attack? Choose 2 answers

A. Use variable binding and replace the dynamic query with a static SOQL.

B. Use the escapeSingleQuote method tosanitize the parameter before its use.

C. Use a regular expression on the parameter to remove special characters.

D. Use the @Readonly annotation and the with sharing keyword on the class.

Answer: A B

Question #:151 Which statement is true about developing in a multi-tenant environment?


CloudCertified Practice Tests

A. Governor limits prevent apex from impactiong the performance of multiple tenants on the
same instance

B. Apex sharing controls access to records fomr multiple tenants on the same instance

C. Global apex classes can be referenced from multiple tenants on the same instance

D. Org-level data security controls which users can see datafrom multiple tenants on the same
instance

Answer: A

Question #:152

A Salesforce Administrator is creating a record-triggered flow. When certain criteria aremet, the flow
must call an Apex method to execute complex validation involving several types of objects.

When creating the Apex method, which annotation should a developer use to ensure the method
Can be used within the flow?

A. @future

B. @RemoteAction

C. @InvocableMethod

D. @AuraEnaled

Answer: C

Question #:153 A developer has a VF page and custom controller tosave Account records. The
developer
CloudCertified Practice Tests

wants to display any validation rule violation to the user. How can the developer make sure that
validation rule violations are displayed?

A. Add custom controller attributes to display the message.

B. Include <apex:messages> on the Visualforce page.

C. Use a try/catch with a custom exception class.

D. Perform the DML using the Database.upsert() method

Answer: B

Explanation

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_message.htm

Question #:154

What should a developer use to obtain the Id and Name of all the Leads. Accounts, and Contacts that
hove thecompany name "Universal Containers"?

A. FIND 'Universal Containers' IN Name Fields RETURNING leadjid, name), accounted, name),
contacted, name)

B. FIND Universal Containers' IN CompanyName Fietds RETURNING lead{ld. name), accounted,


name), contacted, name)

C. SELECT lead(id, name). accountOd, name), contacted, name) FROM Lead, Account, Contact
WHERE Name = "universal Containers'

D. SELECT Lead.id. Lead.Name, Account.Id, AccountName, Contacted, Contact.Name FROM


Lead, Account, Contact WHERE CompanvName * Universal Containers'
CloudCertified Practice Tests

Answer: A

Question #:155

Given the following block code: try{ List <Accounts> retrievedRecords = [SELECT Id FROM Account
WHERE Website = null]; }catch(Exception e){ //manage exception logic } What should a developer do
to ensure the codeexecution is disrupted if the retrievedRecordslist remains empty after the SOQL
query?

A. Check the state of the retrieveRecords variable and throw a custom exception if the variable
is empty.

B. Check the state of the retrievedRecords variable and use System.assert(false) if the variable
is empty

C. Check the state of the retrievedRecords variable and access the first element of the list if the
variable is empty.

D. Replace the retrievedRecords variable declaration from ftount to a single Account.

Answer: B

Question #:156

A developer created a new trigger that inserts a Task when a new Lead is created. After deploying to
production, an outside integration chat reads task records is periodically reporting errors.

Which change should the developer make to ensure the integration is not affected with minimal
impact to business logic?

A. Deactivate the trigger before the integration runs.

B. Use a try-catch block after the insert statement.

C. Remove the Apex class from the integration user's profile.

D. Use the Database methodwith all or None set to false

Answer: D

Question #:157 A developer considers the following snippet of code:


CloudCertified Practice Tests

Based on this code, what is the value of x?

A. 2

B. 1

C. 3

D. 4

Answer: D

Question #:158

What will be the output in the debug log in the event of a QueryExeption during a call to the @query
method in the following Example?
CloudCertified Practice Tests

A. Querying Accounts. Query Exception.

B. Querying Accounts. Custom Exception.

C. Querying Accounts. Query Exception. Done

D. Querying Accounts. Custom Exception Done.

Answer: C

Question #:159 How can a developer implement this feature

A. Build an account assignment rule.

B. Build a workflow rule.

C. Build a flow with Flow Builder.

D. Build an account approval process.

Answer: C
CloudCertified Practice Tests

Question #:160 What are two ways that a controller and extension can be specified on a Visualforce
page?

Choose 2 answers

A. a@pex:page=Account extends="myControllerExtension"

B. Qo apex:page standardController="Account" extensions="myControllerExtension”

C. apex:page controllers="Account, myControllerExtension”

D. apex:page controller="Account” extensions="myControllerExtension"”

Answer: B D

Question #:161 Given the following Anonymous Block:

Which one do you like?

What should a developer consider for an environment that has over10,000 Case records?

A. The transaction will fail due to exceeding the governor limit.

B. The try/catch block will handle any DML exceptions thrown.


CloudCertified Practice Tests

C. The transaction will succeed and changes will be committed.

D. The try/catch block will handle exceptions thrown by governor limits.

Answer: C

Question #:162 Application Events follow the traditional publish-subscribe model. Which method is
used to fire an event?

A. Fire()

B. Emit()

C. RegisterEvent()

D. FireEvent()

Answer: A

Question #:163

A developer needs an Apex method that can process Account or Contact records. Which method
signature should the developer use?

A. Public void doWork(Record theRecord)

B. Publicvoid doWork(sObject theRecord)

C. Public void doWork(Account Contact)


CloudCertified Practice Tests

D. Public void doWork(Account || Contatc)

Answer: B

Question #:164 What should a developer use to script the deployment and unit test execution as
part of continuous integration?

A. Developer Console

B. Execute Anonymous

C. Salesforce CLI

D. VS Code

Answer: C

Question #:165 Universal Container uses Salesforce to create orders.

When an order is created, it needs to sync with the-in-house order fulfillment system. The order
fulfillment system can accept SOAP messages over the HTTPS. If the connection fails, messages
should be retried for up to 24 hours.

What is the recommended approach to sync the orders in Salesforce with the order fulfillment
system?

A. Set up a Workflow Rule outbound message to the order fulfillment system.

B. Create an after insert trigger on the Order object to make a callout to the order fulfilment
system

C. Write an Apex SOAP service to integrate with theorder fulfillment system.


CloudCertified Practice Tests

D. Use Process Bulkier to call an invocable Apex method that sends a message to the order
fulfilment system.

Answer: B

Question #:166

Which Salesforce feature allows a developer to see when a user last logged in to Salesforce if real-
time notification is not required?

A. Asynchronous Data Capture Events

B. Developer Log

C. EventMonitoring Log

D. Calendar Events

Answer: C

Question #:167

Which three process automations can immediately send an email notification to the owner of an
Opportunity when its Amount ischanged to be greater than $10,000? Choose 3 answers

A. Workflow Rule

B. Flow Builder

C. Approval Process
CloudCertified Practice Tests

D. Escalation Rule

E. Process Builder

Answer: A C E

Question #:168

The orderHelper class is a utility class that contains business logic for processingorders. Consider the
following code snippet:

A developer needs to create a constant named DELIVERY_MULTIFILTER with a value of 4.15. The
value of the constant should not change at any time in the code.

How should the developer declare the DELIVERY_MULTIFILTER constant to meet the business
objectives?

A. Decimal DELIVERY_MULTIFILTER = 4.15;

B. Static final decimal DELIVERY_MULTIFILTER = 4.15;

C. Static decimal DELIVERY_MULTIFILTER = 4.15;

D. Constant decimal DELIVERY_MULTIFILTER = 4.15;

Answer: B

QUESTIONNO: 187
CloudCertified Practice Tests

Which two settings must be defined in order to update a record of a junction object? Choose 2
answers

A. Read access on the primary relationship

B. Read/Write access on the secondary relationship

C. Read/Write access on the primary relationship

D. D.Read/Write access on the junction object

Answer: B, C

Question #:169

A developer is asked to create a Visualforce page for Opportunities that allows users to save
ormerge the current record.

Which approach should the developer to meet this requirement?

A. A custom controller

B. A custom controller extension

C. Visualforce page JavaScript

D. Standard controller methods

Answer: A

Question #:170 A developer uses a loop to check eachContact in a list. When a Contact with the
Title of
CloudCertified Practice Tests

“Boss” is found, the Apex method should jump to the first line of code outside of the for loop.

Which Apex solution will let the developer implement this requirement?

A. break;

B. Continue

C. Next

D. Exit

Answer: A

Question #:171 What is the result of the following code?

A. The record will not be created and a exception will be thrown.

B. The record will be created and a message will be in the debug log.

C. The record will not be created and no error will be reported.

D. The record will be created and no error will be reported.

Answer: C

Question #:172 In the Lightning UI, where should a developer look to find information about a
Paused Flow Interview?

A. On the Paused Row Interviews related List for a given record


CloudCertified Practice Tests

B. In the Paused Interviews section of the Apex Flex Queue

C. In the system debug logby Altering on Paused Row Interview

D. On the Paused Row Interviews component on the Home page

Answer: B

Question #:173 Which two are best practices when it comes to component and applicationevent
handling? (Choose two.)

A. Reuse the event logic in a component bundle, by putting the logic in the helper.

B. Use component events to communicate actions that should be handled at the application
level.

C. Handle low-level events in the event handler and re-fire them as higher-level events.

D. Try to use application events as opposed to component events.

Answer: A C

Question #:174

A primaryid_c custom field exists on the candidate_c custom object. The filed is used to store each
candidate's id number and is marked as Unique in the schema definition.

As part of a data enrichment process. Universal Containers has a CSV file that contains updated data
for all candidates in the system, the file contains each Candidate's primary id as a data point.
Universal Containers wants to upload this information into Salesforce, while ensuring all data rows
are correctly mapped to a candidate in the system.

Which technique should the developer implement to streamline the data upload?

A. Create a Process Builder on the Candidate_c object to map the records.


CloudCertified Practice Tests

B. Create a before Insert trigger to correctly map the records.

C. Update the primaryid c field definition to mark it as an External Id

D. Upload the CSV into a custom object related to Candidate_c.

Answer: C

Question #:175 How should a custom user interface be provided when a user edits an Account in
Lightning Experience?

A. Override the Account's Edit button with Lightning Flow

B. Override the Account's Edit button with Lightning Action

C. Override the Account's Edit button with Lightning page.

D. Override the Account's Edit button with Lightning component.

Answer: D

Question #:176

A custom Visualforce controller calls the ApexPages,addMessage () method, but no messages are
rendering on the page.

Which component should be added to the Visualforce page to display the message?

A. <apex: pageMessages />


CloudCertified Practice Tests

B. <apex: pageMessage severity=”info’’/>

C. <Apex: facet name=’’ message’’/>

D. <Apex: message for=’’ info’’/>

Answer: B

Question #:177

A developer has requirement to write Apex code to update a large number of account records on a
nightly basis. The systemadministrator needs to be able to schedule the class to run after business
hours on an

as-needed basis.

Which class definition should be used to successfully implement this requirement?

A. Global inherited sharing class ProcessAccountProcessor implements Database.


Batchable<sObject>

B. Global inherited sharing class ProcessAccount Process implements Queueable

C. Global inherited sharing class ProcessAccountProcess Implements Queueable

D. Gloabal inherited sharing class processAccount Processor implements


Database>Bachable<sObject> Schedulable.

Answer: C

Question #:178

Where are two locations a developercan look to find information about the status of asynchronous
or future methods? Choose 2 answers
CloudCertified Practice Tests

A. Apex Flex Queue

B. Apex Jobs

C. Paused Flow Interviews component

D. Time-Based Workflow Monitor

Answer: A B

Question #:179

A Salesforce developer wants to review their code changes immediately and does not want toinstall
anything on their computer or on the org.

Which tool is best suited?

A. Developer Console

B. Salesforce Extension for VSCode

C. Setup Menu

D. Third-party apps from App Exchange

Answer: A

Question #:180 Whichaspect of Apex programming is limited due to multitenancy?

A. The number of active Apex classes


CloudCertified Practice Tests

B. The number of methods in an Apex Class

C. The number of records processed in a loop

D. The number of records returned from database queries

Answer: D

Question #:181

A developer of Universal Containers is tasked with implementing a new Salesforce application that
must be able to by their company's Salesforce administrator.

Which three should be considered for building out the business logic layer of the application?
Choose 3 answers

A. Workflows

B. validation Rules

C. Process Builder

D. Scheduled Jobs

E. Invocable Actions

Answer: A B C

Question #:182
CloudCertified Practice Tests

Universal Containers wants a list button to display aVisualforce page that allows users to edit
multiple records. which Visualforce feature supports this requirement?

A. <apex:listButton> tag

B. Custom controller

C. RecordSetVar page attribute

D. Controller extension

Answer: C

Question #:183

Which Apex class contains methods to return theamount of resources that have been used for a
particular governor, such as the number of DML statements?

A. Exception

B. Messaging

C. OrgLimits

D. Limits

Answer: D

Question #:184
CloudCertified Practice Tests

A development team wants to use a deployment script lo automatically deploy lo a sandbox during
their development cycles.

Which two tools can they use to run a script that deploysto a sandbox? Choose 2 answers

A. Ant Migration Tool

B. SFDX CLI

C. Change Sets

D. Developer Console

Answer: A B

Question #:185 Which exception type cannot be caught?

A. A Custom Exception

B. CalloutException

C. LimitException

D. NoAccessException C

Question #:186 Which action may cause triggers to fire?

A. Updates to Feed Items

B. Renaming or replacing a picklist entry

C. Changing a user's default division when the transfer division option is checked
CloudCertified Practice Tests

D. Cascadingdelete operations

Answer: A

Question #:187 Universal Containers decides to use exclusively declarative development to build
out a new

Salesforce application. Which three options should be usedto build out the database layer for the
application? Choose 3 answers

A. Roll-Up Summaries

B. Triggers

C. Relationships

D. Process Builder

E. Custom Objects and Fields

Answer: A C D

Question #:188 A developer needs to create a custom Interface in Apex.

Which three considerations must the developer keep in mind while developing the Apex Interface?
Choose 3 answers

A. The Apex class must be declared using the interface keyword.

B. A method implementation can be defined within the Apex Interface.

C. The Apex interface class access modifier can be set to Private, Public, or Global.
CloudCertified Practice Tests

D. A method defined In an Apex Interface cannot have an access modifier.

E. New methods can be added to a public interface within a released package.

Answer: A B D

Question #:189 What should a developer do to check the code coverage of a class after running all
tests?

A. View the Code Coverage column in the view on the Apex Classes page.

B. View the Class test Coverage tab on the Apex Classrecord.

C. view the overall Code Coverage panel of the tab in the Developer Console.

D. Select and run the class on the Apex Test Execution page

Answer: B

Question #:190 What are three ways for a developer to execute tests in an org? Choose 3.

A. Bulk API

B. Tooling API

C. Setup Menu

D. Salesforce DX

E. Metadata API.

Answer: B C D
CloudCertified Practice Tests

Explanation

https://developer.salesforce.com/docs/atlas.en-
us.sfdx_dev.meta/sfdx_dev/sfdx_dev_testing.htmhttps://develope

Question #:191

What is the maximum number of SOQL queries used by the following code? List<Account> aList =
[SELECT Id FROMAccount LIMIT 5]; for (Account a : aList){ List<Contact> cList = [SELECT Id FROM
Contact WHERE AccountId = :a.Id); }

A. 5

B. 6

C. 1

D. 2

Answer: B

Question #:192 Universal Container(UC) wants to lower its shipping cost while making the shipping
process more efficient.

The Distribution Officer advises UC to implementglobal addresses to allow multiple Accounts to


share a default pickup address. The Developer is tasked to create the supporting object and
relationship for this business requirement and uses the Setup Menu to create a custom object called
"Global Address".Which field should the developer ad to create the most efficient model that
supports the business need?

A. Add a Master-Detail field on the Account object to the Global Address object

B. Add a Master-Detail field on the Global Address object to the Account object.

C. Add a Lookup field on the Account object to the Global Address object.
CloudCertified Practice Tests

D. Add a Lookup field on the Global Address object to the Account object

Answer: B

Question #:193 Which two characteristics are true forAura component events?

A. Calling event, stopPropagation ( ) may or may not stop the event propagation based of the
current propagation phase.

B. If a container component needs to handle a component event, add a handleFacets=''


attribute to Its handler.

C. Only parent components that create subcomponents (either in their markup or


programmatically) can handle events.

D. The event propagates to every owner In the containment hierarchy.

Answer: A D

Question #:194 Which exception type cannot be caught ?

A. CalloutException

B. A custom Exception

C. NoAccessException

D. LimitException

Answer: D
CloudCertified Practice Tests

Question #:195 Which two events need to happen when deploying to a production org? Choose 2
answers

All triggers must have at least 1%test coverage.

A. All Apex code must have at least 75% test coverage.

B. All triggers must have at least 75% test coverage.

C. All test and triggers must have at least 75% test coverage combined

Answer: A B

Question #:196

Universal Containers has a Visualforce page that displays a table of every Container_c. being ……. Is
falling with a view state limit because some of the customers rent over 10,000 containers.

What should a developer change about the Visualforce page to help with the page load errors?

A. Use Lazy loading and a transient List variable.

B. Use JavaScript remoting with SOQL Offset.

C. Implement pagination with an OffsetController.

D. Implement pagination with a StandardSetController,

Answer: D
CloudCertified Practice Tests

Question #:197 Which three steps allow a custom SVG to be included in a Lightning web
component? Choose 3 answers

Upload the SVG asa static resource.

A. Import the static resource and provide a getter for it in JavaScript.

B. Reference the getter in the HTML template.

C. Reference the import in the HTML template.

D. Import the SVG as a content asset file.

Answer: A B C Explanation

QUESTIONNO: 2

Which process automation should be used to send an outbound message without using Apex code?

A. Workflow Rule

B. Process Builder

C. Approval Process

D. Flow Builder

Answer: A

Question #:198 A developer is creating a Lightning web component to show a list of sales records.
CloudCertified Practice Tests

The Sales Representative user should be able to see the commission-field on each record. The Sales
Assistance user should be able to see all field on the record except the commission field.

How should this be enforced so that the component works for both users without showing any
errors?

A. Use Lightning Data Service to get the collection ofsales records.

B. Use Lightning Locker Service to enforce sharing rules and field-level security.

C. Use with SECURITY_EMFoRCED in the SOQL that fetches the data for the component.

D. Use security. stripInaccessible to remove fields inaccessible to thecurrent user.

Answer: D

Question #:199

Universal Containers has a support process that allows users torequest support from its engineering
team using a custom object, Engineering_Support c.

Users should be able to associate multiple engineering_Support c records to a single Opportunity


record. Additionally, aggregate Information about the Engineering_support c records should be
shown on the Opportunity record.

What should a developer Implement to support these requirements?

A. Master-detail field from Engineering_Support c to Opportunity.

B. Master-detail field from Opportunity to Engineering_Support c

C. Lookup field from Engineering_support c to Opportunity

D. Lookup field from Opportunity to Engineering_Support c


CloudCertified Practice Tests

Answer: A

Question #:200 Which annotation exposes an Apex class as a RESTful web service?

A. RemoteAction

B. HttpInvocable

C. AuraEnabled

D. RestResource

Answer: D

Question #:201

The sales management team at Universal Containers requires thatthe Lead Source field of the Lead
record be populated when a Lead is converted.

What should be used to ensure that a user populates the Lead Source field prior to converting a
Lead?

A. Process Builder

B. Validation Rule

C. Formula Field

D. workflow Rule

Answer: B
CloudCertified Practice Tests

Question #:202 A developer wants to invoke on outbound message when a record meets a specific
criteria.

Which three features satisfy this use case? Choose 3 answer

A. Approval Process has the capacity to check the record criteria and send an outbound
message without Apex Code

B. Process builder can be used to check the record criteria and send an outboundmessage with
Apex Code.

C. workflows can be used to check the record criteria and send an outbound message.

D. Process builder can be used to check the record criteria and send an outbound
messagewithout Apex Code.

E.Visual Workflow can be used to check the record criteria and send an outbound message without
Apex Code.

Answer: A B C

Question #:203

A custom picklist field, Food_Preference c, exist on a custom object. The picklist contains the
following options: 'Vegan','Kosher','No Preference'. The developer mustensure a value is populated
every time a record is created or updated. What is the most efficient way to ensure a value is
selected every time a record is saved?

A. Set "Use the first value in the list as the default value" as True.

B. Set a validation rule to enforce a value is selected.

C. Mark the field as Required on the field definition.

D. Mark the field as Required on the object's page layout.


CloudCertified Practice Tests

Answer: C

Question #:204 Given the code below:

What should a developer do to correct the code so that there is no chance of hitting a governor
limit?

A. Rework the code and eliminate the for loop.

B. combine the two SELECT statements into a single SOQL statement.

C. Add a WHERE clause to the first SELECT SOQL statement.

D. Add a LIMITclause to the first SELECT SOQL statement.

Answer: D

Question #:205

A developer needs to create a custom button for the Account object that, when clicked, will perform
a series of calculation and redirect the user to a custom visualforce page.

Which three attributes need to bedefined with values in the <apex:page> tag to accomplish this?
Choose 3 answers
CloudCertified Practice Tests

A. renderAs

B. standard Controller

C. readOnly

D. Action

E. extensions

Answer: A B D

Question #:206 Universal Containers wants Opportunities to be locked from editing when reaching
the Closed/Won stage.

Which two strategies should a developer use to accomplish this? Choose 2 answers

A. Use a validation rule.

B. Use a trigger.

Answer: A B

Question #:207

A Visual Flow uses an apex Action to provide additional information about multiple Contacts, stored
in a custom class, contactInfo. Which is the correct definition of the Apex method that gets
additional information?

A.@InvocableMethod(label='Additional Info')

public List<ContactInfo> getInfo(List<Id> contactIds)


CloudCertified Practice Tests

{ /*implementation*/ }

B.@InvocableMethod(label='additional Info') public static ContactInfo getInfo(Id contactId)

{ /*implementation*/ }

C.@invocableMethod(label)='Additional Info')

public static List<ContactInfo> getInfo(List<Id> contactIds)

{ /*Implementation*/ }

D.@InvocableMethod(Label='additional Info') public ContactInfo(Id contactId)

{ /*implementation*/ }

Answer: C

Question #:208
CloudCertified Practice Tests

Which two examples above use the system. debug statements to correctly display the results from
the SOQL aggregate queries?Choose 2 answers

A. Example 1

B. Example 2
CloudCertified Practice Tests

C. Example 3

D. Example 4

Answer: B C

Question #:209 Assuming that ‘name; is a String obtained by an <apex:inputText> tag on a


Visualforce page.

Which two SOQL queries performed are safe from SOQL injections? Choose 2 answers

A.String query = 'SELECTId FROM Account WHERE Name LIKE \''%' + name.noQuotes() + '%\'';
List<Account> results = Database.query(query);

B.String query = 'SELECT Id FROM Account WHERE Name LIKE \''%' +


String.escapeSingleQuotes(name) + '%\'';

List<Account> results = Database.query(query);

C.String query = 'SELECT Id FROM Account WHERE Name LIKE \''%' + name + '%\''; List<Account>
results = Database.query(query);

D.String query = '%' + name + '%';

List<Account> results = [SELECT Id FROM Account WHERE Name LIKE :query];

Answer: B D

Question #:210 Which three code lines are required to create a Lightning component on a
Visualforce page? Choose 3 answers

A. $Lightning.createComponent

B. <apex:slds/>
CloudCertified Practice Tests

C. $Lightning.useComponent

D.$Lightning.use

E.<apex:includeLightning/>

Answer: A D E

Question #:211

A developer has a single custom controller class that works with a Visualforce Wizard to support
creating and editing multiple subjects. The wizard accepts data fromuser inputs across multiple
Visualforce pages and from a parameter on the initial URL.

Which three statements are useful inside the unit test to effectively test the custom controller?
Choose 3 answers

A. insert pageRef.

B. Test.setCurrentPage(pageRef);

C. public ExtendedController(ApexPages StandardController cntrl) { }

D. ApexPages.CurrentPage().getParameters().put('input\’, 'TestValue');

E. String nextPage - controller.save().getUrl();

Answer: B D E
CloudCertified Practice Tests

Question #:212

As a part of class implementation a developer must execute a SOQLquery against a large data ser
based on the contact object. The method implementation is as follows.

Which two methods are best practice to implement heap size control for the above code? (Choose 2
Answers)

A. Use the FOR UPDATE option on the SOQL query to lock down the records retrieved.

B. Use visual keyword when declaring the retrieve variable.

C. Use a SOQL FOR loop, to chunk the result set in batches of 200 records.

D. Use WHERE clauses on the SOQL query to reduce the number of records retrieved.

Answer: B C

Question #:213 What should be used to create scratch orgs?


CloudCertified Practice Tests

A. Developer Console

B. Salesforce CLI

C. Workbench

D. Sandbox refresh

Answer: B

Question #:214 Which three operations affect the number of times a trigger can fire?

Choose 3 answers

A. Process Flows

B. Workflow Rules

C. Criteria-based Sharing calculations

D. Email messages

E. Roll-Up Summary fields

Answer: A B E

Question #:215

Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package application. One of
the application modules allows theuser to calculate body fat using the Apex class,BodyFat, and its
method,calculateBodyFat(). The product owner wants to ensure this method is accessible by the
consumer of the application when developing customizations outside the ISV’s package namespace.
CloudCertified Practice Tests

Which approach should a developer take to ensurecalculateBodyFat()is accessible outside the


package namespace?

A. Declare the class and method using the public access modifier.

B. Declare the class as global and use the public access modifier on the method.

C. Declare the class as public and use the global access modifier on the method.

D. Declare the class and method using the global access modifier.

Answer: D

Question #:216

A developer must create a CreditcardPayment class that provides an implementation of an existing


Payment class. Public virtual class Payment { public virtual void makePayment(Decimal amount) {
/*implementation*/

} } Which is the correct implementation?

A. Public class CreditcardPayment extends Payment {

public override void makePayment(Decimal amount) { /*implementation*/ }

B. Public class CreditCardPayment implements Payment {

public virtual void makePayment(Decimalamount) { /*implementation*/ }


CloudCertified Practice Tests

C. Public class CreditCardPayment extends Payment {

public virtual void makePayment(Decimal amount) { /*implementation*/ }

D. Public class CreditCardPayment implements Payment {

publicoverride void makePayment(Decimal amount) { /*Implementation*/ }

Answer: A

Question #:217

The values 'High', 'Medium', and 'Low' are Identified as common values for multiple picklist across
different object. What is an approach a developer can take to streamline maintenance of the picklist
and their values, whilealso restricting the values to the ones mentioned above?

A.Create the Picklist on each object and use a Global Picklist Value Set containing the Values.

B.Create the Picklist on each object as a required field and select "Display values alphabeticaly, not
in the order entered".

C,Create the Picklist on each object and select "Restrict picklist to the values defined in the value
set".
CloudCertified Practice Tests

D.Create the Picklist on each and add a validation rule to ensure data integrity.

Answer: A

Question #:218

A developer must provide a custom userinterface when users edit a Contact. Users must be able to
use the interface in Salesforce Classic and Lightning Experience.

What should the developer do to provide the custom user interface?

A. Override the Contact’s Edit button with a Visualforce page in Salesforce Classic and a
Lightning component in Lightning Experience.

B. Override the Contact’s Edit button with a Visualforce page in Salesforce Classic and a
Lightning page inLightning Experience.

C. Override the Contact’s Edit button with a Lightningcomponent in Salesforce Classic and a
Lightning component in Lightning Experience.

D. Override the Contact’s Edit button with a Lightning page in Salesforce Classic and a
Visualforce page in Lightning Experience.

Answer: A

Question #:219 A developer has the following requirements:

Calculate the total amount on an Order.

Calculate the line amount for each Line Item based on quantity selected and price. Move Line Items
to a different Order if a Line Item is not stock.

Which relationship implementation supports these requirements?

A. Line Items has a Master-Detail field to Order and the Master can bere-parented.
CloudCertified Practice Tests

B. Line Item has a Lookup field to Order and there can be many Line Items per Order

C. Order has a Lookup field to Line Item and there can be many Line Items per Order.

D. Order has a Master-Detail field to Line Item and there can be many LineItems per Order.

Answer: A

Question #:220

Universal Containers wants to assess the advantages of declarative development versus


programmatic customization for specific use cases in its Salesforce implementation.

What are two characteristics of declarative development over programmatic customization? Choose
2 answers

A. Declarative development has higher design limits and query limits.

B. Declarative development can be done using the Setup UI.

C. Declarativedevelopment does not require Apex test classes.

D. Declarative code logic does not require maintenance or review.

Answer: B C

Question #:221

A developer Isasked to create a Visualforce page that lists the contacts owned by the current user.
This component will be embedded In a Lightning page.
CloudCertified Practice Tests

Without writing unnecessary code, which controller should be used for this purpose?

A. Standard list controller

B. Standard controller

C. Lightning controller

D. Custom controller

Answer: B

Question #:222 Refer to the following Apex code

What is the value of x when it is written to the debug log?

A. 0

B. 1

C. 2

D. 3

Answer: C

Question #:223 A developer must create a lightning component that allows users to input contact
record

information to create a contact record, including a salary c custom field. what should the
developeruse, along with a lightning-record-edit form, so that salary c field functions as a
CloudCertified Practice Tests

currency input and is only viewable and editable by users that have the correct field levelpermissions
on salary C?

A. <ligthning-input-field field-name="Salary c">

</lightning-input-field>

B. <lightning-formatted-number value="Salary c" format-style="currency">

</lightning-formatted-number>

C. <lightning-input type="number" value="Salary c" formatter="currency">

</lightning-input>

D. <lightning-input-currencyvalue="Salary c">

</lightning-input-currency>

Answer: A

Question #:224 Which action causes a before trigger to fire by default for Accounts?

A. Renaming or replacing picklist

B. Importing data using the Data Loader and the Bulk API

C. Converting Leads to Contact accounts


CloudCertified Practice Tests

D. Updating addresses using the Mass Address update tool

Answer: B

Question #:225

The Salesforce Administrator created a custom picklist field, Account_status_c, on the a Account
object. This picklist has possible values of Inactive’’ and Active?

As part of a new business process, management wants to ensure an opportunity record is created
only for Accounts marked as "Active". A developer is asked to implement this business requirement.

Which two automation tools should be used to fulfill the business need? Choose 2answers

A. Salesforce Flow

B. Approval Process

C. Process Builder

D. Workflow Rules

Answer: A C

Question #:226 When importing and exporting data into Salesforce, which two statements are
true?

Choose 2 answers

A. Bulk API can be used to import large data volumes in development environments without
bypassing the storage limits.

B. Bulk API can be used to bypass the storage limits when importing large data volumes in
development environments.
CloudCertified Practice Tests

C. Developer andDeveloper Pro sandboxes have different storage limits.

D. Data import wizard is a client application provided by Salesforce.

Answer: C D

Question #:227

Universal Containers recently transitioned from Classic to Lighting Experience. One of its business
processes requires certain value from the opportunity object to be sent via HTTP REST callout to its
external order management system based on a user-initiated action on the opportunity page.
Example values are as follow

Name Amount Account

Which two methods should the developer implement to fulfill thebusiness requirement? (Choose 2
answers)

A. Create a Lightning component that performs the HTTP REST callout, and use a Lightning
Action to expose the component on the Opportunity detail page.

B. Create a Process Builder on the Opportunity object that executes an Apex immediate action
to perform the HTTP REST callout whenever the Opportunity is updated.

C. Create an after update trigger on the Opportunity object that calls a helper method using
@Future(Callout=true) to perform the HTTP REST callout.

D. Create a Visualforce page that performs the HTTP REST callout, and use a Visualforce quick
action to expose the component on the Opportunity detail page.

Answer: A C

Question #:228 Universal Containers wants Opportunities to no longer be editable when it reaches
the Closed/Won stage.

Which two strategies can a developer use to accomplish this? Choose 2 answers
CloudCertified Practice Tests

A. Use the Process Automation settings.

B. Use an after-save flow.

C. Use a trigger.

D. Use a validation rule.

Answer: C D

Question #:229 How many accounts will be inserted by thefollowing block ofcode? for(Integer i = 0 ;
i<

500; i++) { Account a = new Account(Name='New Account ' + i); insert a; } 0

Boolean odk; Integer x;

if(abok=false;integer=x;){ X=1;

}elseif(abok=true;integer=x;){ X=2;

}elseif(abok!=null;integer=x;){ X=3;

)elseif{ X=4;}

A. X=4

B. X=8

C. X=9

D. X=10

Answer: A
CloudCertified Practice Tests

Question #:230 What are two ways a developer can get the status of an enquered job for a class
that queueable interface?

Choose 2 answers

A. View the apex status Page

B. View the apex flex Queue

C. View the apex Jobs page

D. Query the AsyncApexJobe object

Answer: A C

Question #:231
CloudCertified Practice Tests

Universal Containers has an order system that uses an Order Number to identify an order for
customers and service agents. Order will be imported into Salesforce.

A. Lookup

B. Direct Lookup

C. Number with External ID

D. Indirect Lookup

Answer: C

Question #:232

A Licensed_Professional c custom object exist in the system with two Master-Detailfields for the
following objects: Certification c and Contact. Users with the "Certification Representative" role can
access the Certification records they own and view the related Licensed Professionals records,
however users with the "Salesforce representative" role report they cannot view any Licensed
professional records even though they own the associated Contact record. What are two likely
causes of users in the "Sales Representative" role not being able to access the Licensed Professional
records? Choose 2 answers

A. The organization's sharing rules for Licensed_Professional c have not finished their
recalculation process.

B. The organization recently modified the Sales representative role to restrict Read/Write
access to Licensed_Professional c

C. The organization has a private sharing model for Certification c, and Contact is the primary
relationship in the Licensed_Professional c object

D. The organization has a private sharing model for Certification c, and Certification c is the
primary relationship in the Licensed_Professional c object.
CloudCertified Practice Tests

Answer: A

Question #:233

An Approval Process is defined in the Expense_Item c. A business rule dictates that whenever auser
changes the Status to 'Submitted' on an Expense_Report c record, all the Expense_Item c records
related to the expense report must enter the approval process individually. Which approach should
be used to ensure the business requirement is met?

A. Create a Process Builder on Expense_Report c with a 'Submit for Approval' action type to
submit all related Expense_Item c records when the criteria is met.

B. Create two Process Builder, one on Expense_Report c to mark the related Expense_Item c as
submittable and the second on Expense_Item c to submit the records for approval.

C. Create a Process Builder on Expense_Report c to mark the related Expense_Item c as


submittable and trigger on Expense_item c to submit the records for approval.

D. Createa Process Builder on Expense_Report c with an 'Apex' action type to submit all related
Expense_Item c records when the criteria is met.

Answer: B

Question #:234 Given the following Apex statement:

Account myAccount = [SELECT Id, Name FROM Account];


CloudCertified Practice Tests

What occurs when more than one Account is returned by the SOQL query?

A. The variable,myAccount, is automaticallycast to the List data type.

B. The first Account returned is assigned tomyAccount.

C. The query fails and an error is written to the debug log.

D. An unhandled exception is thrown and the code terminates.

Answer: D

Question #:235 What are two benefits of using declarative customizationsover code? Choose 2
answers

What are two benefits of using declarative customizations over code?

A. Declarative customizations automatically update with each Salesforce release.

B. Declarative customizations automatically generate test classes.

C. Declarative customizations automatically generate test classes.

D. Declarative customizations generally require less maintenance.

Answer: A C

Question #:236 Which two statements are accurate regarding Apex classes and interfaces?

Choose 2 answers
CloudCertified Practice Tests

A. Classes are finalby default.

B. Inner classes are public by default.

C. Interface methods are public by default.

D. A top-level class can only have one inner class level.

Answer: C D

Question #:237

A developer wrote Apex code that calls out to an external system. How should a developer write the
test to provide test coverage?

A. Write a class that extends HTTPCalloutMock.

B. Write a classthat implements the HTTPCalloutMock interface.

C. Write a class that implements the WebserviceMock interface.

D. Write a class that extends WebserviceMock

Answer: B

Question #:238

A company has been adding data to Salesforce and has not done a good Job of limiting the creation
of duplicate Lead records. The developer is considering writing an Apex process to identify
duplicates and merge the records together.
CloudCertified Practice Tests

Which two statements are valid considerations when using merged?

Choose 2 answers

A. The field values on the master record are overwritten by the records being merged.

B. Merge is supported with accounts, contacts, cases, and leads.

C. External ID fields can be used with the merge method.

D. The merge method allows up to three records, including the master and two additional
records with the same sObject type, to be merged into the master record.

Answer: B D

Question #:239

An Apex method, getAccounts, that returns a List of Accounts given a search Term, is available for
Lighting Web componentsto use. What is the correct definition of a Lighting Web component
property that uses the getAccounts method?

A. @AuraEnabled(getAccounts, ‘$searchTerm’) accountList;

B. @wire(getAccounts, ‘$searchTerm’) accountList;

C. @AuraEnabled(getAccounts, {searchTerm: ‘$searchTerm’}) accountList;

D. @wire(getAccounts, {searchTerm: ‘$searchTerm’}) accountList;

Answer: D

Explanation

https://developer.salesforce.com/docs/component-
library/documentation/en/48.0/lwc/lwc.data_wire_service_abo
CloudCertified Practice Tests

Question #:240 A developer is asked to create a Visualforce page that displays some Account fields
as well

as fields configured on the page layout for related Contacts. How should the developer implement
this request?

A. Use the <apex:relatedList> tag.

B. Create a controller extension.

C. Use the <apex:include> tag.

D. Add a method to the standard controller.

Answer: A

Question #:241 Given the following trigger implementation:

trigger leadTrigger on Lead (before update){

final ID BUSINESS_RECORDTYPEID = '012500000009Qad';

for(Lead thisLead : Trigger.new){

if(thisLead.Company != null && thisLead.RecordTypeId != BUSINESS_RECORDTYPEID){


thisLead.RecordTypeId = BUSINESS_RECORDTYPEID;

}
CloudCertified Practice Tests

The developer receives deployment errors every time a deployment is attempted from Sandbox to
Production. What should the developer do to ensure a successful deployment?

A. Ensure BUSINESS_RECORDTYPEID is retrieved using Schema.Describe calls.

B. Ensure arecord type with an ID of BUSINESS_RECORDTYPEID exists on Production prior to


deployment.

C. Ensure BUSINESS_RECORDTYPEID is pushed as part of the deployment components.

D. Ensure the deployment is validated by a System Admin user on Production.

Answer: B

Question #:242 Which two conditions cause workflow rules to fire? Choose 2 answers

A. Changing the territory assignments of accounts and opportunities

B. Updating records using the bulk API

C. Converting leads to person accounts

D. An Apex Batch process that changes field values

Answer: B D

Question #:243 A workflow updates the value of a custom field for an existing Account.

How can a developer access the updated custom fieldvalue from a trigger?

A. By writing, a Before Update trigger and accessing the field value from Trigger.new

B. By writing an After Insert trigger and accessing the field value from Trigger.old
CloudCertified Practice Tests

C. By writing an After Update trigger and accessing the field value from Trigger.old

D. By writing a Before Insert trigger and accessing the field value from Trigger.new

Answer: A

Question #:244 Which two statements are true about Getter and Setter methods as they relate to
Visualforce?

A. Setter methods always have to be declared global.

B. There is no guarantee for the order in which Getter methods are called.

C. A corresponding Setter method is required for each Getter method.

D. Getter methods pass values from a controller to a page.

Answer: C D

Question #:245 For which three items can a trace flag be configured?

Choose 3 answers

A. Process Builder

B. Visualforce

C. Apex Class

D. Apex Trigger
CloudCertified Practice Tests

E. User

Answer: C D E

Question #:246

An org has an existing Visual Flow that creates an Opportunity with an Update records element. A
developer must update the Visual Flow also created a Contact and store the created Contact's ID on
the Opportunity.

A. Add a new Get Recordselement.

B. Add a new Create records element.

C. Add a new Quick Action (of type create) element.

D. Add a new Update records element

Answer: B

Question #:247 Which code displays the content of Visualforce page as PDF?

A. <apex:page renderAs=”pdf”>

B. <apex:page readeras’’ application/pdf’’>

C. <apex:page readerAs=‘’application/pdf’’>

D. <apex:page contentype ‘’ application/pdf’’)

Answer: A
CloudCertified Practice Tests

Question #:248

A developer needs to confirm that an Account trigger is working correctly without changing the
organization’s data. What would the developer do to test the Account trigger?

A. Use the Test menu on the developer Console to run all test classes for the account trigger.

B. Use the New button on the Salesforce Accounts Tab to create a new Account record.

C. Use the Open Execute Anonymous feature on the Developer Console to run an ‘insert
Account’ DMLstatement.

D. Use Deply from the Force.comIDE to deploy an ‘insert Account’ Apex class.

Answer: A

Question #:249

When a user edits the Postal Code on an Account, a custom Account text field named ''Timezone''
must be updated based on the values in a postalCodeToTimezone_c custom object.

What should be built to implement thisfeature?

A. Account custom trigger

B. Account approval process

C. Account assignment rule

D. Account workflow rule

Answer: A

Question #:250
CloudCertified Practice Tests

Which two statements accurately represent the MVC frameworkimplementation in Salesforce?


Choose 2 answers

A. Validation rules enforce business rules and represent the Controller (C) part of the MVC
framework

B. Lightning component HTML files represent the Model (M) part of the MVC framework.

C. Triggers that create records represent the Model (M) part of the MVC framework.

D. Standard and Custom objects used in the app schema represent the View (V) part of the
MVC framework

Answer: A C

Question #:251

A third-party vendor created an unmanaged Lightning web component. The Salesforce Administrator
wishes to expose the component only on Record Page Layouts.

Which two actions should the developertake to accomplish this business objective? Choose 2 answer

A. Specify lightningCommunity_Page as a target in the XML file.

B. Ensure isExposed is set to true on the XML file.

C. Specify lightningCommunity_Page_Layout as a target in the XML file.

D. Specify lightning_RecordPage as a target in the XML file.


CloudCertified Practice Tests

Answer: B D

Question #:252

Management asked for opportunities to be automatically created for accounts with annual revenue
greater than

$1,000,000. A developer created the following trigger on the Account object to satisfy this
requirement.

For( Account a; Trigger,new)

If (a . Annual Revenue > 1000000) (

List Opportunity opp List ={SELECT ID FROM Opportunity WHERE accountd = :a.ID};

If (oppList. Size ( )==0

Opportunity oppty = new Opportunity (NAME =a,name, StageName = ‘Prospecting’,


CloseDate = System.today().addDays(30));

Insert opty;

Users are able to update the account records via the UI and can see an opportunity created for high
annual revenue accounts. However, when the administrator tries to upload a list of 179 accounts
using Data Loader, It fails withsystem. Exception errors.

Which two actions should the developer take to fix the code segment shown above? Choose 2
answers

A. Check if all the required fields for Opportunity are being added on creation.

B. Use Database.query to query the opportunities.

C. Move the DML that saves opportunities outside the for loop.

D. Query for existing opportunities outside the for loop.

Answer: C D

Question #:253 Refer to the following code that runs in an Execute Anonymous block:
CloudCertified Practice Tests

In an environment where the full result set is returned, what is a possible outcome of this code?

A. The total number of records processed as a result of DMLstatements will be exceeded

B. The total number of records processed as a result of DML statements will be exceeded.

C. The transaction will succeed and the first ten thousand records will be committed to the
database.

D. The total number of DML statements will be exceeded.

Answer: B

Question #:254 What is the result of the following code snippet?

A. 201 Accounts are inserted.

B. 200 Accounts are inserted.

C. 0 Accounts are inserted.

D. 1 Account is inserted.

Answer: C

Question #:255 Cloud kicks has a multi-screen flow that its call center agents use when handling
inbound service desk calls.

At one of the steps in the flow, the agents should be presented with a list of order numbers and
dates that are retrieved from an external order management system in real time and displayed on
the screen.

What should a developer use to satisfy this requirement?

A. An Apex controller

B. An Apex REST class

C. An outbound message

D. An invocable method
CloudCertified Practice Tests

Answer: B

Question #:256 Which three statements are true regarding trace flags? (Choose three.)

A. Setting trace flags automatically cause debug logs to begenerated.

B. Logging levels override trace flags.

C. Trace flags override logging levels.

D. If active trace flags are not set, Apex tests execute with default logging levels.

E. Trace flags can be set in the Developer Console, Setup, or using the ToolingAPI.

Answer: C D E

Question #:257

A developer needs to join data received from an integration with an external system with parent
records inSalesforce. The data set does not contain the Salesforce IDs of the parent records, but it
does have a foreign key attribute that can be used to identify the parent.

Which action will allow the developer to relate records in the data model without knowingthe
Salesforce ID?

A. Create a custom field on the child object of type Foreign Key

B. Create and populate a custom field on the parent object marked as Unique

C. Create and populate a custom field on the parent object marked as an External ID.

D. Create acustom field on the child object of type External Relationship.

Answer: C

Question #:258 What is a benefitof developing applications in a multi-tenant environment?

A. Enforced best practices for development

B. Access to predefined computing resources

C. Unlimited processing power and memory

D. Default out-of-the-box configuration

Answer: D

Question #:259
CloudCertified Practice Tests

Universal Containers has large number of custom applications that were built using a third-party
javaScript framework and exposed using Visualforce pages. The Company wants to update these
applications to apply styling that resembles the look and feel of Lightning Experience. What should
the developer do to fulfill the business request in the quickest and most effective manner?

A. Incorporate the Salesforce Lightning Design System CSS stylesheet into the JavaScript
applications.

B. Rewrite all Visualforce pages asLightning components.

C. Set the attribute enableLightning to true in the definition.

D. EnableAvailable for Lightning Experience, Lightning Communities, and the mobile app on
Visualforce pages used by the custom application.

Answer: A

Question #:260 A developer created a weather app that contains multiple Lightning web
components.

One of the components, called Toggle, has a toggle forFahrenheit or Celsius units. Another
component, called Temperature, displays the current temperature in the unit selected in the Toggle
component

When a user toggles from Fahrenheit to Celsius or vice versa in the Toggle component, the
information must besent to the Temperature component so the temperature can be converted and
displayed.

What is the recommend way to accomplish this?

A. Create a custom event to handle the communicate between the components.

B. Use Lightning Message Service to communicate between the component.

C. Use Lightning Message Service to communicate between the components.

D. The Toggle component should call a method in the Temperature component.

Answer: A

Question #:261

A developer must build application that tracks which Accounts have purchase specific pieces of
equal products. Each Account could purchase many pieces of equipment.

How should the developer track that an Account has purchased a piece of equipment.

A. Use the Asset object.

B. Use a Custom object.


CloudCertified Practice Tests

C. Use a Master-Detail on Product to Account

D. Use a Lookup on Account to product.

Answer: C

Question #:262 A develop created these three roll-up summary fields on the custom object.
Project_c:

Total -Timesheets -c

Total-Approved -Timesheets-c

Total -Rejected-Timesheet-c

The developer is asked to create a new field that should the ratio between rejected and approved
timesheet for a given project.

What are two benefits of choosing a formula held instead of anApex trigger to fulfill the request?
Choose 2 answers

A. A test class will validate the formula field during deployment.

B. A formula field will trigger existing automation when deployed.

C. A formula field will calculate the retroactively for existing records

D. Using a formula field reduces maintenance overhead.

Answer: B C

Question #:263

A developer created a Visualforce page and custom controller to display the account type field as
shown below. Custom controller code: public classcustomCtrlr{ private Account theAccount; public
String actType; public customCtrlr() { theAccount = [SELECT Id, Type FROM Account WHERE Id =

:apexPages.currentPage().getParameters().get('id')]; actType = theAccount.Type; } } Visualforce page


snippet: TheAccount Type is {!actType} The value of the account type field is not being displayed
correctly on the page. Assuming the custom controller is property referenced on the Visualforce
page, what should the developer do to correct the problem?

A. Add a gettermethod for the actType attribute.

B. Change theAccount attribute to public.

C. Convert theAccount.Type to a String.

D. Add with sharing to the custom controller.

Answer: A
CloudCertified Practice Tests

Explanation

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_custom.htm

Question #:264 An org has two custom objects:

Plan_c, thathas a master-detail relationship to the Account object.

Plan_item_c, that has a master-detail relationship to the plan_C object.

What should a developer use to create a Visualforce section in the Account page layout that displays
all of the plan.. Account and all of the Plan_item_c records related to those plan_c records.

A. A controller extension with a custom controller

B. A standard controller with a custom controller

C. A standard controller with a controller extension

D. A custom controller byitself

Answer: C

Question #:265

Which two types of process automation can be used to calculatethe shipping cost for an Order when
the Order is placed and apply a percentage of the shipping cost of some of the related Order
Products?

Choose 2 answers

A. Workflow Rule

B. Approval Process

C. Process Builder

D. Flow Builder
CloudCertified Practice Tests

Answer: C D

Make sure you keep checking email for updated questions, which will be shared on email on the
Order.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy