Dev Cert Flashcards

1
Q

1 - Refer to the following Apex code:
Integer x = 0;
do {
x = 1;
x++;
}while (x<1);
System.debug(x);
What is the value of x when it is written to the debug log?
A. 0
B. 1
C. 2
D. 3

A

C

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

2 - 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.AnnualRevenue > 1000000) {
List<Opportunity> opplist = (SELECT Id FROM Opportunity WHERE accountId = :a. Id];
if (opplist.size() == 0) {
Opportunity oppty = new Opportunity (Name = a.name, StageName = ‘Prospecting’,</Opportunity>

ClogeDate = system. today ().addDays (30) ) ;
insert oppty;
}
}
}
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 with System Exception errors.

Which two actions should the developer take to fix the code segment shown above?
Choose 2 answers
A. Move the DML that saves opportunities outside of the for loop.
B. Query for existing opportunities outside of the for loop.
C. Use Database. query to query the opportunities.
D. Check if all the required fields for Opportunity are being added on creation.

A

A and B

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

3 - What are two use cases for executing Anonymous Apex code?
Choose 2 answers
A. To run a batch Apex class to update all Contacts
B. To schedule an Apex class to run periodically
C. To add unit test code coverage to an org
D. To delete 15,000 inactive Accounts in a single transaction after a deployment

A

B and D

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

4 - 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 Defect o to represent that a defect is a cause of a customer issue

Case and Defect__c have Private organization-wide defaults.
What should be done to share a specific Case_Defect__c record with a user?
A. Share the parent Defect_c record.
B. Share the parent Case and Defect__c records.
C. Share the Case_Defect__ c record.
D. Share the parent Case record.

A

B

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

5 - A developer created a trigger on the Account object and wants to test if the trigger is properly bulkified. 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. Create a static resource containing test data.
B. Use the @isTest (seeAllData=true) annotation in the test class
C. Use the @isTest (iParallel=true) annotation in the test class
D. Use Test.loadData to populate data in your test methods.

A

A and D

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

6 - A developer is building custom search functionality that uses SOSL to search account and contact records that match search terms provided by the end user. The feature is exposed through a Lightning web component, and the end user is able to provide a list of terms to search.
Consider the following code snippet:

@AuraEnabled
public static Ligt<List<sObject>> searchTerms(List<String> termList) {
List‹List<sObject>> result = new List <List<sObject>> ();
for (String term : termList){
regult.addAll([FIND :term IN ALL FIELDS RETURNING Account (Name),</sObject></sObject></String></sObject>

Contact (FirstName, LastName) ]) ;
}
return result;
}
What is the maximum number of search terms the end user can provide to successfully execute the search without exceeding a governor limit?
A. 20
B. 150
C. 200
D. 2,000

A

D

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

7 - A developer creates a Lightning 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. XML file
C. JavaScript file
D. Apex class

A

D

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

8 - A developer is creating a Lightning web component to show a list of sales records. The Sales Representative user should be able to see the commission field on each record. The Sales Assistant user should be able to see all fields 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 Security. stripInaccessible to remove fields inaccessible to the current user.
B. Use Lightning Data Service to get the collection of sales records.
C. Use WITH SECURITY_ENFORCED in the SQL that fetches the data for the component.
D. Use Lightning Locker Service to enforce sharing rules and field-level security.

A

A

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

9 - AW Computing (AWC) handles orders in Salesforce and stores its product inventory in a field, Inventory__c, on a custom object, Product__c. When an order for a Product__c is placed, the Inventory__c field is reduced by the quantity of the order using an Apex trigger.

public void reduceInventory (Id prodid, Integer gty){
Integer newInventoryAmt = getNewInventoryAmt (prodId, qty) ;
Product__c = new Product__c(Id = prodId, Inventory__c = newInventoryAmt;
Uptade p;
// code goes here
}

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 is currently planning.

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

A. InventoryReductionEvent__c ev = new InventoryReductionEvent__c (ProductId__c = prodId, Reduction__c = qty);
EventBus.publish (ev);
B. InventoryReductionEvent__e ev = new InventoryReductionEvent__e (ProductId__c = prodId, Reduction__c = qty);
insert ev;
C. InventoryReductionEvent__c ev = new InventoryReductionEvent__c (ProductId__c = prodId, Reduction__c = qty);
insert ev;
D. InventoryReductionEvent__e ev = new InventoryReductionEvent__e (ProductId__c = prodId, Reduction__c = qty);
EventBus.publish (ev);

A

D

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

10 -The OrderHelper class is a utility class that contains business logic for processing orders. Consider the following code
snippet:

public class without sharing OrderHelper{
//code implementation
}
A developer needs to create a constant named DELIVERY_MULTIPLIER 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 MULTIPLIER constant to meet the business objectives?

A. decimal DELIVERY MULTIPLIER=4.15;
B. static decimal DELIVERY MULTIPLIER=4.15;
C. constant decimal DELIVERY MULTIPLIER = 4.15:
D. static final decimal DELIVERY MULTIPLIER =4.15;

A

D

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

11 - A developer is asked to create a Visualforce page that lists the contacts owned by the current user. This component will be embedded in a Lightning page. Without writing unnecessary code, which controller should be used for this purpose?

A. Standard list controller
B. Custom controller
C. Lightning controller
D. Standard controller

A

A

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

12 - Which two sfdx commands can be used to add testing data to a Developer sandbox?
Choose 2 answers
A. force:data:tree:import
B. force:data:object:create
C. force:data:bulk:upsert
D. force:data:async:upsert

A

A and C

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

13 -A developer is debugging the following code to determine 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 try/catch around the insert method.
B. Add a System.debug() statement before the insert method.
C. Set the second insert method parameter to TRUE.
D. Collect the insert method return value in a SaveResult record.

A

D

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

14 - An org has two custom objects:

● Plan__c, that has 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 on the Account page layout that displays all of the Plan__c records related to the Account and all of the Plan_Item__c records related to those Plan__c records.
A. A custom controller by itself
B. A standard controller with a controller extension
C. A standard controller with a custom controller
D. A controller extension with a custom controller

A

B

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

15 - 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 developer take to accomplish this business objective?
Choose 2 answers
A. Ensure isExposed is set to true on the XML file.
B. Specify lightning__RecordPage as a target in the XML file.
C. Specify lightningCommunicy__Page_Layout as a target in the XML file.
D. Specify lightningCommunity__Page as a target in the XML file.

A

A and B

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

16 - 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 fields to Order__c and Order_Line__c
C. Order Shipment_ Group_ c object and master-detail field on Order__c
D. Order Shipment Group__c object and master-detail field on Order_Shipment_Group__c

A

B

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

17 - Which annotation exposes an Apex class as a RESTful web service?
A. @RestResource
B. @AuraEnabled
C. @HttpInvocable
D. @RemoteAction

A

A

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

18 - Universal Containers has a support process that allows users to request 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. Lookup field from Opportunity to Engineering_ support__c
B. Master-detail field from Opportunity to Engineering_ support__c
C. Lookup field from Engineering_Support__c to Opportunity
D. Master-detail field from Engineering_ support__c to Opportunity

A

B

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

19 - 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 implements the HTTPCalloutMock.
B. Write a class that implements WebserviceMock.
C. Write a class that extends WebserviceMock.
D. Write a class that extends HTTPCalloutMock.

A

A

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

20 - A developer created this Apex trigger that calls MyClass.myStaticMethod:

trigger myTrigger on Contact (before insert)
{ MyClass.myStaticMethod(trigger.new); }

The developer creates a test class with a test method that calls MyClass.myStaticMethod directly, 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 exists?
A. The deployment passes because both classes and the trigger were included in the deployment.
B. The deployment fails because the Apex trigger has no code coverage.
C. The deployment passes because the Apex code has the required >75% code coverage.
D. The deployment fails because no assertions were made in the test method.

A

B

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

21 - A developer created a Lightning web component called statusComponent to be inserted into the Account record page.

Which two things should the developer do to make this component available?
Choose 2 answers
A. Add <target>lighening\_\_ RecordPage</target> to the statusComponent.js-meta.xml file.
B. Add <isExposed>true</isExposed> to the statusComponent.js-meta.xml file.
A. C.Add <masterLabel>Account</masterLabel> to the statusCompoment.js-meta.xml file.
C. Add <target>lightning RecordPage</target> to the statusComponent.js file.

A

A and B

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

22 - Which two settings must be defined in order to update a record of a junction object?
Choose 2 answers
A. Read/Write access on the primary relationship
B. Read/Write access on the secondary relationship
C. Read access on the primary relationship
D. Read/Write access on the junction object

A

A and B

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

23 - Universal Containers 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 is set to “Waiting on Customer”. The Salesforce Administrator wants to ensure the solution used is bulk safe.

Which two automation tools should a developer recommend to meet these business requirements?
A. Scheduled Flow
B. Record-Triggered Flow
C. Einstein Next Best Action
D. Entitlement Process

A

A

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

24 - Universal Containers has a Visualforce page that displays a table of every Container__c being rented by a given Account. Recently this page is failing 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. Implement pagination with a StandardSetController.
B. Use JavaScript remoting with SOQL Offset.
C. Implement pagination with an OffsetController.
D. Use lazy loading and a transient List variable.

A

D

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

25 - The code below deserializes input into a list of Accounts.
01 public class AcctCreator {
02 public void insertAccounts() {
03 String acctsJson = getAccountsJson();
04 List<Account>accts = (List<Account>) JSON.deserialize(acctsJson,
List<Account>.class);
05
06 // DML to insert accounts
07 }
08 // ... other code including getAccountJson implementation
09 }</Account></Account></Account>

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 (s0bjectType.Account.isCreatable())
C. 05: accts = Database.stripInaccessible(accts, Database.CREATABLE);
D. 05: sObjectAccessDecision sd = Security.stripInaccessible (AccessType.CREATABLE, accts);

A

A

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

26 - A developer completed modifications 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?
Choose 2 answers
A. All methods in the test classes must use @isTest.
B. At least one line of code must be executed for the Apex trigger.
C. Test methods must be declared with the testMethod keyword.
D. Apex classes must have at least 75% code coverage org-wide.

A

A and D

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

27 - A developer has a requirement to write Apex code to update a large number of account records on a nightly basis.

The system administrator 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 ProcesAccountProcessor implements Database.Batchable<sObject>, Schedulable
B. global inherited sharing class ProceegAccountProcessor implements Queueable
C. global inherited sharing class ProceegAccountProceessor implements Database.Batchable<sObject>
D. global inherited sharing class ProcessAccountProcessor implements Schedulable</sObject></sObject>

A

D

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

28 - A Salesforce Administrator used Flow Builder to create a flow named “accountOnboarding”. The flow must be used inside an Aura component.

Which tag should a developer use to display the flow in the component?
A. aura: flow
B. aura-flow
C. lightning-flow
D. lightning: flow

A

D

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

29 - An org tracks customer orders on an Order object and the line items of an Order on the Line Item object. The Line Item object has a Master/Detail 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 currency field and the order amount as a SUM formula 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 numeric formula field and the order amount as a roll-up summary field.
D. Write a process on the Line Item that calculates the item amount and order amount and updates the fields on
the Line Item and the Order.

A

C

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

30 - Which two characteristics are true for Aura component events?
Choose 2 answers
A. By default, containers can handle events thrown by components they contain.
B. If a container component needs to handle a component event, add a includeFacetga”true attribute to its handler.
C. The event propagates to every owner in the containment hierarchy.
D. Depending on the current propagation phase, calling event. stopPropagation() may not stop the event propagation.

A

C and D

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

31 - A developer is tasked with performing a complex validation using Apex as part of advanced business logic. When 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 PurchaseOrder extends Exception{}
B. public class PurchaseOrder implements Exception{}
C. public class PurchaseOrderException implements Exception{}
D. public class PurchaseOrderException extends Exception{}

A

A

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

32 - A Salesforce Administrator is creating a record-triggered flow. When certain criteria are met, the flow must call an Apex method to execute a 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. @AuraEnabled
B. @future
C. @InvocableMethod
D. @RemoteAction

A

C

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

33 - Which statement should be used to allow some of the records in a list of records to be inserted if others fail to be inserted?
A. Database.insert(records, false)
B. insert (records, false)
C. Database .insert (records, true)
D. insert records

A

A

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

34 - The Salesforce Administrator created a custom picklist field, Account_Status__c, on the 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 automation tools should be used to fulfill the business need?
A. Salesforce Flow
B. Approval Process
C. Outbound Messaging
D. Entitlement process

A

A

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

35 - Considering the following code snippet:

public static void insertAccounts(List<Account> theseAccounts){
for (Account ThisAccount : theseAccounts){
if (this.Account.website == null){
thisAccount.website='https://www.demo.com';
}
}
update theseAccounts;
}
When the code executes, a DML exception is thrown.</Account>

How should the developer modify the code to ensure exceptions are handled gracefully?
A. Implement the upsert: DML statement.
B. Implement Change Data Capture.
C. Implement a try/catch block for the DML.
D. Remove null items from the list of Accounts.

A

C

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

36 - 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. Add static to the server-side method signature.
B. Decorate the server-side method with (static=false).
C. Decorate the server-side method with (static=true).
D. Change the function signature to be private static.

A

A

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

37 - 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 flow that updates related contact records

A developer 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. A workflow rule field update will cause the custom validation to run again.
C. The trigger may fire multiple times during a transaction.
D. Workflow rules will fire only after the trigger has committed all ML operations to the database.

A

C

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

38 - 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 outbound message
B. An Apex REST class
C. An invocable method
D. An Apex controller

A

B

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

39 - 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 Data Service to access record data.

Which security consideration should the developer be aware of?
A. Lightning Data Service ignores field-level security.
B. The with sharing keyword must be used to enforce sharing rules.
C. The isAccessible() method must be used for field-level access checks.
D. Lightning Data Service handles sharing rules and field-level security.

A

D

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

40 - A developer wrote the following two classes:
public with sharing class StatueFetcher {
private Boolean active = true;
private Boolean isActive() {
return active;
}
}
public with sharing class Calculator {
public void deCalculations () {
StatusFetcher fetcher = new StatusFetcher ();
İf(sFetcher.isActive()) {
//do calculations here
}
}
}
The StatusFetcher class successfully compiled and saved. However, the Calculator class has a compile time error.
How should the developer fix this code?
A. Make the is active method in the statusFetcher class public.
B. Change the class declaration for the Calculator class to public with inherited sharing.
C. Make the doCalculations method in the Calculator class private.
D. Change the class declaration for the StatusFetcher class to public with inherited sharing.

A

A

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

41 - Get Cloudy Consulting (GCC) has a multitude of servers that host its customers’ websites. GCC wants to 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.

What should be added to the Lightning web component to allow the developer to interact with the Server Update platform event?
A. import ( subscribe, unsubscribe, onError ) from ‘lightning/MeggageChannel’
B. import ( subscribe, unsubscribe, onError ) from ‘lightning/pubsub’
C. import ( subscribe, unsubscribe, onError )from ‘lightning/empApi’
D. import ( subscribe, unsubscribe, onError ) from ‘lightning/ServerUpdate

A

C

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

42 - Which Apex class contains methods to return the amount 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

A

D

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

43 - Universal Containers is building a recruiting app with an Applicant object that stores information about an individual person and a Job object that represents a job. Each applicant may apply for more than one job.

What should a developer implement to represent that an applicant has applied for a job?
A. Lookup field from Applicant to job
B. Junction object between Applicant and job
C. Formula field on Applicant that references Job
D. Master-detail field from Applicant to Job

A

B

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

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

@AuraEnabled
public void static updateLeads() {
for (Lead thislead : (SELECI Origin e FROM Lead]) !
thisLead. LeadSource = thisLead. Origin;
update thisLead;
}
}
Which governor limit will likely be exceeded within the Apex transaction?
A. Total number of records processed as a result of DML statements
B. Total number of records retrieved by SOQL queries
C. Total number of SOQL queries issued
D. Total number of DML statements issued

A

D

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

45 - What is the result of the following code?
Account a = new Account();
Database. insert (a, false);
A. The record will be created and a message will be in the debug log.
B. The record will not be created and no error will be reported.
C. The record will not be created and an exception will be thrown.
D. The record will be created and no error will be reported.

A

B

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

46 - A developer creates a custom exception as shown below:

        public class ParityException extends Exception {}

What are two ways the developer can fire the exception in Apex?
Choose 2 answers
A. throw new ParityException (“parity does not match);
B. throw new ParityException () ;
C. new ParityException (‘parity does mop match’) ;
D. new ParityException() ;

A

A and B

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

47 - A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an OrderItem 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 OrderItem records to a new Order record?
A. Change the master-detail relationship to an external lookup relationship.
B. Create a junction object between Orderltem and Order.
C. Select the Allow reparenting option on the master-detail relationship.
D. Add without sharing to the Apex class declaration.

A

B

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

48 - A developer created a child Lightning web component nested inside a parent Lightning web component. The 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 the Apex controller class to send data to the child component.
B. The parent component can use a public property to pass the data to the child component.
C. The parent component can invoke a method in the child component.
D. The parent component can use a custom event to pass the data to the child component.

A

B and C

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

49 - A developer created a weather app that contains multiple Lightning web components. One of the components, called Toggle, has a toggle for Fahrenheit 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 be sent to the Temperature component so the temperature can be converted and displayed.

What is the recommended way to accomplish this?

A. Create a custom event to handle the communication between components.
B. Use an application event to communicate between the components.
C. The Toggle component should call a method in the Temperature component.
D. Use Lightning Message Service to communicate between the components.

A

A

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

50 - Universal Containers 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 S0AP messages over HTTPS. If the connection fails, messages should be retried for up to 24 hours.

What is the recommended approach to syne 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 fulfillment system
C. Write an Apex SOAP service to integrate with the order fulfillment system.
D. Use Process Builder to call an invocable Apex method that sends a message to the order fulfillment system.

A

A

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

51 - Where are two locations a developer can look to find information about the status of batch or future methods?
Choose 2 answers
A. Apex Jobs
B. Time-Based Workflow Monitor
C. Apex Flex Queue
D. Paused Flow Interviews component

A

A and C

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

52 - What should a developer use to script the deployment and unit test execution as part of continuous integration?
A. Execute Anonymous
B. VS Code
C. Developer Console
D. Salesforce CLI

A

D

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

53 - A business implemented a gamification 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 call to an external web service. However, a Syetem. CalloutException is occurring.

What should the developer do to fix this error?
A. Replace the after update trigger with a before insert trigger.
B. Surround the external call with a try-catch block to handle the exception.
C. Move the callout to an asynchronous method with @future( callout=true) annotation.
D. Write a REST service to integrate with the external web service.

A

C

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

54 - As part 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. Record-Triggered Flow
B. Workflow Rules
C. Scheduled job
D. Process Builder

A

A

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

55-Which scenario is valid for execution by unit tests?
A. Set the created date of a record using a system method.
B. Execute anonymous Apex as a different user.
C. Load data from a remote site with a callout.
D. Generate a Visualforce PDF with getContentAsPDF().

A

A

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

56 - Which three steps allow a custom scalable vector graphics (SVG) to be included in a Lightning web component?
A. Upload the SVG as a static resource.
B. Import the static resource and provide a variable for it in JavaScript.
C. Import the SVG as a content asset file.
D. Reference the import in the HTML template.
E. Reference the property in the HTML template.

A

A, B, and E

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

57 - A developer needs to have records with specific fleld values in order to test a new Apex class.

What should the developer do to ensure the data is avallable to the test?
A. Use Test.loadData () and reference a CSV file in a static resource.
B. Use Anonymous Apex to create the required data.
C. Use SOQL to query the org for the required data.
D. Use Test.loadData () and reference a JSON file in Documents.

A

A

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

58 - A Developer Edition org has five existing accounts. A developer wants to add 10 more accounts for testing purposes.

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

Account myAccount = new Account (Name = ‘MyAccount’);
İnsert myAccount;
Integer x = 1;
List(Account> newAccounts = new List<Account> ();
Do (
Account acct = new Account (Name = ‘New Account ‘ + xx++);
Newaccounts.add (acct) ;
) while (x < 10) ;
How many total accounts will be in the org after this code is executed?
A. 5
B. 6
C. 10
D. 15</Account>

A

D

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

59- Which two process automations can be used on their own to send Salesforce Outbound Message?
Choose 2 answers

A. Workflow Rule
B. Process Builder
C. Flow Builder
D. Strategy Builder

A

A and C

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

60 - A developer created these three Rollup Summary fields in 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 shows the ratio between rejected and approved timesheets for a given project.

What are two benefits of choosing a formula field instead of an Apex trigger to fulfill the request?
Choose 2 answers
A. A formula field will trigger existing automation when deployed.
B. A formula field will calculate the value retroactively for existing records.
C. Using a formula field reduces maintenance overhead.
D. A test class that validates the formula field is needed for deployment.

A

B and D

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

61 - 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 void calculate() (/implementation/)
}
B. public abstract class ShippingCalculator {
public override calculate() (/implementation/)
}
C. public abstract class ShippingCalculator {
public abstract calculate() (/implementation/)
}
D. public abstract class ShippingCalculator {
public virtual void calculate() (/implementation/)
}

A

D

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

62 - Which two statements are true aböut using the @testSetup annotation in an Apex test class?
Choose 2 answers
A. A method defined with the @testSetup annotation executes once for each test method in the lest class and
counts towards system limits.
B. In a test setup method, test data is Inserted once and made available for all test methods in the test class.
C. The @testSetup annotation is not supported when the @isTest(SeeAlIData = True) annotation is used.
D. Records created in the test setup method cannot be updated in individual test methods.

A

A and C

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

63 - 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 in mind when Implementing the Apex method?
Choose 3 answers
A. The method must be defined as static.
B. The method must use the @AuraEnabled annotation.
C. The method must use the @InvocableMethod annotation.
D. The method must be defined as public.
E. The method must use the @Future annotation.

A

A, D, and E

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

64 - Universal Containers uses a Master-Detail relationship and stores the availability date on each Line Item of an Order
and Orders are only shipped when all of the Line Items are available.
A. Use a DAYS formula on each of the availability date fields and a COUNT Roll-Up Summary field on the Order.
B. Use a CEILING formula on each of the latest availability date fields.
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.

A

A

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

65 - What can be developed using the Lightning Component framework?
A. Salesforce integrations
B. Hosted web applications
C. Dynamic web sites
D. Single-page web apps

A

D

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

66 - 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 converting a Lead?
A. Formula Field
B. Workflow Rule
C. Process Builder
D. Validation Rule

A

D

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

67 - Which code in a Visualforce page and/or controller might present a security vulnerability?
A. <apex: outputText value=”{!$CurrentPage.parameters,.userInput}” />
B. <apex: outputField value=” {!crtl.userInput}” />
C. <apex: outputText escape=”false” value=”{!$CurrentPage.parameters.userInput}” />
D. <apex:outputField escape=”false” values=”{!ctrl.userInput}” />

A

C

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

68- 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. SFDX CLI
B. VSCode
C. Developer Console
D. Change Sets
OR
A. Ant Migration Tool
B. Change Sets
C. SFDX CLI
D. Developer Console

A

A and B OR A and C

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

69 - 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 void calculate() (/implementation/)
}
B. public abstract class ShippingCalculator {
public override calculate() (/implementation/)
}
C. public abstract class ShippingCalculator {
public abstract calculate() (/implementation/)
}
D. public abstract class ShippingCalculator {
public virtual void calculate() (/implementation/)
}

A

D

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

70 - The values ‘High’, ‘Medium’, and ‘Low are identified as common values for multiple picklists across different objects. What is an approach a developer can take to streamline maintenance of the picklists 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 object and add a validation rule to ensure data integrity.

A

A

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

71 - A developer must modify the following code snippet to prevent the number of SOQL queries issued from exceeding the platform governor limit.

public without sharing class OpportunityService{
public static List<OpportunityLineItem> getOpportunityProducts (Set<Id> opportunityIds) {List<OpportunityLineItem> oppLineItems = new List<OpportunityLineItem>();
for(Id thisOppId : opportunityIds) {
oppLineItems.addAll ([SELECT Id FROM OpportunityLineItem WHERE OpportunityId = : thisOppId]);
}
return oppLineItems;
}
}</OpportunityLineItem></OpportunityLineItem></Id></OpportunityLineItem>

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.getLimitsQueries () method to ensure the number of queries is less than 100.
B. Refactor the code above to perform the SOQL query only if the Set of opportunityIds contains less 100
Ids.
C. Use the system.Limits.getQueries () method to ensure the number of queries is less than 100.
D. Refactor the code above to perform only one SOQL query, filtering by the Set of opportunityIds,

A

C

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

72 - 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 field if an Account is inserted with an initial value of zero, assuming no other automation logic is implemented on the Account?
A. 2
B. 1
C. 4
D. 3

A

A

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

73 - 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 discussions, 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 Vendor records have existing values in the Account object.
B. The Vendor object must use a Master-Detail field for reporting.
C. The Account object is included on a workflow on the Vendor object.
D. The Account records contain Vendor roll-up summary fields

A

D

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

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

Which three attributes need to be defined with values in the <apex:page> tag to accomplish this?
Choose 3 answers
A. renderAs
B. action
C. readOnly
D. standardController
E. extensions</apex:page>

A

B, D, and E

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

75 - Which exception type cannot be caught?
A. LimitException
B. A Custom Exception
C. NoAccessException
D. CalloutException

A

A

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

76 - Which three Salesforce resources can be accessed from a Lightning web component?
Choose 3 answers
A. Static resources
B. Content asset files
C. Third-party web components
D. All external libraries
E. SVG resources

A

A, D, and E

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

77 - 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 all it’s trainers?

A. SELECI Id, (SELECT Id FROM Trainers_r) FROM Gym_c WHERE Name = ‘Viridian City Gym’
B. SELECI Id, (SELECT Id FROM Trainers_c) FROM Gym_c WHERE Name = ‘Viridian City Gym’
C. SELECI Id, (SELECT Id FROM Trainer_r) FROM Gym_c WHERE Name = ‘Viridian City Gym’
D. SELECI Id, FROM Trainers__c WHERE gym__r.Name =‘Viridian City Gym’

A

B

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

78 - Instead of sending emails to support personnel directly from Salesforce, Universal Containers wants to notify an external system in the event that an unhandled exception occurs.

What is the appropriate publish/subscribe logic to meet this requirement?
A. Since this only involves sending emails, no publishing is necessary. Have the external system subscribe to the BastcApecerror event.
B. Publish the error event using the addError () method and have the external system subscribe to the event using CometD.
C. Publish the error event using the Eventbus.publish () method and have the external system subscribe to the event using CometD.
D. Publish the error event using the addError () method and write a trigger to subscribe to the event and notify the external system.

A

C

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

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

How can the developer find the current user’s default record type?
A. Query the Profile where the ID equals userInfo.getProfileID() and then use the profile.Opportunity.getDefaultRecordType() method.
B. Use Opportunity.SObjectType.getDescribe().getRecordTypeInfos()
togetalistofrecordtypes,and iterate through them until isDefaultRecordTypeMapping() is true.
C. Use the Schema.userInfo.Opportunity.getDefaultRecordType() method.
D. Create the opportunity and check the opportunity.recordType before inserting, which will have the record ID of the current user’s default record type.

A

B

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

80 - What are two ways for a developer to execute tests in an org?
Choose 2 answers
A. Developer Console
B. Tooling API
C. Bulk API
D. Metadata API

A

B and D

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

81 - 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

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

82 - If Apex code executes inside the execute () method of an Apex class when implementing the Batchable interface, which two statement are true regarding governor limits?
Choose 2 answers
A. The Apex governor limits cannot be exceeded due to the asynchronous nature of the transaction.
B. The Apex governor limits cannot be exceeded due to the asynchronous nature of the transaction.
C. The Apex governor limits are reset for each iteration of the execute () method.
D. The Apex governor limits are omitted while calling the constructor of the Apex class.

A

C and D

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

83 - Which two events need to happen when deploying to a production org?
Choose 2 answers
A. All Apex code must have at least 75% test coverage.
B. All Visual Flows must have at least 1% test coverage.
C. All triggers must have some test coverage.
D. All Process Builder Processes must have at least 1% test coverage.

A

A and C

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

84 - Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package application. One of the application 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 application when developing customizations 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 global 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 public access modifier.

A

A

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

85 - When using SalesforceDX, what does a developer need to enable to create and manage scratch orgs?
A. Sandbox
B. Environment Hub
C. Dev Hub
D. Production

A

C

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

86 - What is an example of a polymorphic lookup field in Salesforce?
A. The Whatld field on the standard Event object
B. A custom field, Link__c, on the standard Contact object that looks up to an Account or a Campaign
C. The Leadid and ContactId fields on the standard Campaign Member object
D. The Parentid field on the standard Account object

A

A

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

87 - 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 deletions?
A. accountRec.sObjectType.isDeleteable()
B. Account. isDeletable()
C. accountRec.isDeletable()
D. Schema. sObjectType.Account.isDeletable()

A

D

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

88 - Which code displays the contents of a Visualforce page as a PDF?
A. <apex: page renderAs=”pdf”>
B. <apex: page renderA=”application/pdf”>
C. <apex: page contentType=”application/pdf”>
D. <apex: page contenttype=”pdf”>

A

A

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

89 - Which two types of process automation can be used to calculate the shipping cost for an Order when the Order is placed and apply a percentage of the shipping cost to some of the related Order Products?

Choose 2 answers
A. Workflow Rule
B. Flow Builder
C. Approval Process
D. Process Builder

A

B and D

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

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

Which Apex technique should the developer use?
A. An if/else statement, with a for loop inside
B. A for loop, with a switch statement inside
C. A for loop, with an if-else statement inside
D. A switch statement, with a for loop inside

A

C

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

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

for (List<Lead> theseLeads: [SELECT LastName, Company, Email FROM Lead LIMIT 20000]){}
   for (Lead thisLead : theseLeads){
      if(thisLead.Email == null)
         thislead.Email = aggignGenericEmail(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 transaction will succeed and the first ten thousand records will be committed to the database.
B. The total number of records processed as a result of DML statements will be exceeded.
C. The transaction will succeed and the full result set changes will be committed to the database.
D. The total number of DML statements issued will be exceeded.

A

C

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

92 - What are three considerations when using the @InvocableMethod annotation in Apex?
Choose 3 answers
A. Only one method using the @InvocableMethod annotation can be defined per Apex class.
B. A method using the @InvocableMethod annotation can be declared as Public or Global.
C. A method using the @InvocableMethod annotation must be declared as static.
D. A method using the @InvocableMethod annotation can have multiple input parameters.
E. A method using the @InvocableMethod annotation must define a return value,

A

A, B, and C

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

93 - 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?

A. webservice class WebServiceClass {
private Boolean helpMethod() {/*implementation . . . / }
global static String updateRecords() {/
implementation . . . / }
}
B. global class WebServiceClass {
private Boolean helpMethod() {/
implementation . . . / }
webservice static String updateRecords() {/
implementation . . . / }
}
C. global class WebServiceClass {
private Boolean helpMethod() {/
implementation . . . / }
global String updateRecords() {/
implementation . . . / }
}
D. webservice class WebServiceClass {
private Boolean helpMethod() {/
implementation . . . / }
webservice static String updateRecords() {/
implementation . . . */ }
}

A

C

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

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

Which approach should the developer use to be sure that the Apex class works correctly without adding or changing data in the org?
A. Run the code in an Execute Anonymous block in the Developer Console.
B. Create a test class to execute the business logic and run the test in the Developer Console.
C. Include a try/catch block to the Apex class.
D. Perform a code review with another developer.

A

B

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

95 - 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 a Lightning page.
B. Override the Account’s Edit button with a Lightning Flow.
C. Override the Account’s Edit button with a Lightning component.
D. Override the Account’s Edit button with a Lightning Action.

A

C

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

96 - Universal Containers wants Opportunities to no longer be editable when reaches the Closed/Won stage.

Which two strategies can a developer use to accomplish this?
A. Use a validation rule.
B. Use a trigger
C. Use an after-save flow.
D. Use the Process Automation settings.

A

A and B

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

97 - In terms of the MVC paradigm, what are two advantages of implementing the view layer of a Salesforce application using Lightning Web Component-based development over Visualforce?
Choose 2 answers
A. Self-contained and reusable units of an application
B. Automatic code generation
C. Server-side run-time debugging
D. Rich component ecosystem

A

A and D

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

98 - 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 the getAccounte method?
A. @AuraEnable(getAccounts, ‘$searchTerm’)
accountList;
B. @AuraEnable(getAccounts, {searchTerm: ‘$searchTerm’})
accountList;
C. @wire(getAccounts, ‘$searchTerm’)
accountList;
D. @wire(getAccounts, {searchTerm: ‘$searchTerm’})

A

D

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

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

Which two statements are valid considerations when using merge?
Choose 2 answers
A. The merge method allows up to three records with the same sObject type to be merged into one record.
B. The field values on the master record are overwritten by the records being merged.
C. Merge is supported with accounts, contacts, and leads.
D. External ID fields can be used with the merge method.

A

A and C

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

100 - A recursive transaction is initiated 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 the transaction?
A. The transaction fails only if the Contact trigger stack depth is greater or equal to 16.
B. The transaction fails and all the changes are rolled back.
C. The transaction succeeds as long as the Contact trigger stack depth is less than 16.
D. The transaction succeeds and all changes are committed to the database.

A

D

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

101 - A developer is tasked by Universal Containers to build out a system to track the container repair process. Containers should be tracked as they move through the repair process, starting when a customer reports an issue and ending when the container is returned to the customer.

Which solution meets these business requirements while following best practices?
A. Develop a new system with automated notifications to move the containers through the repair process while notifying the customer that reported the issue.
B. Build a customized Lightning Application using Application Events to ensure data integrity.
C. Build a mobile application using Platform Events and RFID integration to ensure proper tracking of the containers and keep the customer informed.
D. Involve a Salesforce administrator and build out a declarative solution that will be easy to maintain and likely cost less than customized development.

A

A

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

102 - Which three operations affect the number of times a trigger can fire?
Choose 3 answers
A. Email messages
B. Lightning Flows
C. Roll-Up Summary fields
D. Criteria-based Sharing calculations
E. Workflow Rules

A

B, C, and E

103
Q

103 - 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 />
B. <apex: facet name=”meggages”/>
C. <apex: pageMessage severity=”info”/>
D. <apex:message></apex:message>

A

A

104
Q

104 - 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/}
public void draw() {/implementation/}
}
C. public class DrawList extends Sortable, extends Drawable {
public void sort() {/implementation/}
public void draw() {/implementation/}
}
D. A. public class DrawList implements Sortable, Drawable
{
public void sort() {/implementation/}
public void draw() {/implementation/}
}

A

D

105
Q

105 - A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple Objects. The wizard accepts data from user 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. ApexPages.currentPage().getParameters().put(‘input’, ‘TestValue”);
D. public ExtendedController(ApexPages.StandardController cntrl){}
E. String nextPage = controller.save().getUrl():

A

B, C, and E

106
Q

106 - How should a developer write unit tests for a private method in an Apex class?
A. Mark the Apex class as global.
B. Use the SeeAllData annotation.
C. Use the Testvisible annotation.
D. Add a test method in the Apex class.

A

C

107
Q

107- A lead developer creates an Apex interface called “Laptop”. Consider the following code snippet:

public class SilverLaptop{
//code implementation
}

How can a developer use the Laptop interface within the SilverLaptop class?
A. @Extends (class=”Laptop”)
public class SilverLaptop
B. public class SilverLaptop extends Laptop
C. @Interface (class=”Laptop”)
public class SilverLaptop
D. public class SilverLaptop implements Laptop

A

D

108
Q

108- A Lightning component has a wired property, searchResults, that stores a list of Opportunities.

Which definition of the Apex method, to which the searchReguits property is wired, should be used?
A. @AuraEnabled(cacheable=true)
Public static List<Opportunity> search (String term) {
/*implementation*/ }
B. @AuraEnabled(cacheable=false)
Public static List<Opportunity> search (String term) {
/*implementation*/ }
C. @AuraEnabled(cacheable=false)
Public static List<Opportunity> search (String term) {
/*implementation*/ }
D. @AuraEnabled(cacheable=true)
Public static List<Opportunity> search (String term) {
/*implementation*/ }</Opportunity></Opportunity></Opportunity></Opportunity>

A

A

109
Q

109 - 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: include› tag.
B. Use the <apex: relatedlist> tag.
C. Create a controller extension.
D. Add a method to the standard controller.

A

B

110
Q

110 - Which aspect of Apex programming is limited due to multitenancy?
A. The number of records processed in a loop
B. The number of records returned from database queries
C. The number of methods in an Apex class
D. The number of active Apex classes

A

B

111
Q

111- Universal Containers uses 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 best practice to get the sum of all order line totals on the order header?
A. Roll- up summany field
B. Declarative Roll-up Summaries app
C. Apex trigger
D. Process Builder

A

A

112
Q

112 - Which process automation should be used to send an outbound message without using Apex code?
A. Workflow Rule
B. Flow Builder
C. Strategy Builder
D. Process Builder

A

A

113
Q

113 - Which Salesforce feature allows a developer to see when a user last logged in to Salesforce if real-time notification is not required?
A. Calendar Events
B. Developer Log
C. Asynchronous Data Capture Events
D. Event Monitoring Log

A

D

114
Q

114- What is a fundamental difference between a Master-Detail relationship and a Lookup relationship?
A. In a Master-Detail relationship, when a record of a master object is deleted, the detail records are not deleted.
B. A Master-Detail relationship detail record inherits the sharing and security of its master record.
C. In a Lookup relationship, the field value is mandatory.
D. In a Lookup relationship when the parent record is deleted, the child records are always deleted.

A

B

115
Q

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

Which approach can efficiently generate the required data for each unit test?
A. Add @IsTest(seeAlIData=true) at the start of the unit test class.
B. Create test data before Test.startTest() in the unit test.
C. Create a mock using the Stub API.
D. Use @TestSetup with a void method.

A

D

116
Q

116 - A developer wants to retrieve the Contacts and Users with the email address dev@uc.com.

Which SOS statement should the developer use?

A. FIND Email IN Contact, User FOR {dev@uc.com}
B. FIND {Email = ‘dev@uc.com’} RETURNING Contact (Email), User (Email)
C. FIND {dev@uc.com} IN Email Fields RETURNING Contact (Email), User (Email)
D. FIND {Email = ‘dev@uc.com’} IN Contact, User

A

C

117
Q

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

A. fire()
B. emit()
C. fireEvent()
D. registerEvent()

A

A

118
Q

118 - Assuming that ‘name’ is a String obtained by an <apex: inputText> tag on a Visualforce page, which two SOQL queries performed are safe from SQL injection?

A. String query = ‘SELECT Id FROM Account WHERE Name LIKE '’%’ + String.escapeSingleQuotes (name) + ‘%’’;
List<Account results = Database.query(query);
B. String query = ‘%’ + name + ‘%’;
List<Account results = [SELECT Id FROM Account WHERE Name LIKE : query];

//Didn’t type the other option because the picture is too hard to see.

A

A and B
/Just remember to pick the longest and the shortest option if this question comes up in the real exam.

119
Q

119 - Which two are phases in the Aura application event propagation framework?
Choose 2 answers
A. Bubble
B. Control
C. Emit
D. Default

A

A and D

120
Q

120 - For which three items can a trace flag be configured?
Choose 3 answers
A. Apex Class
B. User
C. Visualforce
D. Process Builder
E. Apex Trigger

A

A, B, and E

121
Q

121 - 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 occurred while updating the
Contact. ‘ +e. getMessage ()}
ApexPages.addmessage(new
ApexPages.message(ApexPages.severity.FATAL,
errorMessage));

In which two ways can the try/catch be enclosed to enforce object and field-level permissions and prevent the DM 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.fields.Is_Active__c.isUpdateable())
B. Use if(thisContact.OwnerId == UserInfo.getUserId())
C. Use if (Schema.sObjectType.Contact.isAccessible())
D. Use if (Schema.sObjectType.Contact.isUpdateable())

A

A and D

122
Q

122 - What will be the output in the debug log in the event of a QueryException during a call to the aQuery method in the following example?

class myClass{
class CustomException extends QueryException{}
public static Account aQuery() {
Accounts 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. Custom Exception. Done.
B. Querying Accounts. Custom Exception.
C. Querying Accounts. Query Exception.
D. Querying Accounts. Query Exception. Done.

A

D

123
Q

123 - Universal Containers wants to notify an external system, in the event that an unhandled exception occurs, using a standard platform event.

What is the appropriate publish/subscribe logic to meet this requirement?
A. Publish the error event using the Eventbus.publish () method and have the external system subscribe to the event using CometD.
B. Have the external system subscribe to the event channel. No publishing is necessary.
C. Publish the error event using the addError () method and write a trigger to subscribe to the event and notify the external system.
D. Publish the error event using the addError () method and have the external system subscribe to the event using CometD.

A

A

124
Q

124 - What should be used to create scratch orgs?
A. Developer Console
B. Workbench
C. Salesforce CLI
D. Sandbox refresh

A

C

125
Q

125 - A developer needs to prevent the creation of Request__c records when certain conditions exist in the system. A RequestLogic class exists that checks the conditions.

What is the correct implementation?
A. trigger RequestTrigger on Request__c (after insert) {
if (RequestLogic.isValid(Request__c))
Request.addError(‘Your request cannot be created at this
time.’);
}
B. trigger RequestTrigger on Request__c (after insert) {
RequestLogic.validateRecords (trigger.new);
}
C. trigger RequestTrigger on Request__c (before insert) {
if (RequestLogic.isValid(Request__c))
Request.addError(‘Your request cannot be created at this
time.’);
}
D. trigger RequestTrigger on Request__c (before insert) {
RequestLogic.validateRecords (trigger.new);
}

A

D

126
Q

126 - Universal Containers recently transitioned from Classic to Lightning Experience. One of its business processes requires certain values from the Opportunity object to be sent via an HTTP REST callout to its external order management system based on a user-initiated action on the Opportunity detail page. Example values are as follows:

● 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 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 a Visualforce page that performs the HTTP REST callout, and use a Visualforce quick action to expose the component on the Opportunity detail page.
D. D.Create an after update trigger on the Opportunity object that calls a helper method using @Future (Callout=true) to perform the HTTP REST callout.

A

A and C

127
Q

127 - A Primaryld__c custom field exists on the Candidate__c custom object. The field 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 before insert trigger to correctly map the records.
B. Update the PrimaryId__c field definition to mark it as an External Id.
C. Upload the CSV into a custom object related to Candidate__c.
D. Create a Process Builder on the Candidate__c object to map the records.

A

B

128
Q

128 - A developer must provide custom user interfaces 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 Visualforce page in Salesforce Classic and a Lightning page in Lightning Experience
C. A Lightning page in Salesforce Classic and a Visualforce page in Lightning Experience
D. A Lightning component in Salesforce Classic and a Lightning component in Lightning Experience

A

A

129
Q

129 - 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 permissions for the currently logged-in user while using the custom search tool?
A. Use the schema describe calls to determine if the logged-in user has access to the Account object.
B. Use the with sharing keyword on the class declaration.
C. Use the without sharing keyword on the class declaration.
D. Use the UseInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user

A

B

130
Q

130 - Which three statements are accurate about debug logs?

Choose 3 answers
A. To View Debug Logs, “Manager Users” or *View All Data” permission is needed.
B. Debug Log levels are cumulative, where FINE log level includes all events logged at the DEBUG, INFO. WARN, and ERROR levels.
C. To View Debug Logs, -Manager Users” or “Modify All Data” permission is needed.
D. Amount of information logged in the debug log can be controlled programmatically.
E. Amount of information logged in the debug log can be controlled by the log levels.

A

B, D, and E

131
Q

131 - 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 automatically cast to the List data type.
B. The query fails and an error is written to the debug log.
C. An unhandled exception is thrown and the code terminates.
D. The first Account returned is assigned to myAccount.

A

C

132
Q

132 - How can a developer check the test coverage of active Process Builders and Flows before deploying them in a Change Set?
A. Use SOQL and the Tooling API.
B. Use the Code Coverage Setup page.
C. Use the ApexTestResult class.
D. Use the Flow Properties page.

A

B

133
Q

133 - What are three characteristics of change set deployments?
Choose 3 answers
A. Change sets can be used to transfer records.
B. Sending a change set between two orgs requires a deployment connection.
C. Change sets can only be used between related organizations.
D. Deployment is done in a one-way, single transaction.
E. Change sets can deploy custom settings data.

A

B, C, and D

134
Q

134 - What does the Lightning Component framework provide to developers?
A. Templates to create custom components
B. Support for Classic and Lightning UIs
C. Prebuilt components that can be reused
D. Extended governor limits for applications

A

C

135
Q

135 - When importing and exporting data into Salesforce, which two statements are true?

Choose 2 answers
A. Data import wizard is a client application provided by Salesforce.
B. Bulk API can be used to bypass the storage limits when importing large data volumes in development environments.
C. Developer and Developer Pro sandboxes have different storage limits.
D. Bulk API can be used to import large data volumes in development environments without bypassing the storage limits.

A

B and C

136
Q

136 - A developer creates a new Apex trigger with a helper class, and writes a test ass that only exercises 95% coverage of the 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.”

What should the developer do to successfully deploy the new Apex trigger and helper class?
A. Increase the test class coverage on the helper class.
B. Create a test class and methods to cover the Apex trigger.
C. Run the tests using the Run All Tests’ method.
D. Remove the failing test methods from the test class.

A

B

137
Q

137 - 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 time an Account is created or updated.

How many times will the trigger fire if a new Account is inserted, assuming no other automation logic is implemented on the Account?
A. 4
B. 1
C. 2
D. 8

A

C

138
Q

138 - 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 code logic does not require maintenance or review.
B. Declarative development has higher design limits and query limits.
C. Declarative development does not require Apex test classes.
D. Declarative development can be done using the Setup UI.

A

C and D

139
Q

139 - A developer created a Visualforce page and custom controller to display the account type field as shown below.

Custom controller code:

public with sharing class customCtrlr {
Private Account theAccount;
public String accType;

 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 properly referenced on the Visualforce page, what should the developer do to correct the problem?
A. Add ween sharing to the custom controller.
B. Add a getter method for the actType attribute.
C. Change theAccount attribute to public.
D. Convert theAccount. Type to a String.

A

B

140
Q

140 - Universal Containers hires a developer to build a custom search page to help users 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 able to return more records.
C. SOSL is faster for text searches.
D. SOQL is faster for text searches.

A

B and C

141
Q

141 - What is the result of the following code snippet?

public void doWork(Account acct){
for (Integer i = 0; i <= 200; i++){
insert acct;
}
}

A. 201 Accounts are inserted.
B. 1 Account is inserted.
C. 200 Accounts are inserted.
D. 0 Accounts are inserted.

A

D

142
Q

142 - Which two statements accurately represent the MVC framework implementation in Salesforce?

Choose 2 answers
A. Records created or updated by triggers represent the Model (M) part of the MVC framework.
B. Lightning component HTML files represent the Model (M) part of the MVC framework.
C. Standard and Custom objects used in the app schema represent the View (V) part of the Mvc framework.
D. Validation rules enforce business rules and represent the Controller (C) part of the MVC framework.

A

A and D

143
Q

143 - 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 writing an After Update trigger and accessing the field value from Trigger.old
B. By writing a Before Update trigger and accessing the field value from Trigger.new
C. Bv writing a Before Insert trigger and accessing the field value from Trigger.new
D. By writing an After Insert trigger and accessing the field value from Trigger.old

A

A

144
Q

144 - 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?
A. Flow Builder
B. Process Bulder
C. Lightning Component
D. Approval Process

A

A

145
Q

145 - What are two characteristics related to formulas?

Choose 2 answers
A. Fields that are used in a formula field can be deleted or edited without editing the formula.
B. Formulas can reference themselves.
C. Formulas can reference values in related objects.
D. Formulas are calculated at runtime and are not stored in the database.

A

C and D

146
Q

146 - What are two ways a developer can get the status of an enqueued job for a class that implements the queueable
interface?
Choose 2 answers
A. Query the AsyncApexJob object
B. View the Apex Status Page
C. View the Apex Flex Queue
D. View the Apex Jobs Page

A

A and D

147
Q

147 - 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 Deploy from the VSCode IDE to deploy an ‘insert Contact’ Apex class.
B. Use the Test menu on the Developer Console to run all test classes for the Contact trigger.
C. Use the New button on the Salesforce Contacts Tab to create a new Contact record.
D. Use the Open Execute Anonymous feature on the Developer Console to run an ‘insert Contact’ DML statement.

A

B

148
Q

148 - A custom picklist field, Food_Preference__c, exists on a custom object. The picklist contains the following options: ‘Vegan’, Kosher’, ‘No Preference’. The developer must ensure a value is populated every time a record is created or undated.

What is the most efficient way to ensure a value is selected every time a record is saved?
A. Mark the field as Required on the object’s page layout.
B. Mark the field as Required on the field definition.
C. Set a validation rule to enforce a value is selected.
D. Set “Use the first value in the list as the default value” as True.

A

B

149
Q

149 - What are two ways that a controller and extension can be specified for a custom object named Notice on a Visualforce page?

Choose 2 answers
A. apex:page controller= “Notice__c” extensions=”myControllerExtension”
B. apex:page controllers=”Notice__c, myControllerExtension”
C. apex page=Notice extends=”myControllerExtension”
D. apex:page standardController= “Notice__c” extensions=”myControllerExtension”

A

A and D

150
Q

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

A. List<List <sObject>> searchList = [SELECT Name, ID FROM Contact, Lead WHERE Name like '%ACME%'];
B. List<List <sObject>> searchList = [FIND "*ACME*" IN ALL FIELDS RETURNING Contact, Lead];
C. List <sObject> searchList = [FIND "*ACME*" IN ALL FIELDS RETURNING Contact, Lead];
D. Map <sObject> searchList = [FIND "*ACME*" IN ALL FIELDS RETURNING Contact, Lead];</sObject></sObject></sObject></sObject>

A

C

151
Q

151 -What are three capabilities of the <Itng:require> tag when loading JavaScript resources in Aura components?</Itng:require>

Choose 3 answers
A. Loading externally hosted scripts
B. Loading files from Documents
C. Specifying loading order
D. Loading scripts in parallel
E. One-time loading for duplicate scripts

A

C, D, and E

152
Q

152 - 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 in stock.

Which relationship implementation supports these requirements?
A. Line Item has a Lookup field to Order and there can be many Orders per Line Items.
B. Order has a Lookup field to Line Item and there can be many Line Items per Order.
C. Line Item has a Master-Detail field to Order and the Master can be re-parented.
D. Order has a Master-Detail field to Line Item and there can be many Line Items per Order.

A

C

153
Q

153 - What is the value of the Trigger.old context variable in a Before Insert trigger?
A. Undefined
B. null
C. A list of newly created sObjects without IDs
D. An empty list of sObjects

A

B

154
Q

154 - A developer must create an Apex class, ContactController, that a Lightning component can use to search for Contact records. Users of the Lightning component should only be able to search for Contact records to which they have access.

Which two will restrict the records correctly?

Choose 2 answers
A. public wich sharing class ContactController
B. public without sharing class ContactController
C. public inherited sharing cless ContactController
D. public class ContactController

A

A and C

155
Q

155 - 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 practices are followed?

Choose 2 answers
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 of 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 that includes all events.

A

C and D

156
Q

156 - AggregateResult
Which two examples above use the System, debug statements to correctly display the results from the SOQL aggregate queries?
(//It’s too hard to read to the picture given)
Choose 2 answers
A. Example 1
B. Example 2
C. Example 3
D. Example 4

A

B and C

157
Q

157 - A team of many developers work in their own individual orgs that have the same configuration as the production org.

Which type of org is best suited for this scenario?
A. Developer Sandbox
B. Full Sandbox
C. Developer Edition
D. Partner Developer Edition

A

A

158
Q

158 -A developer is writing tests for a class and needs to insert records to validate functionality.

Which annotation method should be used to create records for every method In the test class?
A. @PreTest
B. @StartTest
C. @isTest(SeeAllData=true)
D. @TestSetup

A

D

159
Q

159- The values “High”,”Medium” and Low are Identified as common values for multiple picklists different object.

What is an approach a developer can take to streamline maintenance of the picklists 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 Pickist on each object and select “Restrict picklist to the values deified in the value set”.
D. Create the Picklist on each object and add a validation rule to ensure data integrity.

A

A

160
Q

160 - Which Salesforce org has a complete duplicate copy of the production org including data and configuration?
A. Partial Copy Sandbox
B. Production
C. Full Sandbox
D. Developer Pro Sandbox

A

C

161
Q

161 - The following Apex method is part of the ContactService class that is called from a trigger:

Public static void setBusinessUnittoEMEA(Contact thisContact) {
thisContact.Business__Unit__c = ‘EMEA’;
update thisContact;
}
How should the developer modify the code to ensure best practices are met?
A. public static void setBusinessUnitToEMEA(List<Contact> contacts) {
for (Contact thisContact: contacts) {
thisContact.Business_Unit\_\_c = ’EMEA’;
}
update contacts;
}
B. Public static void setBusinessUnitToEMEAU(Contact thisContacts) {
List<Contact> contacts) = new List <contact>();
contacts.add(thisContact.Business_Unit\_\_c=’EMEA’;
update contacts;
}</contact></Contact></Contact>

A

A

162
Q

162 - 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 in stock.

Which relationship implementation supports these requirements?
A. Order has a Master-Detail field to Line Item and there can be many Line Items per Order:
B. Order has a Lookup field to line item and there can be many Line items per Order.
C. Line item has a Master-Detail field to order and the Master can be re-parented.
D. Line Item has a Lookup field to Order and there can be many Orders per Line Items.

A

C

163
Q

163 - A developer Is implementing an Apex class for a financial system. Within the class, the variables ‘creditAmount’ and
‘debitAmount’ should net 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 final keyword and assign its value when declaring the variable.
B. Use the final keyword and assign its value in the class constructor,
C. Use the static keyword and assign, its value in the class constructor.
D. Use the static keyword and assign Its value in a static initializer.

A

A and B

164
Q

164 - Which action may cause triggers to fire?
A. Renaming or replacing a pick list entry
B. Changing a user’s default division when the transfer division option is checked
C. Updates to Feed Items
D. Cascading delete operations

A

C

165
Q

165 - Universal Containers wants a list button to display a Visualforce page that allows users to edit multiple record

Which Visualforce feature supports this requirement?
A. custom controller
B. <apex:listButton> tag
C. recordSetVar page attribute
D. controller extension</apex:listButton>

A

C

166
Q

166 - A developer wants to invoke an outbound message when a record meets a specific criteria.

Which three features satisfy this use case?
Choose 3 answers
A. Process Builder can be used to check the record criteria and send an outbound message without Apex code.
B. Workflows can be used to check the record criteria and send an outbound message,
C. Flow Builder can be used to check the record criteria and send an outbound message without additional code.
D. Approval Process has the capability to check the record criteria and send an outbound message without Apex code.

A

B, C, and D

167
Q

167 - 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. String.escapeSingleQuotes(ApexPages.currentPage(). getParameters().get(‘url_param’))
C. String.ValueOf(ApexPages.currentPage().getParameters(). get(‘url_param’))
D. ApexPages.currentPage().getParameters().get(‘url_param’).
escapeHtml4()

A

D

168
Q

168 - In the following example, which sharing context will mymethod execute when it is invoked?

public Class myClass {
public void myMethod ( ) { /* implementation */}
}
A. Sharing rules will be enforced by the instantiating class.
B. Sharing rules will not be enforced for the running user.
C. Sharing rules will be inherited from the calling context.
D. Sharing rules will be enforced for the running user.

A

C

169
Q

169 - The Jop_Application__c custom object has a field that is a Master-Detail relationship to the Contact object, where the Contact object is the Master.

As part of a feature implementation, a developer needs to retrieve a list containing all Contact records where the related Account Industry is ‘Technology’ while also retrieving the contact’s Jop_Application__c records.

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

A. [SELECT Id, (SELECT Id FROM Jop_Application__r) FROM Contact WHERE Accounts.Industry =
‘Technology’]
B. [SELECT Id, (SELECT Id FROM Jop_Application__c) FROM Contact WHERE Account.Industry =
‘Technology’];
C. [SELECT Id, (SELECT Id FROM Jop_Application__r) FROM Contact WHERE Account.Industry =
‘Technology’];
D. [SELECT Id, (SELECT Id FROM Jop_Application__c) FROM Contact WHERE Accounts.Industry =
‘Technology’];

A

C

170
Q

170 - Given the following Anonymous Block:

List<Case> casesToUpdate = new List<Case>( );
for(Case thisCase : [SELECT Id, Status FROM Case LIMIT 50000]) {
thisCase.Status = ‘Working’;
casesToUpdate.add(thisCase)
}
try{
Database.update(casesToUpdate, 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 try-catch block will handle any DHL exceptions thrown,
B. The try-catch block will handle exceptions thrown by governor limits.
C. The transaction will succeed and changes will be committed.
D. The transaction will fail due to exceeding the governor limit</Case></Case>

A

D

171
Q

171 - 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. Scratch orgs
B. Developer sandboxes
C. Full Copy sandboxes
D. Developer eras

A

A

172
Q

172 - Which statement describes the execution order when triggers are associated to the same object and event?

A. Triggers are executed alphabetically by trigger name.
B. Trigger execution order cannot be guaranteed.
C. Triggers are executed in the order they are created.
D. Triggers are executed in the order they are modified.

A

B

173
Q

173 - A next Best Action strategy uses Enhancer Element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors.

What is the correct definition of the Apex method?
A. @InvocableMethod
global static List<List<Recommendation>> getLevel(List<ContactWrapper>input)
{/* implemantion*/}
B. @InvocableMethod
global List<List<Recommendation>> getLevel(List<ContactWrapper>input)
{/* implemantion*/}
C. @InvocableMethod
global static ListRecommendation getLevel(List<ContactWrapper>input)
{/* implemantion*/}
D. @InvocableMethod
global ListRecommendation getLevel(ContactWrapper input)
{/* implemantion*/}</ContactWrapper></ContactWrapper></Recommendation></ContactWrapper></Recommendation>

A

A

174
Q

174 - 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 Import Wizard can not import all 500 records.
B. Data Loader automatically relates Opportunities to Accounts,
C. Data Import Wizard does not support Opportunities.
D. Data Loader runs from the developer’s browser.

A

C

175
Q

175- Which two are best practices when it comes to Aura component and application event handling?

Choose 2 answers
A. Handle low-level events 1ft the event handler and re-fire them as higher-level events
B. Try to use application -events as opposed to component events,
C. Reuse the event logic in a component bundle, by putting the logic in the helper
D. Use component events to communicate actions that should be handled at the application level.

A

A and C

176
Q

176- What are three benefits of using declarative customizations over code?

Choose 3 answers
A. Declarative customizations have more flexibility related to limits.
B. Declarative customizations cannot generate run time errors,
C. Declarative customizations automatically update with each Salesforce release
D. Declarative customizations generally require less maintenance.

A

A, C, and D

177
Q

177- An Opportunity needs to have an amount rolled up from a custom object that is not in a Master/Detail relationship.

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 trigger on the child object and use an aggregate function to sum the amount for all related child objects under the Opportunity,
C. Write a Process Builder that Minks the custom object to the Opportunity
D. Use the Streaming API to create real-time rol!-tfp summaries.

A

B

178
Q

178 - An org has an existing Flow that creates an Opportunity with an Update Records element. A developer must update the Flow to also create a contact and store the created Contact’s İD on the Opportunity

Which update should the developer make in the Flow?
A. Add a new Get -Records dement
B. Add a new Quick Action element (of type Create).
C. Add a new update Records element.
D. Add a new Create Records element.

A

D

179
Q

179- An Approval Process is defined in the Expense_Item__c object. A business rule dictates that whenever a user 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.

A developer is asked to explore if this automation can be implemented without writing any Apex code.

Which statement is true regarding this automation request?
A. This can only be automated with Apex code.
B. The developer can use a record triggered flow with Actions.
C. This approval step cannot be automated and must be done manually.
D. The developer can use Einstein Next Best Actions.

A

A

180
Q

180 - Universal Containers(UC) wants to lower its shipping cost while making the shipping process more efficient. The Distribution Officer advises UC to implement global 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 add to create the most efficient model that supports the business need?
A. Add a Master-Detail field on the Global Address object to the Account object.
B. Add a lookup field on the Account object to the Global Address object.
C. Add a Lookup field on the Global Address object to the Account object.
D. Add a Master-Detail field on the Account object to the Global Address object.

A

B

181
Q

181 - 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 CompanyName Fields RETURNING lead(id, name), account(id, name), contact(id, name)
B. SELECT lead(id, name), account(id,name), contact(id, name) FROM Lead, Account, Contact WHERE Name = ‘Universal Containers’
C. SELECT Lead.id, Lead.Name, Account.Id, Account.Name, Contact.Id, Contact. Name FROM Lead, Account, Contact WHERE CompanyName = ‘Universal Containers’
D. FIND ‘Universal Containers’ IN Name Fields RETURNING lead(id, name), account(id, name), contact(id, name)

A

D

182
Q

182 - Flow Builder uses an Apex Action to provide information about multiple Contacts, stored in a custom class,

ContactInfo.
Which is the correct definition of the Apex method that gets the additional information?
A. @InvocableMehod(label=’Additional Info’)
public List<ContactInfo> getInfo(List<Id> contactIds)
{/* implementation */}
B. @InvocableMehod(label=’Additional Info’)
public ContactInfo getInfo(Id contactId)
{/* implementation */}
C. @InvocableMehod(label=’Additional Info’)
public static List<ContactInfo> getInfo(List<Id> contactIds)
{/* implementation */}
D. @InvocableMehod(label=’Additional Info’)
public static ContactInfo getInfo(Id contactId)
{/* implementation */}</Id></ContactInfo></Id></ContactInfo>

A

C

183
Q

183 - How does the Lightning Component framework help developers implement solutions faster?
A. By providing code review standards and processes
B. By providing an Agile process with default steps
C. By providing change history and version control
D. By providing device-awareness for mobile and desktops

A

D

184
Q

184 - A developer has to identify a method in an Apex class that performs resource Intensive actions in memory by iterating ever the result set of a SOQL statement on the account, me method also performs a DML statement to save the changes to the database.

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

Choose 2 answers
A. Use trie @ReadOnly annotation to bypass the number of rows returned by a SOQL.
B. Use Partial DML statements to ensure only valid data is committed,
C. Use the System.Limit class to monitor the current CPU governor limit consumption.
D. Use the Database.Savepoint method to enforce database integrity.

A

C and D

185
Q

185 - A developer considers the following snippet of code:
Boolean isOK;
integer x;
String theString =’Hello’;
if(isOK == false && 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. 3
B. 1
C. 4
D. 2

A

C

186
Q

186 - Which action causes a before trigger to fire by default for Accounts?

A. Renaming or replacing picklists
B. Importing data using the Data Loader and the Bulk API
C. Updating addresses using the Mass Address update tool
D. Converting Leads to Contact accounts

A

B

187
Q

187 - Which three statements are true regarding custom exceptions in Apex?

Choose 3 answers
A. A custom exception class must extend the system Exception class.
B. A custom exception class can extend other classes besides the Exception class.
C. A custom exception class name must end with “Exception”.
D. A custom exception class cannot contain member variables or methods.
E. A custom exception class can implement one or many interfaces.

A

A, C and E

188
Q

188 - A developer created a new trigger that inserts a Task when a new Lead is created. After deploying to production, an outside integration that reads task 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. Use a Try/Catch block after the insert statement.
B. Remove the Apex Class from the Integration User’s Profile.
C. Use the Database method with allOrNone set to false.
D. Deactivate the Trigger before the Integration runs.

A

C

189
Q

189 - 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 guilder
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 and D

190
Q

190 - A developer has an integer variable called maxAttempts.. The developer needs to ensure that once maxAttempts is initialized, it preserves its value for the length 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 private static variable on a helper class,
B. Declare maxAttempts as a constant using the static and final keywords.
C. Declare maxAttempts as a member variable on the trigger definition.
D. Declare maxAttempts as a variable on a helper class.

A

B

191
Q

191- While working in a sandbox, an Apex test fails when run in the Test Framework. However, running the Apex test logic in the Execute Anonymous window succeeds with no exceptions or errors.

Why did the method fail in the sandbox test framework but succeed in the Developer Console?
A The test method does not use System.runAs to execute as a specific user.
B. The test method relies on existing data in the sandbox.
C. The test method has a syntax error in the code.
D. The test method is calling an @future method.

A

B

192
Q

192 - 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 @IsTest (SeeAllData=true) and delete the existing standard price book.
B. Use Test.loadData () and a static resource to load a standard price book,
C. Use @TestVisible to allow the test method to see the standard price book,
D. Use Test.getStandartPricebookId() to get the standard price book ID.

A

D

193
Q

193 - Which three data types can a SOQL query return?
Choose 3 answers
A. Long
B. Double
C. Integer
D. sObject
E. List

A

C, D, and E

194
Q

194 - 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 standartController=”Account”, extensions=”ExtensionA, ExtensionB”>
<apex:commandButton action=”{!save}” value=”Save” />
</apex:pageZ
A. standard controller save()
B. Runtime error will be generated
C. ExtensionB save()
D. ExtensionA save()

A

A

195
Q

195 - 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<Contact> performSearch(String lastName) {</Contact>

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 injeciton attack?

Choose 2 answers
A. Use the @ReadOnly annotation and the with sharing keyword on the class,
B. Use variable binding and replace the dynamic query with a static SOQL
C. Use the escapeSingleQuotes method to sanitize the parameter before its use,
D. Use a regular expression expression on the parameter to remove special characters,

A

B and C

196
Q

196 - 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 developer use, along with a lightning-record-edit-form, so that Salary__c field functions as a currency input and is only viewable and editable by users that have the correct field level permissions on Salary__c?

A. <lightning-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- currency value=” Salary__c”>
</lightning-input-currency>
D. <lightning-input type=”number” value=” Salary__c” formatter=” currency”>
</lightning-input>

A

A

197
Q

197 - Universal Containers stores Orders and Line Items in Salesforce. For security reasons, financial representatives are allowed to see information on the Order such as order amount, but they should not be allowed to see the line Items on the Order.

Which type of relationship should be used between Orders and Line Items?
A. Lookup
B. Master-Detail
C. Indirect Lookup
D. Direct Lookup

A

B

198
Q

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

How should the Order Number field be defined in Salesforce?
A. Lookup
B. Indirect Lookup
C. Number with External ID
D. Direct Lookup

A

C

199
Q

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

A. <aura:component access=”GLOBAL” extends=”ltng:outApp”>
<aura:dependency resource=”c:accountList”/>
</aura:component>
B. <aura:application access=”GLOBAL”>
<aura:dependency resource=”c:accountList”/>
</aura:application >
C. <aura:application access=”GLOBAL” extends=”ltng:outApp”>
<aura:dependency resource=”c:accountList”/>
</aura:application >
D. <aura:component access=”GLOBAL”>
<aura:dependency resource=”c:accountList”/>
</aura:component>

A

C

200
Q

200- 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. Process Builder
B. Triggers
C. Custom objects and fields
D. Roll-up summaries
E. Relationships

A

C, D, and E

201
Q

201- What are two best practices when it comes to Lightning Web Component events?

Choose 2 answers
A. Use event.target to communicate data to elements that aren’t in the same shadow tree.
B. Use events configured with bubble: false and composed: false.
C. Use CustomEvent to pass data from a child to a parent component.
D. Use event.detail to communicate data to elements in the same shadow tree.

A

A and C

202
Q

202 - 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. Visual Studio Cod IDE
B. Developer Console
C. Setup Menu
D. App Exchange

A

B

203
Q

203 - Which aspect of Apex programming is limited due to multitenancy?

A. The number of methods in an Apex class
B. The number of records processed in a loop
C The number of active Apex classes
D The number of records returned from database queries

A

D

204
Q

204 - 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 correct implementation?

A. public class CreditCardPayment implements Payment {
public override void makePayment(Decimal amount) {/* implementation /}
}
B. public class CreditCardPayment implements Payment {
public virtual void makePayment(Decimal amount) {/
implementation /}
}
C. public class CreditCardPayment extends Payment {
public override void makePayment(Decimal amount) {/
implementation /}
}
D. public class CreditCardPayment extends Payment {
public virtual void makePayment(Decimal amount) {/
implementation */}
}

A

C

205
Q

205 - Universal Containers has a 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. Rewrite all Visualforce pages as Lightning components.
B. Enable Available for Lightning Experience, Lightning Communities, and the mobile app on Visualforce pages used by the custom application.
C. Set the attribute enableLightning to true m the definition,
D. Incorporate the Salesforce Lightning Design System CSS stylesheet into the JavaScript applications.

A

D

206
Q

206- What is the result of the following code?
Account a = new Account();
Database.insert(a, false);

A. The record will not be created and no error will be reported.
B. The record will not be created and an exception will be thrown.
C. The record will be created and a message will be in the debug log.
D. The record will be created and no error will be reported.

A

A

207
Q

207 - An Approval Process Is defined in the Expense_Item__c object. A business rule dictates that whenever a user 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 a Process Builder on Expense_Report__c with a ‘Apex’ action type to submit all related Expense_Item__c records when the criteria is met.

C. Create a Process Builder on Expense_Report__c to mark the related Expense_Item__c as submitable and trigger on Expense_Item__c to submit the records for approval.

D. Create two Process Builders, 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.

A

A

208
Q

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

How can a developer implement this feature?
A. Build a Workflow Rule
B. Build an Account Assignment Rule.
C. Build an Account Approval Process.
D. Build a Flow with Flow Builder.

A

D

209
Q

209- A large corporation stores Orders and Line Items in Salesforce for different lines of business. Users are allowed to see Orders across the entire organization, but, for security purposes, should only be able to see the Line Items for Orders in their line of business.

Which type of relationship should be used between Line Items and Orders?

A. Lookup
B. Direct Lookup
C.Master-Detail
D.Indirect Lookup

A

A

210
Q

210- What should a developer use to fix a Lightning web component bug in a sandbox?

A. Execute Anonymous
B. Developer Console
C. VS Code
D. Force.com IDE

A

A

211
Q

211 - A developer must implement a CheckPaymentProcessor class that provides check processing payment capabilities that adhere to what is 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 extends PaymentProcessor
{
public void pay( Decimal amount) {// fuctional code here}
}
C. public class CheckPaymentProcessor implements
PaymentProcessor {
public void pay( Decimal amount) {// fuctional code here}
}
D. public class CheckPaymentProcessor extends PaymentProcessor
{
public void pay( Decimal amount);
}

A

C

212
Q

212 - Which two statements are true about Getter and Setter methods as they relate to Visualforce?

Choose 2 answers
A. Getter methods pass value from a controller to a page.
B. A corresponding setter method is required for each getter method
C. Setter methods always have to be declared global.
D. Getter methods must be named getVariable and setter methods must be named setVariable

A

A and B

213
Q

213 - How does the Lightning Component framework help developers implement solutions faster?
A. By providing change history and version control
B. By providing an Agile process with default steps
C. By providing code review standards and processes
D. By providing device-awareness for mobile and desktops

A

D

214
Q

214 - What is a benefit of developing applications in a multi-tenant environment?
A. Access to predefined computing resources
B. Enforced best practices for development
C. Default out-of-the-box configuration
D. Unlimited processing power and memory

A

A

215
Q

215 - A developer wants to invoke an outbound message when a record meets a specific criteria.

Which two features satisfy this use case?
Choose 2 answers
A. Approval Process has the capability to check the record criteria and send an outbound message without Apex code.
B. Next Best Action can be used to check the record criteria and send an outbound message.
C. Flow Builder 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 message without Apex code.

A

A and C

216
Q

216 - Given the following trigger implementation:

trigger leadTrigger on Lead (before update) {
final ID BUSINESS_RECORDTYPEID = ‘012500000009Qad’;

 for(Lead thisLead : Trigger.now) {
    if(thisLead.Company != null && thisLead.RecordTypeId != 
    BUSINESS_RECORDTYPEID) {
         thisLead.RecordTypeId = BUSINESS_RECORDTYPEID;
    }
 } } The developer receives deployment errors every time a deployment is attempted from a 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 BUSINESS_RECORDTYPEID is pushed as part of the deployment components.
C. Ensure the deployment is validated by a System Admin user on Production.
D. Ensure a record type with an ID of BUSINESS_RECORDTYPEID exists on Production prior to deployment.

A

A

217
Q

217 - 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. Select and run the class on the Apex Test Execution page.
C. View the Class Test Percentage tab on the Apex Class list view in Salesforce Setup.
D. View the Overall Code Coverage panel of the Tests tab in the Developer Console,

A

C

218
Q

218 - What are three ways for a developer to execute tests in an org?
Choose 3 answers
A. Bulk API
B. Tooling API
C. Setup Menu
D. SalesforceDX
E. Metadata API

A

B, C, and E

219
Q

219 - Which three resources in an Aura Component can contain JavaScript functions?
Choose 3 answers
A. Controller
B. Design
C. Renderer
D. Helper
E. Style

A

A, C, and D

220
Q

220 - 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.
D. New methods can be added to a public interface within a released package.
E. A method defined in an Apex interface cannot have an access modifier

A

B, D, and E

221
Q

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

for(Account thisAccount : [SELECT Id, Industry FROM Account LIMIT 150]) {
if (thisAccount.Industry == ‘Technology’) {
thisAccount.Is_Tech__c = true;
}
update thisAccount;
}

When the code executes, what happens as a result of the Apex transaction?
A. The Apex transaction succeeds regardless of any uncaught exception and all processed accounts are updated.
B. If executed in a synchronous context, the Apex transaction is likely to fail by exceeding the DML governor limit.
C. The Apex transaction fails with the following message: Sobject row was retrieved via soL without querying the requested field: Account.Is Tech
D. If executed in an asynchronous context, the Apex transaction is likely to fail by exceeding the ML governor limit.

A

B

222
Q

222 - A developer needs to join data received from an integration 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 attribute that can be used to identify the parent.

Which action will allow the developer to relate records in the data model without knowing the Salesforce ID?
A. Create and populate a custom field on the parent object marked as Unique.
B. Create a custom field on the child object of type Lookup.
C. Create a custom field on the child object of type External Relationship.
D. Create and populate a custom field on the parent object marked as an External ID.

A

D

223
Q

223- In the Lightning UI, where should a developer look to find information about a Paused Flow Interview?
A. In the system debug log by filtering on Pausi filtering on Paused Flow Interview
B. On the Paused Flow Interviews related list for given record
C. On the Paused Flow Interviews component on the Home page
D. In the Paused Interviews section of the Apex Flex Queue

A

D

224
Q

224- Which three code lines are required to create a Lightning component on a Visualforce page?
Choose 3 answers
A. $Lightning.useComponent
B. $Lightning.createComponent
C. <apex:slds></apex:slds>
D. <apex: includeLightning/>
E. $Lightning.use

A

B, D, and E

225
Q

225- The Account object in an organization has a master detail relationship to a child object called Branch. The following automations exist:

● Rollup summary fields
● Custom validation rules
● Duplicate rules

A developer created a trigger on the Account object.
What two things should the developer consider while testing the trigger code?
Choose 2 answers
A. Rollup summary fields can cause the parent record to go through Save.
B. The trigger may fire multiple times during a transaction.
C. Duplicate rules are executed once all DML operations commit to the database.
D. The validation rules will cause the trigger to fire again.

A

A and B

226
Q

226- A developer is asked to prevent anyone other than a user with Sales Manager profile from changing the Opportunity Status to Closed Lost if the lost reason is blank.

Which automation allows the developer to satisfy this requirement in the most efficient manner?
A. A record trigger flow on the Opportunity object
B. An Apex trigger on the Opportunity object
C. An approval process on the Opportunity object
D. An error condition formula on a validation rule on Opportunity

A

D

227
Q

227- What can be used to override the Account’s standard Edit button for Lightning Experience?
A. Lightning action
B. Lightning component
C. Lightning page
D. Lightning flow

A

B

228
Q

228- A developer created a new after insert trigger on the Lead object that creates Task records for each Lead. After deploying to production, an existing outside integration that inserts Lead records in batches to Salesforce is occasionally reporting total batch failures being caused by the Task insert statement. This causes the integration process in the outside system to stop, requiring a manual restart.

Which change should the developer make to allow the integration to continue when some records in a batch cause failures due to the Task insert statement, so that manual restarts are not needed?
A. Use the Database method with allOrNone set to false.
B. Remove the Apex dass from the integration user’s profile.
C. Use a try-catch block after the insert statement.
D. Deactivate the trigger before the integration runs.

A

A

229
Q

229- Universal Containers has implemented an order management application. Each Order can have one or more Order Line items. The Order Line object is related to the Order via a master-detail relationship. For each Order Line item, the total price is calculated by multiplying the Order Line item price with the quantity ordered.

What is the best practice to get the sum of all Order Line item totals on the Order record?

A. Roll-up summary field
B. Quick action
C. Apex trigger
D. Formula field

A

A

230
Q

230- 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>
B. <apex:includeLightning></apex:includeLightning>
C. <apex:Slds></apex:Slds>
D. <apex:styleSheet value="(!$URLFOR ($Resource.slds, 'assets/slds.css'))”></apex:page>

A

A

231
Q

231- A developer needs to allow users to complete a form on an Account record that will create a record for a custom object. The form needs to display different fields depending on the user’s job role. The functionality should only be available to a small group of users.

Which three things should the developer do to satisfy these requirements?
Choose 3 answers
A. Add a dynamic action to the Account record page.
B. Create a custom permission for the users.
C. Create a Lightning web component.
D. Add a dynamic action to the user’s assigned page layouts.
E. Create a dynamic form.

A

A, B, and E

232
Q

232- Managers at Universal Containers want to ensure that only decommissioned containers are able to be deleted in the system. To meet the business requirement a Salesforce developer adds “Decommissioned” as a picklist value for the
Status__c custom field within the Container__c object.

Which tool should the developer use to enforce only Container records with a status of “Decommissioned” can be deleted?
A. After record-triggered flow
B. Apex trigger
C. Before record-triggered flow
D. Validation rule

A

D

233
Q

233- A developer needs to create a custom button for the Account object that, when clicked, will perform a series of calculations and redirect the user to a custom Visualforce page. The developer wants to ensure the Visualforce page matches the Lightning Experience user interface.

What attribute needs to be defined within the <apex:page> tag to meet the requirement?
A. Wizard="true"
B. applyHtmlTag="true"
C. setup="true'
D. lightningStylesheets_”true”</apex:page>

A

D

234
Q

234- Universal Hiring is using Salesforce to capture job applications. A salesforce administrator created two custom objects; Job__c acting as the master object, Job_Application__c acting as the detail.

Within the Job__c object, a custom multi-select picklist, Preferred_Locations__c, contains a list of approved states for the position. Each Job_Application__c record relates to a Contact within the system through a master-detail relationship.

Recruiters have requested the ability to view whether the Contact’s Mailing State value matches a value selected on the Preferred Locations c field, within the Job_Application__c record. Recruiters would like this value to be kept in sync, if changes occur to the Contact’s Mailing State or if the Job’s Preferred Locations c field is updated.

What is the recommended tool a developer should use to meet the business requirement?
A. Record-triggered flow
B. Formula field
C. Apex trigger
D. Process Builder

A

A

235
Q

235- Consider the following code snippet:
public static List‹Lead› obtainAllFields(Set<Id> leadIds){
List<Lead> result = new List<Lead> 0);
for (Id leadid : leadIds)
result.add ([SELECT FIELDS (ALL) FROM Lead WHERE Id = :leadId];
}
return result;
}
Given the multi-tenant architecture of the Salesforce platform, what is a best practice a developer should implement and ensure successful execution of the method?
A. Avoid performing queries inside for loops.
B. Avoid returning an empty List of records.
C. Avoid using variables as query filters.
D. Avoid executing queries without a limit clause.</Lead></Lead></Id>

A

D

236
Q

236- A developer is integrating with a legacy on-premise SQL database.

What should the developer use to ensure the data being integrated is matched to the right records in Salesforce?
A. Formula field
B. Lookup field
C. External Object
D. External ID field

A

D

237
Q

237- Universal Containers 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 is set to “Waiting on Customer”. The Salesforce Administrator wants to ensure the solution used is bulk safe.

Which two automation tool should a developer recommend to meet these business requirements?
A. Scheduled Flow
B. Einstein Next Best Action
C. Entitlement Process
D. Record-Triggered Flow

A

A and D

238
Q

238- A developer is debugging the following code to determine why Accounts are not being created.

List<Account> accts = getAccounts (); // getAccounts implemented elsewhere
Database. insert (accts, false);</Account>

How should the code be altered to help debug the issue?
A. Set the second insert method parameter to true.
B. Collect the insert method return value in a SaveResult variable.
C. Change the ML statement to insert accts.
D. Add a try-catch around the insert method

A

B

239
Q

239- 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 in stock.

Which relationship implementation supports these requirements on its own?
A. Order has a re-parentable lookup field to Line Item.
B. Line Item has a re-parentable master-detail field to Order.
C. Line Item has a re-parentable lookup field to Order.
D. Order has a re-parentable master-detail field to Line Item

A

B

240
Q

240- A developer must create an Apex class, ContactController, that a Lightning component can use to search for Contact records. Users of the Lightning component should only be able to search for Contact records to which they have access

Which two will restrict the records correctly?
Choose 2 answers
A. public inherited sharing class ContactController
B. public without sharing class ContactController
C. public with sharing class ContactController
D. public class ContactController

A

A and C

241
Q

241- On a brand new developer org, a developer writes a single trigger named AccountTrigger on the Account object to perform complex validations on the after insert and after update DML events. A Salesforce administrator creates a Process Builder to update a custom field within the same object every time an Account is created or updated.

How many times will the AccountTrigger fire if a new Account is inserted, assuming no other automation logic is implemented on the Account?
A. 2
B. 4
C. 1
D. 6

A

A

242
Q

242- Universal Containers decides to use purely declarative development to build out a new Salesforce application.

Which two options can be used to build out the business logic layer for this application?
Choose 2 answers
A. Flow Builder
B. Validation Rules
C. Batch Jobs
D. Remote Actions

A

A and B

243
Q

243- A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violations 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. Use a try/catch with a custom exception class.
C. Perform the DML using the Database.upsert() method
D. Include <apex: messages> on the Visualforce page.

A

D

244
Q

244- Given the code below:

List<Account> aList =[SELECT Id FROM Account];
for (Account a : aList){
List<Contact> cList = [SELECT Id FROM Contact WHERE AccountId = :a.Id];
}</Contact></Account>

What should a developer do to correct the code so that there is no chance of hitting a governor limit?
A. combine the two SELECT statements into a single SOQL statement.
B. Add a LIMIT clause to the first SELECT SOQL statement.
C. Add a WHERE clause to the first SELECT SOQL statement.
D. Rework the code and eliminate the for loop.

A

C

245
Q

245- A credit card company needs to implement the functionality for a service agent to process damaged or stolen credit cards. When the customers call in, the service agent must gather many pieces of information. A developer is tasked to implement this functionality.

What should the developer use to satisfy this requirement in the most efficient manner?
A. Lightning Component
B. Apex Trigger
C. Approval Process
D. Flow Builder

A

B

246
Q

246- A business has a proprietary Order Management System (OMS) that creates orders from their website and fulfills the orders. when the order is created in the OMS, an integration also creates an order record in Salesforce and relates it to the contact as identified by the email on the order. As the order goes through different stages in the OMS, the integration also updates it in Salesforce.

It is noticed that each update from the OMS creates a new order record in Salesforce.

Which two actions will prevent the duplicate order records from being created in Salesforce?

Choose 2 answers
A. Use the email on the contact record as an external ID.
B. write a before trigger on the order object to delete any duplicates.
C. Ensure that the order number in the OMS is unique.
D. Use the order number from the OMS as an external ID.

A

C and D

247
Q

247- A developer migrated functionality from JavaScript Remoting to a Lightning web component and wants to use the existing getOpportunities(), method to provide data.

Which modification to the method is necessary?
A. The method must be decorated with (cachesblewtzue).
B. The method must return String of a serialized JSON Array.
C. The method must return a JSON Object.
D. The method must be decorated with @AuraEnabled.

A

D

248
Q

248 – Universal Containers has created a unique process for tracking container repairs . A custom field , status_c , has been created within the container external systems every time the value of the seague picklist changes . e custom object . A developer is tasked with sending notifications to multiple

Which two tools should the developer use to meet the business requirement and ensure low maintenance of the solution ?

Choose 2 answers
A. Record - Triggered flow
B. Apex trigger
C. Apex callouts
D. Platform event

A

C and D

249
Q

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

Which approach can efficiently generate the required data for each unit test ?
A. Add #IsTest ( seeAllData - true ) at the start of the unit test class .
B. Use @TestSetup with a void method .
C.Create test data before Test.starttest ( ) in the unit test .
D.Create a mock using the Stub API .

A

B

250
Q

250 - Which three statements are accurate about debug logs ?

Choose 3 answers
A.The maximum size of a debug log is 5 MB .
B. Only the 20 most recent debug logs for a user are kept .
C.Debug log levels are cumulative , where FINE log level includes all events logged at the DEBUG , INFO , WARN , and ERROR levels .
D.System debug logs are retained for 24 hours .
E.Debug logs can be set for specific users , classes , and triggers .

A

C, D, and E

251
Q

251 - A developer created these three Rollup Summary fields in the custom object, Projecte : Total Timesheets_c Total Approved Timesheets_c Total Rejected_Timesheet_c 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 use to implement the business requirement in order to minimize maintenance overhead?
A. Record - triggered flow
B. Apex trigger
C. Formula field
D. Field Update actions

A

C

252
Q

252 - A developer is creating an app that contains multiple Lightning web components.

One of the child components is used for navigation purposes. When a user clicks a button called Next in the child component, the parent component must be alerted so it can navigate to the next page.

How should this be accomplished?
A. Create a custom event
B. Call a method in the Apex controller
C. Fire a notification
D. Update a property on the parent

A

A

253
Q

253 - A developer created these three Rollup Summary fields in 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 shows the ratio between rejected and approved timesheets for a given project.

Which should the developer use to implement the business requirement in order to minimize maintenance overhead?

A. Roll-up summary field
B. Record-triggered flow
C. Formula field
D. Apex trigger

A

C