PD1 Flashcards

1
Q

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

Public void updateContact(Contact thisContact){

thisContact.Is_Active__c = false;

try{

update thisContact;

}catch(Exception e){

string errormessage = ‘An Error has eccored’;

}

}

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_Acve_c. is Updateable ( ) )

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

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

A

A,B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

for(Account a : [select id, industry from Account limit 150]){

if(thisAccount.Industry == ‘Technology’){

thisAccout.is_tech__c = true;

}

update thisAccount;

}

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

A . If executed in an asynchronous context, the apex transacon is likely to fall by exceeding the DML governor limit

B . The Apex transacon succeeds regardless of any uncaught excepon and all processed accounts are updated.

C . The Apex transacon fails with the following message. ‘SObject row was retrieved via SOQL without querying the requested field Account.Is.Tech__c’’.

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

A

B,C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which Lightning code segment should be written to declare dependencies on a Lightning component, c:accountList, that is used in a Visualforce page?

A . Opon A

B . Opon B

C . Opon C

D . Opon D

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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

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

A . Ant Migration Tool

B . SFDX CLI

C . Change Sets

D . Developer Console

A

Answer: A, B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A developer wants to mark each Account in a List as either or Inacve 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

A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A . Excepon

B . Messaging

C . OrgLimits

D . Limits

A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A developer wants to get access to the standard price book in 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 see the 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

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which two statements accurately represent the MVC framework implementation 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

A

A,C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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, Descripon, and a custom comments field.

Which consideraon should the developer be aware of when deciding between SOQ1 Mid SOSI ?

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.

A

C,D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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 definion.

As part of a data enrichment process. Universal Containers has a CSV file that contains updated data for all candidates in the system, f he file contains each Candidate’s primary id as a data point. Universal Containers wants to upload this informaon 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.

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

C . A Update the primaryid__c field definion to mark it as an External Id

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

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A developer needs to join data received from an integraon with an external system with parent records in Salesforce. The data set does not contain the Salesforce IDs of the parent records, but it does have a foreign key aribute that can be used to idenfy the parent.

Which acon will allow the developer to relate records in the data model without knowing the Salesforce ID?

Create a custom field on the child object of type Foreign Key

A . 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 10.

D . Create a custom field on the child object of type External Relaonship.

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What can be developed using the Lightning Component framework?

A . Hosted web applicaons

B . Single-page web apps

C . Dynamic web sites

D . Salesforce integraons

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which two characteriscs are true for Aura component events?

Choose 2

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

B . If a container component needs to handle a component event, add a handleFacets=’’ aribute to Its handler.

C . Only parent components that create subcomponents (either in their markup or programmacally) can handle events.

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

A

A,D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

For which three items can a trace flag be configured?

Choose 3 answers

A . Process Builder

B . Visualforce

C . Apex Class

D . Apex Trigger

E . User

A

C,D,E

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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-me loading for duplicate scripts

C . Specifying loading order

D . Loading scripts In parallel

E . Loading externally hosted scripts

A

B, C, D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

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 from user inputs across multiple Visualforce pages and from a parameter on the inial 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();

A

B, D, E

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

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

A . A list of newly created sObjects without IDS

B . Undefined

C . null

D . An empty list of sObjects

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

A custom object Trainer_c has a lookup field to another custom object Gym___c. Which SOQL query will get the record for the 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’

A

B

Was A but A is wrong

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

A workflow updates the value of a custom field for an existing Account. How can a developer access the updated custom field value from a trigger?

A . By wring, 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

C . By writing an Aer 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

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

A team of many developers work in their own individual orgs that have the same configuraon at the producon org. Which type of org is best suited for this scenario?

A . Developer Sandbox

B . Developer Edion

C . Full Sandbox

D . Partner Developer Edion

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

A developer wants to invoke on outbound message when a record meets a specific criteria. Which three features sasfy 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 outbound message 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.

A

Answer: A, B, C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

A developer has to idenfy a method in en Apex class that performs resource intensive acons in memory by iterang 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 the best practice to 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 Paral 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.

A

Answer: C, D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

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

Which three aributes need to be defined with values in the tag to accomplish this?

Choose 3 answers

A . renderAs

B . standard Controller

C . readOnly

D . Acon

E . extensions

A

Answer: A, B, E

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

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 opon it checked

D . Cascading delete operations

A

Answer: A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What should a developer use to obtain the Id and Name of all the Leads. Accounts, and Contacts that have the company name ‘Universal Containers’?

A . FIND ‘Universal Containers’ IN Name Fields RETURNING lead(id, name), account(id, name), contact(id, name)

B . SELECT Lead.id, Lead.Name, Account.Id, Account.Name, Contact.id, Contact.Name FROM Lead, Account,Contact WHERE Company Name = ‘Universal Containers’

C . SELECT lead(id, name), account(id, name), contact(id, name) FROM Lead, Account, Contact WHERE Name =’Universal Containers’

D . FIND ‘Universal Containers’ IN CompanyName Fields RETURNING lead(id, name), account(id, name), contact(id,name)

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Which three resources in an Azure Component can contain JavaScript funcons?

A . Controllers

B . helper

C . Design

D . Style

E . Renderer

A

Answer: A, B, E

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

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 instanang class

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

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

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Which three per-transacon limits have higher governor limits in asynchronous Apex transacons?

A . Maximum CPU me

B . Maximum heap size

C . Total SOQL queries

D . Maximum execuon me

E . Records returned by SOQL

A

Answer: A, C, E

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an enre suite of test allowing 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 unit test.

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

D . Create a nock using the Stud API

A

Answer: A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

which statement is true regarding execuon order when triggers are associated to the same object and event?

A . Trigger execuon order cannot be guaranteed.

B . executed In the order they are modified.

C . Triggers are executed alphabecally by trigger name.

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

A

Answer: A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Refer to the following code that runs in an Execute Anonymous block:

for(list theseLeads : [select lastname, company, email from lead lmit 20000]){

if(thisLead.Email == null){

thislead.Email = assignGenericEmail(ThisLead.Lastname, thisLead.Company);

}

database.Update(theseLeads,false)

}

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 DML statements will be exceeded

B. The transaction will succeed and the full result set changes will be committed to the database

C. The transaction will succeed and the first ten thousand records will be committed to the database
D. the total number of DML statements issued will be executed

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

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

A

C,D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

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 class that implements the HTTPCalloutMock interface.

C . Write a class that implements the WebserviceMock interface.

D . Write a class that extends WebserviceMock

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

What should be used to create scratch orgs?

A . Developer Console

B . Salesforce CLI

C . Workbench

D . Sandbox refresh

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

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

A . JavaScript

B . CSS

C . Java

D . PHP

E . HTML

A

Answer: A, B, E

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

How should a developer write unit tests for a private method in an Apex class?

A . Use the SeeAllData annotaon.

B . Add a test method in the Apex class.

C . Use the TestVisible annotaon.

D . Mark the Apex class as global.

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

A developer considers the following snippet of code:

Boolean isOk;

integer x;

string theString = ‘Hello’;

if(isOk == fasle && theString == ‘Hello’ ){

x=1;

}else if(isOk == true && theString == ‘Hello’ ){

x=2

}else if(isOk != null && theString == ‘Hello’){

x=3;

}else{

x=4;

}

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

A . 2

B . 1

C . 3

D . 4

A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

A developer must create a CreditcardPayment class that provides an implementaon of an exisng Payment class. Public virtual class Payment { public virtual void makePayment(Decimal amount) { /*implementaon*/ } } Which is the correct implementaon?

A . Public class CreditcardPayment extends Payment {

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

B . Public class CreditCardPayment implements Payment {

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

C . Public class CreditCardPayment extends Payment {

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

D . Public class CreditCardPayment implements Payment { public override void makePayment(Decimal amount) { /*Implementaon*/ } }

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

A developer must provide a custom user interface 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 buon with a Visualforce page in Salesforce Classic and a Lightning

component in Lightning Experience.

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

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

component in Lightning Experience.

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

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

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 a developer 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.

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

The Job_Applicaon__c custom object has a field that is a Master-Detail relaonship to the Contact object, where the Contact object is the Master. As part of a feature implementaon, a developer needs to retrieve a list containing all Contact records where the related Account Industry is ‘Technology’ while also retrieving the contact’s Job_Applicaon__c records.

Based on the object’s relaonships, what is the most efficient statement to retrieve the list of contacts?

A . [SELECT Id, (SELECT Id FROM Job_Applicaons_r) FROM Contact WHERE Account.Industry = ‘Technology’];

B . [SELECT Id, (SELECT Id FROM Job_Applicaons_r) FROM Contact WHERE Accounts.Industry = ‘Technology’];

C . [SELECT Id, (SELECT Id FROM Job_Applicaons_c) FROM Contact WHERE Accounts.Industry = ‘Technology’];

D . [SELECT Id, (SELECT Id FROM Job_Applicaon_c) FROM Contact WHERE Account.Industry = ‘Technology’];

A

B

mixed answers online

I think it is A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

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

A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

Which two are best practices when it comes to component and application event handling? (Choose two.)

A . Reuse the event logic in a component bundle, by pung 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.

A

A,C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package applicaon. One of the applicaon modules allows the user 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 applicaon when developing customizaons outside the ISV’s package namespace.

Which approach should a developer take to ensure calculateBodyFat() 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.

A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

A developer must write an Apex method that will be called from a Lightning component. The method may

delete an Account stored in the accountRec variable.

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

successfully perform deleons?

A . Schema.sObjectType.Account.isDeletable()

B . Account.isDeletable()

C . accountRec.isDeletable()

D . accountRec.sObjectType.isDeletable()

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

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

What is the correct implementaon of the ShippingCalculator class?

A:

public abstract class shippingCalculator{

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

}

B.

public abstract class shippingCalculator{

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

}

C.

public abstract class shippingCalculator{

public void calculate(){/*imp*/}

}

D.

public abstract class shippingCalculator{

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

}

A . Opon A

B . Opon B

C . Opon C

D . Opon D

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

Which two condions cause workflow rules to fire? Choose 2 answers

A . Changing the territory assignments of accounts and opportunies

B . Updang records using the bulk API

C . Converng leads to person accounts

D . An Apex Batch process that changes field values

A

Answer: B, D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

Which three statements are true regarding trace flags? (Choose three.)

A . Trace flags automatically cause debug logs to be generated.

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 Tooling API.

A

Answer: C, D, E

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

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

A . After insert

B . After update

C . Before update

D . Before insert

A

Answer: C, D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

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 . Public void doWork(sObject theRecord)

C . Public void doWork(Account Contact)

D . Public void doWork(Account || Contatc)

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

Which statement is true about developing in a multi-tenant environment?

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

B . Apex sharing controls access to records from 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 data from multiple tenants on the same instance

A

Answer: A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

An aer trigger on the Account object performs a DML update operaon on all of the child Opportunies of an Account. There are no acve triggers on the Opportunity object, yet a ‘‘maximum trigger depth exceeded’’ error occurs in certain situaons.

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

A . Changes to Opportunies are causing cross-object workflow field updates to be made on the Account.

B . Changes to Opportunies are causing roll-up summary fields to update on the Account. C . Changes are being made to the Account during an unrelated parallel save operaon.

D . Changes are being made to the Account during Criteria Based Sharing evaluaon.

A

Answer: A, B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

Which declarave process automaon feature supports iterang over mulple records?

A . Flows

B . Validation Rules

C . Approval Proces

D . Workflow rules

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

What are three techniques that a developer 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.

A

A,C,D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

What can used to delete components from production?

A . A change set deployment with the delete opon checked

B . An ant migraon tool deployment with destrucvechanges xml file and the components to delete in the package .xml file

C . A change set deployment with a destrucvechanges XML file

D . An ant migraon tool deployment with a destrucvechanges XML file and an empty package .xml file

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

Which standard field is required when creating a new contact record?

A . LastName

B . Name

C . AccountId

D . FirstName

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
57
Q

A developer needs to save a List of exisng Account records named myAccounts to the database, but the

records do not contain Salesforce Id values. Only the value of 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;

A

A,C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
58
Q

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:page contentType=’application/pdf’

D. apex:page renderAs=’pdf’

hps: //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. Convert a page to PDF by changing thetag.

A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
59
Q

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 definion of a Lightning Web component property that uses the getAccounts method?

A:

@wire (getAccounts, {searchTerm: ‘$searchTerm’})

accountList;

B:

@AuraEnabled (getAccounts, ‘$searchTerm’)

accountList;

C.

@AuraEnabled(getAccounts, {searchTerm: ‘$searchTerm’})

accountList;

D;

@wire (getAccounts, ‘$searchTerm’)

accountList;

A . Opon A

B . Opon B

C . Opon C

D . Opon D

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
60
Q

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

list retrive = [Select id, name, description from contact];

for(contact c : retrive){

//Field updated

}

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

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

B . Use visual keyword when declaring the retrieved 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.

A

B,C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
61
Q

A developer has a requirement to create an Order When an Opportunity reaches a ‘Closed Won’ status.

Which tool should be used to implement this requirement?

A . Process Builder

B . Lightning Component

C . Lightning

D . Apex trigger

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
62
Q

Universal Containers recently transioned from Classic to Lighng 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-iniated acon on the opportunity page. Example values are as follow

Name

Amount

Account

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

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

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

C . Create an aer 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 acon to expose the component on the Opportunity detail page.

A

A,C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
63
Q

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

A . Producon

B . Dev Hub

C . Environment Hub

D . Sandbox

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
64
Q

What should a developer do to check the code coverage of a class are 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 Class record.

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

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
Q

What is the result of the following code?

No Code Provided

A . The record will not be created and a excepon 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.

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
66
Q

A Salesforce developer wants to review their code changes immediately and does not want to install 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

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
67
Q

What are two characteristics related to formulas? Choose 2 answers.

A . Formula can reference themselves.
B . Formulas are calculated at run me and are not stored in the database.

C . Formulas can reference values in related objects.
D . Fields that are used in a formula field can be deleted or edited without the formula.

A

B,C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
68
Q

A developer of Universal Containers is tasked with implemenng a new Salesforce applicaon 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 applicaon? Choose 3 answers

A . Workflows

B . validaon Rules

C . Process Builder

D . Scheduled Jobs

E . Invocable Acons

A

A,B,C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
69
Q

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 . Use SOQL to query the org for the required data.

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

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

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
70
Q

The sales management team at Universal Containers requires that the 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 converng a Lead?

A . Process Builder

B . Validaon Rule

C . Formula Field

D . workflow Rule

A

B

71
Q

Universal Container use a simple order Management app. On the Order Lines, the order line total is calculated by mulplying the item price with the quanty ordered. There is a Master Detail relaonship between the Order and the Order Lines object.

What is the pracce 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 . Declarave Roll-Up Summaries App

A

A

72
Q

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

A

A,B,E

73
Q

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

A . Use the Flow properes page.

B . Use the code Coverage Setup page

C . Use the Apex testresult class

D . Use SOQL and the Tooling API

A

D

74
Q

A developer is asked to create a Visualforce page for Opportunies that allows users to save or merge 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

A

B

75
Q

A developer must build applicaon 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.

C . Use a Master-Detail on Product to Account

D . Use a Lookup on Account to product.

A

C

76
Q

An org tracks customer orders on an Order object and the items of an Order on the 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.

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.

A

A

77
Q

A custom picklist field, Food_Preference__c, exist on a custom object. The picklist contains the following opons: ‘Vegan’,’Kosher’,’No Preference’. The developer must ensure a value is populated every me a record is created or updated. What is the most efficient way to ensure a value is selected every me a record is saved?

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

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

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

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

A

B

78
Q

A Licensed_Professional__c custom object exist in the system with two Master-Detail fields for the following objects: Cerficaon__c and Contact. Users with the ‘Cerficaon Representave’ role can access the Cerficaon records they own and view the related Licensed Professionals records, however users with the ‘Salesforce representave’ 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 Representave’ role not being able to access the Licensed Professional records? Choose 2 answers

A . The organizaon’s sharing rules for Licensed_Professional__c have not finished their recalculaon process.

B . The organizaon recently modified the Sales representave role to restrict Read/Write access to Licensed_Professional__c

C . The organizaon has a private sharing model for Cerficaon__c, and Contact is the primary relaonship in the Licensed_Professional__c object

D . The organizaon has a private sharing model for Cerficaon__c, and Cerficaon__c is the primary relaonship in the Licensed_Professional__c object.

A

A,D

79
Q

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 me 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 field if an Account is inserted with an inial value of zero, assuming no other automaon logic is implemented on the Account?

A . 1

B . 3

C . 4

D . 2

A

B

80
Q

What is a key difference between a Master-Detail Relaonship and a Lookup Relaonship?

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

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

C . A Lookup Relaonship is a required field on an object.

D . When a record of a master object in a Master-Detail Relaonship is deleted, the detail records are kept and not deleted.

A

A

81
Q

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

A

A,B

82
Q

How does the Lightning Component framework help developers implement soluons 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

A

C

83
Q

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

A

A,C

84
Q

developer created this Apex trigger that calls MyClass .myStacMethod:

trigger myTrigger on Contact(before insert) ( MyClass.myStacMethod(trigger.new, trigger.oldMap); }

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

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

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

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

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

A

A

85
Q

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

A . 5

B . 6

C . 1

D . 2

A

B

86
Q

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

A

B,D

87
Q

An Approval Process is defined in the Expense_Item__c. A business rule dictates that whenever a user changes the Status to ‘Submied’ 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’ acon 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 submiable 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 submiable and trigger on Expense_item__c to submit the records for approval.

D . Create a Process Builder on Expense_Report__c with an ‘Apex’ acon type to submit all related Expense_Item__c records when the criteria is met.

A

B

88
Q

Universal Containers has large number of custom applicaons that were built using a third party javaScript framework and exposed using Visualforce pages. The Company wants to update these applicaons 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 effecve manner?

A . Incorporate the Salesforce Lightning Design System CSS stylesheet into the JavaScript applicaons.

B . Rewrite all Visualforce pages asLightning components.

C . Set the aribute enableLightning to true in the definion.

D . Enable Available for Lightning Experience, Lightning Communies, and the mobile app on Visualforce pages used by the custom applicaon.

A

C

89
Q

The following Apex method is part of the ContactService class that is called from a trigger: public stac void setBusinessUnitToEMEA(Contact thisContact){ thisContact.Business_Unit__c = ‘EMEA’ ; update thisContact; } How should the developer modify the code to ensure best pracce are met?

A . Public stac void setBusinessUnitToEMEA(List contacts){

for(Contact thisContact : contacts){

thisContact.Business_Unit__c = ‘EMEA’ ;

update contacts[0];

}

}

B . Public stac void setBusinessUnitToEMEA(List contacts){

for(Contact thisContact : contacts) {

thisContact.Business_Unit__c = ‘EMEA’ ;

}

update contacts;

}

C . Public stac void setBusinessUnitToEMEA(Contact thisContact){

List contacts = new List();

contacts.add(thisContact.Business_Unit__c = ‘EMEA’);

update contacts;

}

D . Public void setBusinessUnitToEMEA(List contatcs){

contacts[0].Business_Unit__c = ‘EMEA’ ;

update contacts[0];

}

A

C

90
Q

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

A

D

91
Q

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

A . $Lightning.createComponent

B . apex:slds

C . $Lightning.useComponent

D . $Lightning.use

E . apex:includeLightning

A

A,D,E

92
Q

what are the methods used to show input in classic and lightning ?

A . Use visualforce page in classic and lightning component in lightning

B . Salesforce CLI

C . Visual Studio Core IDE

D . Developer Console

A

A

93
Q

what are the three languages used in the visualforce page?

A . Javascript, CSS, HTML

B . Apex, Json, SQL

C . C++, CSS, query

A

A

94
Q

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; } 0

  1. 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

A

A

95
Q

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

A

B

96
Q

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

A . Producon

B . Dev Hub

C . Environment Hub

D . Sandbox

hps: //developer.salesforce.com/docs/atlas.en
us. sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs.htm

A

B

97
Q

If apex code executes inside the execute() method of an Apex class when implemenng 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 transacon.

B . The apex governor limits are reset for each iteraon of the execute() mrthod.

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

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

A

A,B

98
Q

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

A . @AuraEnabled(cacheable=true)

public stac List search(String term) { /* implementaon*/ }

B . @AuraEnabled(cacheable=true)

public List search(String term) { /*implementaon*/ }

C . @AuraEnabled(cacheable=false)

public stac List search(String term) { /*implementaon*/ }

D . @AuraEnabled(cacheable=false)

public List search(String term) { /*implementaon*/ }

A

A

99
Q

A developer must create a lightning component that allows users to input contact record informaon to create a contact record, including a salary__c custom field. what should the

developer use, along with a lightning-record-edit form, so that salary__c field funcons as a

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-currency value=’Salary__c’
lightning-input-currency

A

A

100
Q

Universal Containers implemented a private sharing model for the Account object. A custom Account search tool was developed with Apex to help sales representaves find accounts that match mulple 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.

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.

A

D

101
Q

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

A . Self-contained and reusable units of an applicaon

B . Rich component ecosystem

C . Automac code generaon

D . Server-side run-me debugging

A

A,B

102
Q

A developer is 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 record

A

B

103
Q

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

A . tag

B . Custom controller

C . RecordSetVar page aribute

D . Controller extension

A

C

104
Q

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 Opportunies.

C . Data Loader automacally relates Opportunies to Accounts.

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

A

B

105
Q

A developer idenfies the following triggers on the Expense_c object: DeleteExpense,

applyDefaultstoexpense

validateexpenseupdate;

The triggers process before delete, before insert, and before update events respecvely. Which two techniques should the developer implement to ensure trigger best pracce are followed? (Choose 2)

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

B . Maintain all three triggers on the Expense__c object, but move the Apex logic out for the trigger definion.

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 that includes all events.

A

C,D

106
Q

A developer observes that an Apex test method fails in the Sandbox. To idenfy 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 excepons 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 exisng data in the sandbox.

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

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

A

B

107
Q

A developer has a VF page and custom controller to save Account records. The developer wants to display any validaon rule violaon to the user. How can the developer make sure that validaon rule violaons are displayed?

A . Add custom controller aributes to display the message.

B . Include on the Visualforce page.

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

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

A

B

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

108
Q

A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validaon rule violaon to the user. How can the developer make sure that validaon rule violaons are displayed?

A . Add cuatom controller aributes to display the message.

B . Include on the Visualforce page.

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

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

A

B

109
Q

Given the following Apex statement:

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

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

A . The variable, myAccount, is automacally cast to the List data type.

B . The first Account returned is assigned to myAccount.

C . The query fails and an error is wrien to the debug log.

D . An unhandled excepon is thrown and the code terminates.

A

D

110
Q

Which three statements are true regarding custom exceptions in Apex? (Choose three.)

A . A custom exception class must extend the system Exception class.

B . A custom exception class can implement one or many interfaces.

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

D . A custom exception class name must end with ‘‘Exception’’.

E . A custom exception class can extend other classes besides the Exception class.

A

B,D,E

111
Q

Universal Containers stores Orders and Line Items in Salesforce. For security reason, financial representaves are allowed to see informaon on the Order such as order amount, but they are not allowed to see the Line items on the Order. Which type of relaonship should be used?

A . Lookup

B . Direct Lookup

C . Indirect lookup

D . Master Detail

A

A

112
Q

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

The above method might be called during a trigger execuon 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.

A

D

113
Q

Which salesforce org has a complete duplicate copy of the producon org including data and configuraon?

A . Developer Pro Sandbox

B . Paral Copy Sandbox

C . Producon

D . Full Sandbox

A

D

114
Q

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

A . Declare maxaempts as a member variable on the trigger definion.

B . Declare maxaempts as a private stac variable on a helper class

C . Declare maxaempts as a constant using the stac and final keywords

D . Declare maxaempts as a variable on a helper class

A

C

115
Q

A developer must create aShippingCalculatorclass that cannot be instanated and must include a working default implementaon of acalculatemethod, that sub-classes can override. What is the correct implementaon of theShippingCalculatorclass?

A . Public abstract class ShippingCalculator {

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

}

B . Public abstract class ShippingCalculator {

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

}

C . Public abstract class ShippingCalculator {

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

}

D . Public abstract class ShippingCalculator {

public void calculate() { /*implementaon*/ }

}

A

Answer: B

hps: //developer.salesforce.com/docs/atlas.en
us. apexcode.meta/apexcode/apex_classes_extending.htm

116
Q

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

A . Asynchronous Data Capture Events

B . Developer Log

C . Event Monitoring Log

D . Calendar Events

A

Answer: C

117
Q

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

A . Asynchronous Data Capture Events

B . Developer Log

C . Event Monitoring Log

D . Calendar Events

A

C

118
Q

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

class MyClass {

class CustomException exteds QueryException {}

public static Account aQuery(){

Account theAccount;

try{

system.debug(‘Querying Accounts’);

theAccount = [Select id from Account where createddate > TODAY];

}

Catch(CustomException ex){

system.debug(‘Custom Exception’);

}

Catch(queryException ex){

system.debug(‘query Exception’);

}Finally{

system.debug(‘Done’)

}

return theAccount;

}

}

A . Querying Accounts. Query Exception.

B . Querying Accounts. Custom Exception.

C . Querying Accounts. Query Exception. Done

D . Querying Accounts. Custom Exception Done.

A

C

119
Q

An Apex method, getAccounts, that returns a List of Accounts given a search Term, is available for Lighting Web components to 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;

A

D

120
Q

A developer is creang a test coverage for a class and needs to insert records to validate funconality. Which method annotaon should be used to create records for every method in the test class?

A . @BeforeTest

B . @isTest(SeeAllData=True)

C . @TestSetup

D . @PreTest

A

C

121
Q

A Next Best Acon strategy uses an Enchance Element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors. What is the correct definion of the Apex method?

A . @InvocableMethod

global stac ListRecommendaon getLevel(List input) { /*implementaon*/ }

B . @InvocableMethod

global stac List> getLevel(List input) { /*implementaon*/ }

C . @InvocableMethod

global List> getLevel(List input) { /*implementaon*/ }

D . @InvocableMethod

global Recommendaon getLevel (ContactWrapper input) { /*implementaon*/ }

A

B

122
Q

An org has an exisng 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 Records element.

B . Add a new Create records element.

C . Add a new Quick Acon (of type create) element.

D . Add a new Update records element

A

B

123
Q

Given the following trigger implementaon:

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;

}

}

}

The developer receives deployment errors every me a deployment is aempted from Sandbox to Producon.

What should the developer do to ensure a successful deployment?

A . Ensure BUSINESS_RECORDTYPEID is retrieved using Schema.Describe calls.

B . Ensure a record type with an ID of BUSINESS_RECORDTYPEID exists on Producon 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 Producon.

A

C

124
Q

Applicaon Events follow the tradional publish-subscribe model. Which method is used to fire an event?

A . Fire()

B . Emit()

C . RegisterEvent()

D . FireEvent()

A

A

125
Q

Which two events need to happen when deploying to a production org?

Choose 2 answers

A . All triggers must have at least 1% test coverage.

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

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

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

A

A,B

126
Q

What are three considerations when using the @InvocableMethod annotation in Apex? Choose 3 answers

A . A method using the @InvocableMethod annotation must define a return 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 or Global.

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

A

C,D,E

127
Q

A developer must implement a CheckPaymentProcessor class that provides check processing payment capabilies that adhere to what defined for payments in the PaymentProcessor interface. public interface PaymentProcessor { void pay(Decimal amount); } Which is the correct implementaon 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);

}

D . Public class CheckPaymentProcessor extends PaymentProcessor { public void pay(Decimal amount) {}

}

A

B

128
Q

A developer created a Visualforce page and custom controller to display the account type field as shown below. Custom controller code: public class customCtrlr{ 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: The Account 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 get method for the actType aribute.

B . Change theAccount aribute to public.

C . Convert theAccount.Type to a String.

D . Add with sharing to the custom controller.

A

A

hps: //developer.salesforce.com/docs/atlas.en
us. pages.meta/pages/pages_controller_custom.htm

129
Q

A recursive transacon is limited by a DML statement creang records for these two

objects:

  1. Accounts
  2. Contacts

The Account trigger hits a stack depth of 16.

Which statement is true regarding the outcome of the transacon?

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

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

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

D . The transacon succeeds and all the changes are commied to the database.

A

D

130
Q

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

A . Check the state of the retrieveRecords variable and throw a custom excepon 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 declaraon from ount to a single Account.

A

B

131
Q

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

A . Override the Account’s Edit buon with Lightning Flow

B . Override the Account’s Edit buon with Lightning Acon

C . Override the Account’s Edit buon with Lightning page.

D . Override the Account’s Edit buon with Lightning component.

A

D

132
Q

Universal Container(UC) wants to lower its shipping cost while making the shipping process more efficient. The Distribuon Officer advises UC to implement global addresses to allow mulple Accounts to share a default pickup address. The Developer is tasked to create the

supporng object and relaonship 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.

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

A

A

133
Q

A developer is implemenng an 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 me? 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 . Use the final keyword and assign its value when declaring the variable.

A

B,D

134
Q

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.

A

B,C,D

135
Q

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 producon fails with the test coverage warning: ‘Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required’ What should 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

A

A

136
Q

Universal Containers decides to use exclusively declarative development to build out a new Salesforce application. Which three options should be used to 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

A

A,C,D

137
Q

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 tag.

B . Create a controller extension.

C . Use the tag.

D . Add a method to the standard controller.

A

A

138
Q

Universal Containers (UC) decided it will not to send emails to support personnel directly from Salesforce in the event that an unhandled excepon occurs. Instead, UC wants an external system be nofied of the error. 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 nofy the external system.

A

B

139
Q

While wring a test class that covers an OpportunityLineItem trigger, a Developer 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 the existing standard PriceBook.

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

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

A

A

140
Q

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}’

A

B

141
Q

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 be re-parented.

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 Line Items per Order.

A

A

142
Q

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 me 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 field if an Account is inserted with an inial value of zero, assuming no other automation logic is implemented on the Account?

A . 3

B . 2

C . 1

D . 4

A

B

143
Q

Which statement generates a list of Leads and Contacts that have a field with the phrase ‘ACME’?

A . List searchList = (FIND ‘*ACME*’ IN ALL FIELDS RETURNING Contact, Lead);

B . List> searchList = (FIND ‘*ACME*’ IN ALL FIELDS RETURNING Contact, Lead);

C . Map searchList = (FIND ‘*ACME*’ IN ALL FIELDS RETURNING Contact, Lead);

D . List> searchList = (SELECT Name, ID FROM Contact, Lead WHERE Name like ‘%ACME%’);

A

B

144
Q

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

A .

B .

C .

D . apex:aconStatus

A

A

145
Q

Which three data types can a SOQL query return? Choose 3 answers

A . List
B . Long
C. Integer
D. sObject

A

A,C,D

146
Q

Which three process automation can immediately send an email nonfiction to the owner of an Opportunity when its Amount is changed to be greater than $10,000? Choose 3 answers

A . Workflow Rule
B . Flow Builder
C. Approval Process
D. Escalaton Rule
E. Process Builder

A

A,C,E

147
Q

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 relationship but 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.

A

A

148
Q

Where are two locations a developer can look to find information about the status of asynchronous or future calls? Choose 2 answers

A . Apex Flex Queue

B . Apex Jobs

C . Paused Flow Interviews component

D . Time-Based Workflow Monitor

A

A,B

149
Q

A developer has an 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’))

A

D

150
Q

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}

A

A

151
Q

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’ DML statement.

D . Use Deploy from the Force.com IDE to deploy an ‘insert Account’ Apex class.

A

A

152
Q

Which exception type cannot be caught?

A . CalloutExcepon

B . A custom Exception

C . NoAccessExcepon

D . LimitExcepon

A

D

153
Q

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 ship date 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 the LATEST formula on each of the latest availability date fields.

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

A

D

154
Q

A developer needs to prevent the creation of request 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 (aer 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 me.’};

}

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

Request.addError {‘Your request cannot be created at this me.’}; }

A

B

155
Q

Given the following Anonymous Block:

list caseToUpdate = new list();

for(case c : [select id, status from Case LIMIT 5000]){

c.status = ‘Working’;

caseToUpdate.add(c);

}

try{

database.update(caseToUpdate ,FALSE);

}Catch(exception e){

system.debug(e.getMessage());

}

What should a developer consider for an environment that has over 10,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.

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

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

A

A

156
Q

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() { /*implementaon*/}

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

]

B . Public class DrawList extends Sortable, Drawable {

public void sort() { /*implementaon*/}

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

}

C . Public class DrawList implements Sortable, Drawable {

public void sort() { /*implementaon*/}

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

}

D . Public class DrawList extends Sortable, extends Sortable, extends Drawable { public void sort() { /*implementaon*/ }

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

A

C

157
Q

Which two are phases in the Salesforce Applicaon Event propagaon framework? Choose 2 answers

A . Bubble

B . Default

C . Capture

A

B,C

158
Q

What does the Lightning Component framework provide to developers?

A . Extended governor limits for applicaons

B . Prebuilt component that can be reused.

C . Templates to create custom components.

D . Support for Classic and Lightning UIS.

A

B

159
Q

A developer needs to implement the functionality for a service agent to gather multple pieces of information from a customer in order to send a replacement credit card.

Which automaton tool meets these requirements

A . Flow Builder

B. Workflow Rule

C. Process Builder

D. Validation Rule

A

A

160
Q

Which code displays the content of Visualforce page as PDF?

A .

B .

C .

D .

A

A

161
Q

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 . Developer sandboxes

B . Scratch orgs

C . Full Copy sandboxes

D . Developer orgs

A

B

162
Q

Assuming that ‘name; is a String obtained by an tag on a Visualforce page. Which two SOQL queries performed are safe from SOQL injections? Choose 2 answers

A . String query = ‘SELECT Id FROM Account WHERE Name LIKE '’%’ + name.noQuotes() + ‘%'’;

List results = Database.query(query);

B . String query = ‘SELECT Id FROM Account WHERE Name LIKE '’%’ + String.escapeSingleQuotes(name) + ‘%'’;

List results = Database.query(query);

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

D . String query = ‘%’ + name + ‘%’; List results = [SELECT Id FROM Account WHERE Name LIKE :query];

A

B,D

163
Q

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?

A . Use the New button on the Salesforce Contacts Tab to create a new Contact record.

B . Use the Open execute Anonymous feature on the Developer Console to run an ‘insert Contact’ DML statement

C . Use Deploy from the VSCode IDE to display an ‘insert Contact’ Apex class.

D . Use the Test menu on the Developer Console to run all test classes for the Contact trigger

A

D

164
Q

A Visual Flow uses an apex Acon 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=’Addional Info’)

public List getInfo(List contactIds)

{ /*implementaon*/ }

B . @InvocableMethod(label=’addional Info’)

public stac ContactInfo getInfo(Id contactId)

{ /*implementaon*/ }

C . @invocableMethod(label)=’Addional Info’)

public stac List getInfo(List contactIds)

{ /*Implementaon*/ }

D . @InvocableMethod(Label=’addional Info’)

public ContactInfo(Id contactId)

{ /*implementaon*/ }

A

C

165
Q

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

A . Use the Data Loader command line.

B . Create a Schedulable Apex class.

C . Schedule a report.

D . Define a Data Export scheduled job.

A

D

166
Q

A Visual Flow uses an apex Acon 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=’Addional Info’)

public List getInfo(List contactIds)

{ /*implementaon*/ }

B . @InvocableMethod(label=’addional Info’)

public stac ContactInfo getInfo(Id contactId)

{ /*implementaon*/ }

C . @invocableMethod(label)=’Addional Info’)

public stac List getInfo(List contactIds)

{ /*Implementaon*/ }

D . @InvocableMethod(Label=’addional Info’)

public ContactInfo(Id contactId)

{ /*implementaon*/ }

A

C

167
Q

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

A

C

168
Q

Which aspect of Apex programming is limited due to multitenancy?

A . The number of active Apex classes

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

A

D

169
Q

The values ‘High’, ‘Medium’, and ‘Low’ are Identified as common values for multiple picklists across the different objects. What is an approach a developer can take to streamline maintenance of the picklist and their values, while also 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 alphabetically, not in the order entered’.

C . Create the Picklist on each object and select ‘Restrict picklist to the values defined in the value set’.

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

A

A

170
Q

A developer uses a loop to check each Contact in a list. When a Contact with the Title of ‘‘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

A

A

171
Q

A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system. Within the class, the developer identifies the following method as a security threat: List 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 lack? Choose 2 answers

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

B . Use the escapeSingleQuote method to sanitize 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.

A

A,B

172
Q

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

A

A

173
Q

Which three steps allow a custom SVG to be included in a Lightning web component? Choose3 answers

A. Upload the SVG as a sta􀌬c resource.

B. Import the statc resource and provide a better for it in JavaScript.

C. Reference the getter in the HTML template.
D. Reference the import in the HTML template.
E. Import the SVG as a content asset file.

A

A,B,C