PD1 Set3
PD1 Set3
1 of 65. Universal Containers (UC) processes orders in Salesforce in a custom object, Order___c. They also allow sales reps to upload CSV files
with thousands of orders at a time.
A developer is tasked with integrating orders placed in Salesforce with UC’s enterprise resource planning (ERP) system.
1 of 65. Universal Containers (UC) processes orders in Salesforce in a custom object, Order___c. They also allow sales reps to upload CSV files
with thousands of orders at a time.
A developer is tasked with integrating orders placed in Salesforce with UC’s enterprise resource planning (ERP) system.
1 of 65. Universal Containers (UC) processes orders in Salesforce in a custom object, Order __c. They also allow sales reps to upload CSV files
with thousands of orders at a time.
A developer is tasked with integrating orders placed in Salesforce with UC’s enterprise resource planning (ERP) system.
After the status for an order __c is first set to ‘Placed’, the order information must be sent to a REST endpoint in the ERP system that can
process one order at a time.
2 of 65. 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.
Choose 2 answers
4O Quick actions
B. O Approval process
Cc. Account trigger
D. Fast Field Updates record-triggered flow
3 of 65. As part of new feature development, a developer is asked to build a responsive application capable of responding to touch events, that
will be executed on stateful clients.
Which two technologies are built on a framework that fully supports the business requirement?
Choose 2 answers
A. Lightning Web Components
B. 0 Visualforce Components
iC. O Visualforce Pages
0g Aura Components
5 of 65. 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?
AC global class WebServiceClass {
}
rt @) webservice class WebServiceclass {
private static Boolean helperMethed() { /* implementation ... */ }
7 of 65. A developer needs to make a custom Lightning Web Component available in the Salesforce Classic user interface.
D. O Wrap the Lightning Web Component in an Aura Component and surface the Aura Component as a Visualforce tab.
8 of 65.
What can be used to override the Account's standard Edit button for Lightning Experience?
A O Lightning action
B. oO Lightning page
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 O The deployment passes because both classes and the trigger were included in the deployment.
B, oO The deployment fails because no assertions were made in the test method.
c O The deployment passes because the Apex code has the required >75% code coverage.
D. o The deployment fails because the Apex trigger has no code coverage.
10 of 65. A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of Apex tests allowing
them to test isolated requirements for various types of Salesforce cases.
Which approach can efficiently generate the required data for each unit test?
A. O Create a mock using the HttpcalloutMock interface.
B. o Use @TestSetup with a void method.
Cc, O Add @IsTest (seeAllData=true) at the start of the unit test class.
D. O Create test data before Test .startTest() in the unit test.
11 of 65.
A developer must troubleshoot to pinpoint the causes of performance issues when a custom page loads in their org.
A. O Setup Menu
B. O Visual Studio Code IDE
oO AppExchange
D. o Developer Console
12 of 65. A company has a custom object, order __c, that has a required, unique external ID field called order Number__c.
Which statement should be used to perform the DML necessary to insert new records and update existing records in a list of Order __c records
using the external ID field?
A. oO merge orders;
B: O upsert orders;
13 of 65.
An org has an existing flow that edits an Opportunity with an Update Records element. A developer must update the flow to also create a
Contact and store the created Contact’s ID on the Opportunity.
14 of 65. 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. oO Create a mock using the Stub API.
B. oO Create test data before Test.startTest() in the unit test.
15 of 65. Which Lightning Web Component custom event property settings enable the event to bubble up the containment hierarchy and cross
the Shadow DOM boundary?
A. O bubbles: true, composed: false
16 of 65. Universal Containers needs to create a custom user interface component that allows users to enter information about their accounts.
The component should be able to validate the user input before saving the information to the database.
C.©) Visualforce
D. O VUE JavaScript framework
17 of 65. How should a developer write unit tests for a private method in an Apex class?
A. oO Use the SeeAllData annotation.
B. O Add a test method in the Apex class.
18 of 65. Assuming that name is a String obtained by an <apex:inputText> tag on a Visualforce page, which two SOQL queries performed are
safe from SOQL injection?
Choose 2 answers
Ag String query = '%' + name + '%';
B.O) String query = 'SELECT Id FROM Account WHERE Name LIKE \'%' + name.noQuotes() + ‘'S\'';
List<Account> results = Database.query (query) ;
om v | String query = 'SELECT Id FROM Account WHERE Name LIKE \‘%' + String.éscapeSingleQuotes
(name) + '%\"';
List<Account> results = Database.query (query) ;
D.C) string query = ‘SELECT Id FROM Account WHERE Name LIKE \"$"' + name + 'S\"";
List<Account> results = Database.query (query) ;
Time Remaining: 00:50:20
19 of 65. 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?
Integer x = 0;
do {
x= 1;
x++;
} while (x < 1);
Integer x = 0;
do {
x= 1;
x++;
} while (x < 1);
21 of 65. While developing an Apex class with custom search functionality that will be launched from a Lightning Web Component, how can the
developer ensure only records accessible to the currently logged in user are displayed?
A. @ Use the WITH SECURITY_ENFoRCED clause within the SOQL.
B. O Use the inherited sharing keyword.
c. O Use the with sharing keyword.
D. oO Use the without sharing keyword.
23 of 65. What can be easily developed using the Lightning Component framework?
A. oO Salesforce Classic user interface pages
B. Ce] Lightning Pages
24 of 65.
While working in a sandbox, an Apex test fails when run in the Test Runner. However, executing the Apex 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. O The test method does not use system. runAs to execute as a specific user.
B. oO The test method is calling an @future method.
a oO The test method relies on existing data in the sandbox.
D. oO The test method has a syntax error in the code.
24 of 65.
While working in a sandbox, an Apex test fails when run in the Test Runner. However, executing the Apex 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. O The test method does not use System. runAs to execute as a specific user.
B. oO The test method is calling an @future method.
c o The test method relies on existing data in the sandbox.
25 of 65. How many Accounts will be inserted by the following block of code?
insert a;
AOC 100
B.C) ie)
cg 150
D. oO 500
25 of 65. How many Accounts will be inserted by the following block of code?
insert a;
AOC 100
B.C) ie)
oo ] 150
D. oO 500
26 of 65. Which two characteristics are true for Lightning Web Component custom events?
Choose 2 answers
A. O Data may be passed in the payload of a custom event using @wire decorated properties.
B. Data may be passed In the payload of a custom event using a property called detail.
Cs O By default a custom event only propagates to its immediate container and to its immediate child component.
D. By default a custom event only propagates to it’s immediate container.
27 of 65. 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.
28 of 65. Where are two locations a developer can look to find information about the status of batch or future methods?
Choose 2 answers
A. O Developer Console
B. Apex Jobs
29 of 65. A lead developer creates a virtual class called "OrderRequest". Consider the following code snippet:
How can a developer use the OrderRequest class within the CustomerOrder class?
A O @Extends (class="OrderRequest"}
D. O @Implements (class="OrderRequest")
public class Customerorder
30 of 65. What is the value of the Trigger.old context variable in a before insert trigger?
A. fe} An empty list of sObjects
B. O Undefined
; oO null
}
update theseAccounts;
How should a developer modify the code to ensure exceptions are handled gracefully?
A. oO Implement the upsert DML statement.
B, O Implement Change Data Capture.
S fe} Implement a try/catch block for the DML.
D. O Remove null items from the list of Accounts.
epee
Why should the developer choose to use Data Loader instead of Data Import Wizard?
A. O Data Loader automatically relates Opportunities to Accounts.
B. O Data Loader runs from the developer's browser.
Cc o Data Import Wizard does not support Opportunities.
AC @InvocableMethod
global List<List<Recommendation>> getLevel (List<ContactWrapper> input)
{ /*implementation*/ }
B. © @InvocableMethod
global Recommendation getLevel(ContactWrapper input)
{ /*implementation*/ }
& o @InvocableMethod
global static ListRecommendation getLevel (List<ContactWrapper> input)
{ /*implementation*/ }
a @) @InvocableMethod
global static List<List<Recommendation>> getLevel (List<ContactWrapper> input)
34 of 65.
A Next Best Action strategy uses an Enhance element that invokes an Apex method to determine a discount level for a Contact, based on a
number of factors.
AC @InvocableMethod
global List<List<Recommendation>> getLevel (List<ContactWrapper> input)
{ /*implementation*/ }
B. © @InvocableMethod
global Recommendation getLevel(ContactWrapper input)
{ /*implementation*/ }
& o @InvocableMethod
global static ListRecommendation getLevel (List<ContactWrapper> input)
{ /*implementation*/ }
a @) @InvocableMethod
global static List<List<Recommendation>> getLevel (List<ContactWrapper> input)
34 of 65.
A Next Best Action strategy uses an Enhance element that invokes an Apex method to determine a discount level for a Contact, based on a
number of factors.
AC @InvocableMethod
global List<List<Recommendation>> getLevel (List<ContactWrapper> input)
{ /*implementation*/ }
B. © @InvocableMethod
global Recommendation getLevel(ContactWrapper input)
{ /*implementation*/ }
& o @InvocableMethod
global static ListRecommendation getLevel (List<ContactWrapper> input)
{ /*implementation*/ }
a @) @InvocableMethod
global static List<List<Recommendation>> getLevel (List<ContactWrapper> input)
Time Remaining: 00:44:52
35 of 65. Universal Containers decided to transition from Classic to Lightning Experience. They asked a developer to replace a JavaScript
button that was being used to create records with prepopulated values.
35 of 65. Universal Containers decided to transition from Classic to Lightning Experience. They asked a developer to replace a JavaScript
button that was being used to create records with prepopulated values.
36 of 65. Universal Containers has developed custom Apex code and Lightning Components in a Sandbox environment. They need to deploy
the code and associated configurations to the Production environment.
What is the recommended process for deploying the code and configurations to Production?
A. oO Use the Force.com IDE to deploy the Apex code and Lightning Components.
B. O Use the Ant Migration Tool to deploy the Apex cade and Lightning Components.
ec, O Use a change set to deploy the Apex code and Lightning Components.
D. oOo Use Salesforce CLI to deploy the Apex code and Lightning Components.
37 of 65. In the following example, which sharing context will myMethod execute when it is invoked?
38 of 65. What are two considerations for deploying from a sandbox to production?
Choose 2 answers
A. At least 75% of Apex code must be covered by unit tests.
B. O Unit tests must have calls to the System.assert method.
CG; O Should deploy during business hours to ensure feedback can be quickly addressed.
D. All triggers must have at least one line of test coverage.
39 of 65. 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. vsCode
B. SFDX CLI
[or 0 Developer Console
40 of 65. 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?
f
Time Remaining: 00:43:53
41 of 65. 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. Record-Triggered Flow
B. O Batch Jobs
[or 0 Remote Actions
dg Validation Rules
42 of 65. 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. (©) SELECT ID FROM Trainer_c WHERE Gym_r.Name = 'Viridian City Gym'
ae) SELECT Id, (SELECT Id FROM Trainer
oc) FROM Gym_c WHERE Name = ‘Viridian City Gym"
°.@ SELECT Id, (SELECT Id FROM Trainers _r) FROM Gym_c WHERE Name = ‘Viridian City Gym'
D.C) SELECT Id, (SELECT Id FROM Trainers _c) FROM Gym_c WHERE Name = 'Viridian City Gym'
43 of 65. Which three resources in an Aura component can contain JavaScript functions?
Choose 3 answers
A. Style
5.@ Renderer
cg Controller
D.1.) Design
E. Helper
44 of 65. A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an
OrderlItem 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. O Add without sharing to the Apex class declaration.
B. O Change the master-detail relationship to an external lookup relationship.
Cs O Only the 20 most recent debug logs for a user are kept.
D. O Debug log levels are cumulative, where FINE log level includes all events logged at the DEBUG, INFO, WARN, and ERROR levels.
E. The maximum size of a debug log is 5 MB.
47 of 65. An Opportunity needs to have an amount rolled up from a custom object that is not in a master-detail relationship.
x = 4;
AO 3
B.C 2
on © Tad
nm
et
50 of 65. 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.
51 of 65. A developer created a trigger on a custom object. This custom object also has some dependent pick lists.
52 of 65. 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. o Use the with sharing keyword on the class declaration.
D. oO Use the schema describe calls to determine if the logged-in user has access to the Account object.
f
Time Remaining: 00:42:20
53 of 65. 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.
54 of 65. 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.
c. oO Fire a notification.
D. o Create a custom event.
G. O @HttpInvocable
D. O @Aurabnabled(cacheable=true)
56 of 65. 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. o Junction object between Applicant and Job
B. O Lookup field from Applicant to Job
57 of 65. A developer is implementing an Apex class for a financial system. Within the class, the variables 'creditAmount' and 'debitAmount'
should not be able to change once a value is assigned.
In which two ways can the developer declare the variables to ensure their value can only be assigned one time?
Choose 2 answers
A. O Use the static keyword and assign its value in a static initializer.
B. Use the final keyword and assign its value in the class constructor.
Cc; Use the final keyword and assign its value when declaring the variable.
D. O Use the static keyword and assign its value in the class constructor.
58 of 65.
Which scenario is valid for execution by unit tests?
59 of 65. Developers at Universal Containers (UC) use version control to share their code changes, but they notice that when they deploy their
code to different environments they often have failures. They decide to set up Continuous Integration (CI).
What should the UC development team use to automatically run tests as part of their CI process?
A. o Salesforce CLI
B. oO Visual Studio Code
as O Force.com Toolkit
D. O Developer Console
60 of 65. 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. O An Apex trigger on the Opportunity object
B. o An error condition formula on a validation rule on Opportunity
61 of 65. 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. O Use the @isTest (seeAllData=true) annotation in the test class.
B. 0 Use the @isTest (isParallel=true) annotation in the test class.
62 of 65. A business has a proprietary Order Management System (OMS) that creates orders from its 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.
The business notices that each update from the OMS creates a new order record in Salesforce.
Which two actions should prevent the duplicate order records from being created in Salesforce?
Choose 2 answers
A. Use the order number from the OMS as an external ID.
B. Ensure that the order number in the OMS is unique.
c. O Use the email on the contact record as an external ID.
D. O Write a trigger on the Order object to delete the duplicates.
Time Remaining: 00:41:10
Gi sObject
dg Integer
E. List
64 of 65. 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. o Use the Database method with allornone set to false.
B. oO Deactivate the trigger before the integration runs.
Cc. O Remove the Apex class from the integration user's profile.
D. O Use a try-catch block after the insert statement.
65 of 65. Which two statements are true about using the @testSetup annotation in an Apex test class?
Choose 2 answers
A. O Records created in the test setup method cannot be updated in individual test methods.
B. In a test setup method, test data is inserted once and made available for all test methods In the test class.
Cs O A method defined with the @testSetup annotation executes once for each test method in the test class and counts towards system limits.
D. The @testSetup annotation is not supported when the @isTest(SeeAllData=True) annotation is used.
1A
ee
(a) jo io iO FEE BEE
EE Ee
Answers
ASSSSSIICUIL
QUIT
un wn lu (a) I~ i)
fs iO co i es)
oO
\~]
a4. BEI a) Ma [a] 44 Lg aa i
oO In
65
lua ey ad
ko Gu
iO
5i.A
(ay BeRPE
oy IS inmm .F
PEPE BBE oO FERRE
Time Taken: 65 minutes of 105 minutes total
Result: Pass
Congratulations! You have successfully completed the certification exam to become a Salesforce Certified Platform Developer I, Welcome to the Salesforce worldwide community of Certified
Professionals!
Exit Test