0% found this document useful (0 votes)
2K views68 pages

PD2 Set 1

Yhgf hggj hhhu gguu

Uploaded by

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

PD2 Set 1

Yhgf hggj hhhu gguu

Uploaded by

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

© Sentinel Secure ?

KRYTERION Version: 18.0.0


ne
| KRYTERION
By cioea TESTING SOLUTIONS pana ®
Single Book

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:37:20

i 1 of 60. 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?

\ A060 upsert orders Order_Number_¢;



B. upsert orders;

‘ Cc. merge orders;


'
D. merge orders Order Number ¢;

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here... Q


© Sentinel Secure ? x

KRYTERION Version: 18.0.0


ne
| KRYTERION
By cioea TESTING SOLUTIONS pana ®
Single Book

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:37:15

i 2of 60. An Apex class does not achieve expected code coverage. The testSerup method explicitly calls a method in the Apex class.

How can the developer generate the code coverage?

A. Add @testvisible to the method in the class the developer Is testing.


\ B. Verify the user has permissions passing a user into system. runAs()-

: c@ Call the Apex class method from a cestMethod instead of the testSetup method.
1 D. Use system.assert() in testSetup to verify the values are being returned.
'

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here... Q


© Sentinel Secure ? x

KRYTERION Version: 18.0.0


Test Aids

I<” KRYTERION” &> partner ®


By cioea TESTING SOLUTIONS

Salesforce Certified Platform Developer II - Multiple Choice SU)


Multiple Books
Time Remaining : 01:37:13

i 3 of 60. Which method should be used to convert a Date to a String in the current user's locale?

A. Date. parse
| B. o Date. format |
\ E.. String.format |
‘ D. String. valueOf Pencil
& Paper

Mark this item for later review. Uy |

Written
Provide question feedback here (optional): Materials

Please Provide Feedback here...


6 Sentinel Secure ? x

KRYTERION Version:

Test Aids
18.0.0

Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner

e
Single Book

Salesforce Certified Platform Developer II - Multiple Choice


| J
Multiple Books
Time Remaining : 01:37:09

4 of 60. A developer is tasked with creating a Lightning web component that allows users to create a Case for a selected product, directly from a
custom Lightning page. The input fields in the component are displayed in a non-linear fashion on top of an image of the product to help the Gun
user better understand the meaning of the fields.

Which two components should a developer use to implement the creation of the Case from the Lightning web component? ®
Choose 2 answers
A. lightning-record-edit-form

B. lightning-input .
C.@@ tightning-record-form AC is correct answer
D. lightning-input-field

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


6 Sentinel Secure ? x

KRYTERION Version:

Test Aids
18.0.0

Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
Single Book

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:37:06

i 5 of 60. Ursa Major Solar has a custom object, Servicezo>__c, with an optional Lookup field to Account called partner_Service_Provider__c.

| The Totalsebs__c field on Account tracks the total number of servicezob__¢ records to which a partner service provider Account is related.

\ What is the most efficient way to ensure that the Total_Jobe__c field is kept up to date?

' A. Create a record-triggered flow on Service_Job__c.


1 B. Change Totalzobs__c to a roll-up summary field.
' e Create a schedule-triggered flow on Service_Job__¢
DO Create an Apex trigger on Servicedob__c

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


© Sentinel Secure ? x

KRYTERION Version: —

ly” KRYTERION’
By cioea TESTING SOLUTIONS
partner

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:37:01

i 6 of 60. What are three reasons that a developer should write Jest tests for Lightning web components?

Choose 3 answers
A. oO To verify that events fire when expected
\ B. To test basic user interaction
| c. To verify the DOM output of a component

' D. To test how multiple components work together


'
' E. To test a component's non-public properties

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here... Q


© Sentinel Secure ? x

KRYTERION Version: 18.0.0


~ Test Aids

I<"KRY TERION” partner A)


| Wee TESTING SOLUTIONS itl
|
Single Book

Salesforce Certified Platform Developer II - Multiple Choice @


os : Multiple Books
' Time Remaining : 01:36:57

i 7 of 60. As part of a custom development, a developer creates a Liahtning component to show how a particular opportunity progresses over time. The =
q component must display the date stamp when any of the following fields change: Calculator
| « Amount, Probability, Stage, or Close Date Poet

\ How should the developer access the data that must be displayed? Q

q A. Create a custom date field on Opportunity for each field to track the previous date and execute a SOQL query for date fields. 1 &P ;
‘ B. o Execute a SOQL query for Amount, Probability, Stage, and Close Date on the OpportunityHistory object.
'
' Cc. Subscribe to the OpportunityHistory Change Data Capture event in the Lightning component. S
D. Subscribe to the Opportunity Change Data Capture event in the Lightning component. q J
Written
Materials
Mark this item for later review.

Provide question feedback here (optional): Q

Please Provide Feedback here... "


6 Sentinel Secure ? x

KRYTERION Version:

Test Aids
18.0.0

Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
Single Book

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:36:53

8 of 60. A developer is inserting, updating, and deleting multiple lists of records in a single transaction and wants to ensure that any error prevents all
execution.

How should the developer implement error exception handling in their code to handle this?

A. Use Database methods to obtain lists of Database. saveResults.


B. o Use Database.setSavepoint() and Database.rolisack() with a try-catch statement.

Cc. Use a try-catch statement and handle DML cleanup in the catch statement.
D. Use a try-catch and use sebject.adderror() on any failures.

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


KRYTERION =.
© Sentinel Secure ? x

Test Aids

I<” KRYTERION” partner ®


By cioea TESTING SOLUTIONS

Salesforce Certified Platform Developer II - Multiple Choice SU)


Multiple Books
Time Remaining : 01:36:50

i 9 of 60. Which annotation should a developer use on an Apex method to make it available to be wired to a property in a Lightning web component?
Calculator
A. @RemoteAction
| B. @AuraEnabled(cachsable=true) | |

\ CO S@RemoteAction (cacheable=true) | |
‘ D. @auraEnabled Pencil & Paper

‘ B is correct Answer | oul |


Mark this item for later review. | Uy |

Written
Provide question feedback here (optional): Materials

Please Provide Feedback here...


KRYTERION
6 Sentinel Secure ? x

‘ersion: 18.0.0

Test Aids
Time Remaining : 01:36:45

10 of 60. Universal Containers uses Big Objects to store almost a billion customer transactions called customer_Transaction__b.
Single Book
These are the fields on customer_Transaction__b:

Account__c
Programs
Points_Earned__c
Location_«
Transaction Date__c

The following fields have been identified as Index Fields for the customer_Transaction__b object; Account__c, Program__c, and
Transaction _Date__-¢.

Which SOQL query is valid on the customer_Transaction__b Big Object?

A. SELECT Account_c, Program_c, Transaction_Date_c FROM Customer_Transaction_b


WHERE Account_c = '601R000000302D3"
AND Program
_c INCLUDES ("Shoppers', "Womens')
AND Transaction_Date__c=2019-05-31T00:002

8.© SELECT Account_¢, Program_c, Transaction_Date_c FROM Customer_Transaction__b


WHERE Account_¢ = '601R000000302D3"
AND Program__c ="Shoppers'"

AND Transaction_Date__c=2019-05-31T00:062

c SELECT Account_c, Program__c, Transaction_Date_c FROM Customer Transaction _b


WHERE Account__c = '601R000000302D3"
AND Program__c EXCLUDES ("*Shoppers', “Womens')}
AND Transaction _Date__c=2019-05-31T00: 002

D. SELECT Account_¢, Program_c, Transaction_Date_c FROM Customer_Transacrion__b


WHERE Account _c = '001R000000302n3"'
6 Sentinel Secure ? x

KRYTERION Version: 18.0.0

[ZKRYTERION”
Test Aids

By cioea TESTING SOLUTIONS


Single Book

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:36:40

11 of 60. Given the following containment hierarchy:

<l-- myParentComponent.html -->


<template>
<e-my-child-component></c-my-child-component>
</template>

What is the correct way to communicate the new value of a property named "passthrough" to my-parent-component If the property is
defined within my-child-component?

A. let cEvent = new CustomEvent ($passthrough)


this. dispatchEvent (cEvent):

B. let cEvent = new customEvent('passthrough', { detail: ‘this.passthrough' });


this.dispatchEvent (cEvent) 7
Gc oO let cEvent = new CustomEvent('passthrough', { detail: this.passthrough });
this.dispatchEvent (cEvent);

D. let cEvent = new CustomEvent (‘passthrough *') ;

this.dispatchEvent (cEvent):
© Sentinel Secure ? x

KRYTERION Version: 18.0.0


Test Aids

I<” KRYTERION’
By cioea TESTING SOLUTIONS
partner ®
Single Book

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:36:36

i 12 of 60. A lead developer for a Salesforce organization needs to develop a page-centric application that allows the user to interact with multiple
2 objects related to a Contact. The application needs to implement a third-party JavaScript framework such as Angular, and must be made
available in both Classic and Lightning Experience.
|
\ Given these requirements, what is the recommended solution to develop the application?

' A. Lightning Experience Builder


‘ B. Aura Components
\ eG, oO Visualforce
D. Lightning Web Components

Mark this item for later review.

Provide question feedback here (optional): Q

Please Provide Feedback here...


6 Sentinel Secure ? x

KRYTERION Version:

Test Aids
18.0.0

Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner

e
Single Book

Salesforce Certified Platform Developer II - Multiple Choice


| J
Multiple Books
Time Remaining : 01:36:33

13 of 60. Users upload .csv files in an external system to create account and contact records in Salesforce. Up to 200 records can be created at a time.
The users need to wait for a response from Salesforce in the external system, but the data does not need to synchronize between the two Gun
systems.

Based on these requirements, which method should a developer use to create the records in Salesforce? ®
A. REST API request using compssite/batch/
B REST API request using composite/tree/

G& Apex web services .


D. > Bulk API 2.0 D is correct Answer

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


© Sentinel Secure ? x

KRYTERION Version: 18.0.0

» GLOBAL TESTING SOLUTIONS =


|
itl

Single Book
Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:36:27 @


Multiple Books

| 13 of 60. Users upload -csv files in an external system to create account and contact records in Salesforce. Up to 200 records can be created at a time.
4 The users need to wait for a response from Salesforce in the external system, but the data does not need to synchronize between the two
{ systems. L )
J Calculator
Based on these requirements, which method should a developer use to create the records in Salesforce? :

A. REST API request using composite/batch/ A.


\ B. REST API request using composite/tree/
: oO Apex web services
' D. Bulk API 2.0
'

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here... g


6 Sentinel Secure ? x

KRYTERION Version: 18.0.0

Test Aids

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:36:20

14 0f 60. Consider the controller code below that Is called from an Aura component and returns data wrapped in a class.
Multiple Books
public class myServerSidetController {
@AuraEnabled
public static MyDataWrapper getSomeData( String theType ) {
Some_Object__¢ someObj = [
SELECT ID, Name
FROM Some_Object__c¢
WHERE Type oc = :theType
LIMIT 1

Another_Object_.c another0bj = [
SELECT ID, Option_¢
FROM Another _Object__c
WHERE Some Object_c¢ = :some0bj.Name Materials
LIMIT 1

MyDataWrapper theData = new MyDataWrapper();

theData.Name = someObj .Name;


theData.Option = anotherd0bj.Option_«cs
return theData;
KRYTERION
6 Sentinel Secure ? x

‘ersion: 18.0.0

Test Aids

theData.Name = someObj .Name:


theData.Option = anotherdbj.Option_
cc?
return theData;

Single Book
public class MyDataWrapper {
public String Name ( get? set: }
public String Option { gat: set: }

: public MyDataWrapper{) {}

The developer verified that the queries return a single record each and there is error handling in the Aura component, but the component is
not getting anything back when calling the controller getsomeData ().

\ What is wrong?

A. The member's Name and option should not be declared public.


1 B. o The member's Name and option of the class MyDataWrapper should be annotated with GAura=nabled also.
\
CG Instances of Apex classes, such as MyDataWrapper, cannot be returned to a Lightning component.
D. The member's Name and option should not have getter and setter.

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


6 Sentinel Secure ? x

KRYTERION Version: 18.0.0

Test Aids
Time Remaining : 01:36:12

15 of 60. Consider the following code snippet:


Single Book
import { LightningElement }) from ‘iwe':
import getOrders from ‘@apex/OrderController.getAvailableoOrders';

export default class OrderManagement extends Lightning=lement [


orders;
' error?

Qwire (getOrders)
wiredOrders({ error, data }) {
if (data) {

this.orders = data;
this.errer = undefined:
} else if (error) {

Rte. eer slaneasy AD is correct Answer


this.orders = undefined:

Materials
When the component is deployed, an error is reported.

Which two changes should the developer implement in the code to ensure the component deploys successfully?

Choose 2 answers
A. oO import getOrders from 'f#salesforce/apex/OrderController.getAvailableOrders';

B. import { LightningElement, api } from ‘lwc';

Cc; import getOrders from ‘'@salesforce/apex/c.OrderController.getAvailableOrders';

D. import { LightningElement, wire } from ‘lwe';


KRYTERION
6 Sentinel Secure ? x

‘ersion: 18.0.0

Test Aids
15 of 60. Consider the following code snippet:

import ( LightningElement } from ‘lwc';


import getOrders from ‘@apex/OrderController.getAvailableOrders';

export default class OrderManagement extends LightningElement {


Single Book
orders;
error?

@wire (getOrders)
wiredOrders({ error, data }) [

if (data) (
this.orders = data;
this.error = undefined;
} else if (error) [
this.error = error;
this.orders = undefined:

When the component Is deployed, an error is reported.

Which two changes should the developer implement in the code to ensure the component deploys successfully?

Choose 2 answers
Ag import getOrders from ‘@salesforce/apex/OrderController.getAvailableorders';

B. import { LightningElement, api } from ‘lwc';

c import getOrders from ‘@salesforce/apex/c-.OrderController.getAvailableOrders';

D. import { LightningElement, wire } from ‘lwc';

Mark this item for later review.

Provide question feedhack here (ontional)-


© Sentinel Secure ? x

KRYTERION Version: 18.0.0


Test Aids

I<” KRYTERION’
By cioea TESTING SOLUTIONS
partner ®
Single Book

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:35:57

i 16 of 60. There are user complaints about slow render times of a custom data table within a Visualforce page that loads thousands of Account records
5 at once.

What can a developer do to help alleviate such issues?

\ A. Use JavaScript remoting to query the accounts.


B. Upload a third-party data table library as a static resource.

’ G oO Use the standard Account List controller and implement pagination.


'
D. Use the transient keyword in the Apex code when querying the Account records.

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here... Q


© Sentinel Secure ? x

KRYTERION Version: 18.0.0


= Test Aids

ly|”WeeKRYTERION”
TESTING SOLUTIONS
partner ®Q |
Single Book

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:35:54

i 17 of 60. Salesforce users consistently receive a "Maximum trigger depth exceeded” error when saving an Account.

| How can a developer fix this error?

A. Split the trigger logic into two separate triggers.


\ B. oO Use a helper class to set a Boolean to TRUE the first time a trigger Is fired, and then modify the trigger to only fire when the
' Boolean Is FALSE.
1 iG, Convert the trigger to use the ¢future annotation, and chain any subsequent trigger invocations to the Account object.
'
' D. Modify the trigger to use the isMultithread=crue annotation.

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here... Q


© Sentinel Secure ? x

KRYTERION Version: 18.0.0


Test Aids

I<” KRYTERION’
By cioea TESTING SOLUTIONS
partner ®
Single Book

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:35:51

i 18 of 60. A corporation has many different Salesforce orgs, with some different objects and some common objects, and wants to build a single Java
2 application that can create, retrieve, and update common object records in all of the different orgs.

Which method of integration should the application use?

\ A. >) SOAP API with the Enterprise WSDL


B. Oo SOAP API with the Partner WSDL


G Apex REST Web Service

' D. Metadata API

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here... Q


© Sentinel Secure ? x

KRYTERION Version: 18.0.0


= Test Aids

I<"KRY TERION partner A)


| Wee TESTING SOLUTIONS |
Single Book

Salesforce Certified Platform Developer II - Multiple Choice @


os : Multiple Books
' Time Remaining : 01:35:49

i 19 of 60. A developer wrote a trigger on Opportunity that will update a custom Last Sold Date field on the Opportunity's Account whenever an =
. Opportunity is closed. In the test class for the trigger, the assertion to validate the Last Sold Date field fails. Calculator

i What might be causing the failed assertion?

\ A. The test class is not using system.runas() to run tests as a Salesforce administrator. L ]
' B. The test class has not defined an Account owner when inserting the test data. Pencil
& Paper

’ G The test class has not implemented seeAllData=true in the test method. —
' D. o The test class has not re-queried the Account record after updating the Opportunity. Uy

Written
Mark this item for later review. Materials

Provide question feedback here (optional):

Please Provide Feedback here... Q


KRYTERION
6 Sentinel Secure ? x

‘ersion: 18.0.0

Test Aids
public class searchFeature|

public static List<List<sObject>> searchRecords(string searchquery){


Yeturn [FIND searchquery IN ALL FIELDS RETURNING Account, Opportunity, Lead];

Single Book

A developer created the following test class to provide the proper code coverage for the snippet above:

@isTest
private class searchFeature_Test(

@Testsetup
private static void makeData
() {
/finsert opportunities, accounts and lead

@isTest
private static searchRecords
Test () (
List<List<sObject>> records = searchFeature.searchRecords('Test');
System.assertNotEquals (records.size(),0);

However, when the test runs, no data is returned and the assertion falls.

Which edit should the developer make to ensure the test class runs successfully?

A. Implement the seeAllData=true attribute In the gtstest annotation.


B. Enclose the method call within Test.startTest() and Test.stopTest ().

CO Implement the setFixedSearchResults method in the test class.


D. Implement the without sharing keyword in the searchPeature Apex class.

oO Mark this item for later review.


© Sentinel Secure ? x

KRYTERION Version: —

ly” KRYTERION’
By cioea TESTING SOLUTIONS
partner

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:35:30

i 21 of 60. What is a benefit of using a WSDL with Apex?

7 A. Enables the user to not pass a Session ID where it is not necessary


I B. Reduces the number of callouts to third-party web services

\ G Allows for web services to be tested and achieve code coverage

‘ D. o Allows for classes to be generated from WSDL and imported into Salesforce

'
'
Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


© Sentinel Secure ? x

KRYTERION Version: —

ly” KRYTERION’
By cioea TESTING SOLUTIONS
partner

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:35:27

i 22 of 60. A developer needs to store variables to control the style and behavior of a Lightning Web Component.

Which feature should be used to ensure that the variables are testable in both Production and all Sandboxes?

A. Custom variable
\ B. Custom object
G oO Custom metadata

\ D. Custom setting

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here... Q


© Sentinel Secure ? x

KRYTERION Version: 18.0.0


= Test Aids

|| WeeKRYTERION”
TESTING SOLUTIONS
partner Q |
Single Book

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:35:24

i 23 of 60. A company has an Apex process that makes multiple extensive database operations and web service callouts. The database processes and
2 web services can take a long time to run and must be run sequentially.

i How should the developer write this Apex code without running into governor limits and system limitations?

\ A. oO Use Limits class to stop entire process once governor limits are reached.
' B. Use Apex Scheduler to schedule each process.

} Cc, Use Queueable Apex to chain the jobs to run sequentially.


'
D. Use multiple @future methods for each process and callout.

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here... Q


© Sentinel Secure ? x

KRYTERION Version: 18.0.0


= Test Aids

|| WeeKRYTERION”
TESTING SOLUTIONS
partner Q |
Single Book

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:35:20

i 24 of 60. A business currently has a process to manually upload orders from its external Order Management System (OMS) into Salesforce.

| This is a labor intensive process since accounts must be exported out of Salesforce to get the IDs. The upload file must be updated with the Poet
correct account IDs to relate the orders to the corresponding accounts. Q

\ Which two recommendations should make this process more efficient? 7


' Pencil
& Paper
‘ Choose 2 answers
1 A. Ensure the data In the file is sorted by the order ID. —
'
B. Use the upsert wizard in the Data Loader to import the data. Uy
G Identify unique fields on Order and Account and set them as External IDs. - <
Written
D. Use the insert wizard in the Data Loader to import the data. Materials

Mark this item for later review.

Provide question feedback here (optional): Q

Please Provide Feedback here...


© Sentinel Secure ? x

KRYTERION Version: 18.0.0


~ Test Aids

I<"KRY TERION” partner A)


| Wee TESTING SOLUTIONS |
Single Book

Salesforce Certified Platform Developer II - Multiple Choice @


os : Multiple Books
' Time Remaining : 01:35:17

i 25 of 60. A company uses their own custom-built enterprise resource planning (ERP) system to handle order management. The company wants Sales ———
s Reps to know the status of orders so that if a customer calls to ask about their shipment, the Sales Rep can advise the customer about the Calculator
| order's status and tracking number if it has shipped. og

\ Which two methods can make this ERP order data visible in Salesforce? Q

Choose 2 answers Pencil


& Paper
‘ A. Use Salesforce Connect to view real-time Order data in the ERP system.
\ B. Have the ERP system push the data into Salesforce using the SOAP API. De
Cc Ensure real-time order data is in Salesforce using the Streaming API. Uy

D. Write a cron job In Salesforce to poll the ERP system for order updates. : Written :
Materials

Mark this item for later review.

Provide question feedback here (optional): Q

Please Provide Feedback here...

~
6 Sentinel Secure ? x

KRYTERION Version:

Test Aids
18.0.0

Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner

e
Single Book

Salesforce Certified Platform Developer II - Multiple Choice


| J
Multiple Books
Time Remaining : 01:35:13

26 of 60. A developer wrote an Apex method that makes an HTTP callout to an external system to get specialized data when a button is clicked from a
custom Lightning web component on the Account record page. Gun

Recently, users have complained that it takes longer than desired for the data to appear on the page after clicking the button.
®
What should the developer use to troubleshoot this issue?

A. Lightning Inspector

Bi) Oevekiper Coneole A is correct Answer


& Salesforce CLI

D. Event Logs

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


6 Sentinel Secure ? x

KRYTERION Version: 18.0.0

Test Aids
Time Remaining : 01:35:08

27 of 60. Consider the following code snippet:


Single Book
trigger OpportunityTrigger on Opportunity (before insert, before update) [
for (Opportunity opp : Trigger-new){
OpportunityHandler.setPricingStructure (Opp)

public class OpportunityHandler(


public static void setPricingStructure (Opportunity thisOpp){
Pricing_Structure_¢c ps = [Select Type__c FROM Pricing _Structure_¢ WHERE industry_o<¢ =
tthisOpp.Account_Industry_¢]?
thisOpp.Pricing Structure_c = ps.Type__c:
update thisOpp;

Which two best practices should the developer implement to optimize this code?

Choose 2 answers
A. Use a collection for the DML statement.
B. @ Query the ericing_structure__c records outside of the loop. B ,D is correct Answer Materials

C. oO Change the trigger context to after update, after insert.


D. Remove the DML statement.

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


6 Sentinel Secure

KRYTERION Version: 18.0.0

Test Aids

Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner

e
Single Book

Salesforce Certified Platform Developer II - Multiple Choice


A
Multiple Books
Time Remaining : 01:35:03

28 of 60. A developer is creating a Lightning web component that displays a list of records in a lightning-datatable. After saving a new record to the
database, the list is not updating.

datas
Qwire(recordList, {recordId : *SrecordId'})
records (result) {
if(result.data)(
this.data = result.data;
) @lse if(result.error)(
this.showToast (result.error);

What should the developer change in the code above for this to happen?

A. Add the @crack decorator to the data variable. D is correct Answer


B. o Create a new variable to store the result and annotate it with @crack.

c. Call refreshApex() ON this.data.


D. Create a variable to store the result and call refresnapex ().

oO Mark this item for later review.


KRYTERION
6 Sentinel Secure ? x

‘ersion: 18.0.0

Test Aids
export default class MyOpportunities extends LightningElement {
@api userId;
Qwire(getOpportunities, (oppOwner: ‘Suserid"})
opportunities;
Single Book

OpportunityController.cls

public with sharing class OpportunityController {


@AuraEnabled
public static List<Opportunity> findMyOpportunities(Id oppowner) {
return [

SELECT Id, Name, Amount

FROM Opportunity
WHERE OwnerId = :oppOwner
WITH SECURITY_ENFORCED

LIMIT 10

A developer is experiencing issues with a Lightning web component. The component must surface information about Opportunities owned by
the currently logged-in user.

When the component is rendered, the following message is displayed: "Error retrieving data".

Which modification should be implemented to the Apex class to overcome the issue?

A. Use the continuation=true attribute in the Apex method.


B. Edit the code to use the without sharing keyword in the Apex class.

G oe Use the Cacheable=true attribute in the Apex method.

D. Ensure the OWD for the Opportunity object Is Public.

Mark this item for later review.


6 Sentinel Secure ? x

KRYTERION Version:

Test Aids
18.0.0

Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner

e
Single Book

Salesforce Certified Platform Developer II - Multiple Choice


| J
Multiple Books
Time Remaining : 01:34:48

30 of 60. A developer used custom settings to store some configuration data that changes occasionally. However, tests are now failing in some of the
sandboxes that were recently refreshed. Gun

What should be done to eliminate this issue going forward?

A. Set the setting type on the custom setting to Hierarchy.


®
B. Set the setting type on the custom setting to List.

G oO Replace custom settings with static resources.

D. Replace custom settings with custom metadata.

D is correct Answer
Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


6 Sentinel Secure ? x

KRYTERION Version:

Test Aids
18.0.0

Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
Single Book

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:34:45

31 o0f 60. A developer wishes to improve runtime performance of Apex calls by caching results on the client.

What is the most efficient way to implement this?

A. Set a cookie in the browser for use upon return to the page.
B. Decorate the server-side method with @AuraEnabled(storable=true).
G oO Decorate the server-side method with @auraEnabled(cacheable=true).

D. Call the setstorabie() method on the action in the JavaScript client-side code.

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


6 Sentinel Secure ? x

KRYTERION Version: 18.0.0

Test Aids
Time Remaining : 01:34:41

32 0f 60. A developer wrote the following method to find ail the test accounts in the org:
Single Book
public static Account[] searchTestAccounts()[
List<List<soObject>> searchList = [ FIND ‘test’ IN ALL FIELDS
RETURNING Account (Name) ]¢
return (Account(]) searchList (6);

However, the test method below fails.

@isTest
public static void testSearchTestAccounts () (
Account a = new Account (nam|e="test");
insert a;
Recount [] accounts = TestAccountFinder.searchTestaAccounts
();
System.assert(accounts.size() == 1 );

What should be used to fix this failing test? .


A. Test.loadData to set up expected data
B is correct Answer
B. Test.fixedSearchResults() method to set up expected data Materials

Cc, o @isTest (SesAllData=true) to access org data for the test

D. @testSetup method to set up expected data

oO Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


6 Sentinel Secure ? x

KRYTERION Version:

Test Aids
18.0.0

Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner

Time Remaining : 01:34:38


Salesforce Certified Platform Developer II - Multiple Choice
@
|
Multiple Books
J

33 of 60. Consider the following code snippet:

HttpRequest req = new HttpRequest ();


req.setEndpoint ('https://TestEndpoint .example.com/some_path')s
req.setMethod('GET'):
Blob headerValue = Blob.valueOf('myUserName' + ':" + ‘strongPassword'); AC . A
String authorizationHeader = "BASIC * + EncodingUtil.baseé4Encode (headerValue); IS correct nswer
req.setHeader (‘Authorization’, authorizationHeader) ;

Http http = new Http();


HTTPResponse res = http.send(req);

Which two steps should the developer take to add flexibility to change the endpoint and credentials without needing to modify code?

Choose 2 answers
A. Create a Named Credential, endPoint_nc, to store the endpoint and credentials.
B. Store the URL of the endpoint in a custom Label named endPointurt.
G& Use req.setEndpoint (*callout:endPoint_nc'); within the callout request.

D. Use req. setEndpoint (Label .endPointuURL);.

Mark this item for later review.


KRYTERION ni 0
© Sentinel Secure ? x

| KRYTERION’
By cioea TESTING SOLUTIONS
partner
Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:34:34

i 34 of 60. Which tag should a developer use to display different text while an <apex: commandButton> is processing an action?

1 A. <apex:actionPoller>
| B. o <apex:actionStatus>
\ c. <apex:actionSupport>

t D. <apex: pageMessages>
{
'
'
Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


© Sentinel Secure ? x

KRYTERION Version: 18.0.0


ne
| KRYTERION
By cioea TESTING SOLUTIONS pana ®
Single Book

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:34:31

i 35 of 60. Part of a custom Lightning Component displays the total number of Opportunities in the org, which is in the millions. The Lightning
2 Component uses an Apex Controller to get the data it needs.

What is the optimal way for a developer to get the total number of Opportunities for the Lightning Component?

\ A. Apex Batch job that counts the number of Opportunity records


B. Oo COUNT() SOQL aggregate query on the Opportunity object

1 Gc SUM() SOQL aggregate query on the Opportunity object


'
D. SOQL for loop that counts the number of Opportunities records

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here... Q


KRYTERION ni 0
© Sentinel Secure ? x

| KRYTERION’
By cioea TESTING SOLUTIONS
partner
Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:34:28

i 36 of 60. What is the best practice to initialize 4 Visualforce page in a test class?

is AO Use Test. setCurrentPage (Page.MyTestPage) 7

I B. Use Test. currentPage.getParameters.put (MyTestPage);

\ G& Use controller.currentPage. setPage (MyTestPage):

q D. Use Test.setCurrentPage.MyTestPage;
t
1
'
Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


© Sentinel Secure ? x

KRYTERION Version: 18.0.0


= Test Aids

I<"KRY TERION” partner A)


| Wee TESTING SOLUTIONS itl
|
Single Book

Salesforce Certified Platform Developer II - Multiple Choice @


os : Multiple Books
' Time Remaining : 01:34:24

i 37 of 60. Just prior to a new deployment the Salesforce administrator, who configured a new order fulfillment process feature in a developer sandbox, ————
q suddenly left the company. Calculator

i As part of the UAT cycle, the users had fully tested all of the changes in the sandbox and signed off on them; making the Order fulfillment
\ feature ready for its go-live in the production environment.

Unfortunately although a Change Set was started, it was not completed by the former administrator. A developer is brought in to finish the Pencil & Paper
| deployment. |
'
What should the developer do to identify the configuration changes that need to be moved into production? &

A. o Leverage the Setup Audit Trail to review the changes made by the departed Administrator and identify which changes should be - Written :
added to the Change Set. Materials
B. In Salesforce setup, look at the last modified date for every object to determine which should be added to the Change Set.
om Set up Continuous Integration and a Git repository to automatically merge all changes from the sandbox metadata with the
production metadata.
D. Use the Metadata API and a supported development IDE to push all of the configuration from the sandbox into production to
ensure no changes are lost.

Mark this item for later review.

Provide question feedback here (optional):


~
KRYTERION ni 0
© Sentinel Secure ? x

| KRYTERION’
By cioea TESTING SOLUTIONS
partner
Single Book

Salesforce Certified Platform Developer II - Multiple Choice 2


Multiple Books
Time Remaining : 01:34:20

i 38 of 60. As part of point-to-point integration, a developer must call an external web service which, due to high demand, takes a long time to provide
. a response. As part of the request, the developer must collect key inputs from the end user before making the callout. Calculator

i Which two elements should the developer use to implement these business requirements? |

\ Choose 2 answers | }
‘ A. Screen Flow Pencil& Paper

|} B. Lightning web component . oie
‘ ©. Process Builder BD is correct Answer Q |
} Vs |
dD. Apex method that returns a Continuation object L I
Written
Materials
Mark this item for later review.

Provide question feedback here (optional): Q

Please Provide Feedback here...


6 Sentinel Secure ? x

KRYTERION Version:

Test Aids
18.0.0

Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner

e
Single Book

Salesforce Certified Platform Developer II - Multiple Choice


| J
Multiple Books
Time Remaining : 01:34:17

39 of 60. Universal Containers requested the addition of a third-party Map widget to an existing Lightning web component.
Gun
Which two actions should the developer take to implement this requirement?

Choose 2 answers
A.|) Import the third-party JavaScript module directly into the component. CD is correct Answer
®
B. Use a content distribution network and include <scripr> </s¢ript> tags In the component.

G Import LoadScript from lightning/platformResourceLoader.

D. Upload the third-party JavaScript library as a static resource that imports into the component.

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


© Sentinel Secure ? x

KRYTERION (Version: —

lx” KRYTERION’
Be cicea. TESTING SOLUTIONS
partner

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:34:14

i 40 of 60. A company has a custom object, Order__c, that has a custom picklist field, Status__c, with values of 'New,' "In Progress,’ or ‘Fulfilled’ and a
. lookup field, Contact__c, to Contact.

i Which SOQL query will return a unique list of all the Contact records that have no ‘Fulfilled’ Orders?

\ A6 SELECT Id FROM Contact WHERE Id NOT IN (SELECT Contact_¢ FROM Order _c¢ WHERE Status_¢ = "Fulfilled')

' B. SELECT Contact_¢ FROM Order_¢ WHERE Status_¢ <> 'Fulfillied'

} G SELECT Id FROM Contact WHERE Id NOT IN (SELECT Id FROM Order__c WHERE Status__c = 'Fulfiiled')
' D. SELECT Contact_c¢ FROM Order_c WHERE Id NOT IN (SELECT Id FROM Order_c Where Status__coe = "Fulfilled')

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here... Q


© Sentinel Secure ? x

KRYTERION =
Version:

Test Aids
18.0.0

_
partner |
yl AK TESTING SOLUTIONS [
Single Book

Salesforce Certified Platform Developer II - Multiple Choice |


mm) |
os : Multiple Books
' Time Remaining : 01:34:10
[ |

:
i 41 of 60. A developer created an Opportunity triager that updates the account rating when an associated opportunity is considered high value. Current @ /
2 criteria for an opportunity to be considered high value is an amount greater than or equal to $1,000,000. However, this criteria value can Calculator
| change over time. |

\ There is a new requirement to also display high value opportunities in a Lightning web component. 8

Which two actions should the developer take to prevent the business logic that obtains the high value opportunities from being repeated in Pencil & Paper
more than one place? r
' |} on ||
'
Choose 2 answers | XD
A. Use custom metadata to hold the high value amount. . | |
° gn vals AD is correct Answer L
B. Call the trigger from the Lightning web component. Written
Material
G Leave the business logic code inside the trigger for efficiency. .

dD. Create a helper class that fetches the high value opportunities.

Mark this item for later review. g

Provide question feedback here (optional):

Please Provide Feedback here...


© Sentinel Secure ? x

KRYTERION Version: 18.0.0


Test Aids

| KRYTERION”
By cioea TESTING SOLUTIONS
partner ®
Single Book

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:34:06

i 42 of 60. A Lightning web component exists in the system and displays information about the record in context as a modal. Salesforce administrators
. need to use this component within the Lightning App Builder.

Which two settings should the developer configure within the xml resource file?

\ Choose 2 answers
A. Set the isvisible attribute to true.
} B. Specify the target to be lightning __RecordPage.
1
' G Specify the target to be lightning AppPage.

dD. Set the Isexposed attribute to true.

Mark this item for later review.

Provide question feedback here (optional): Q

Please Provide Feedback here...


KRYTERION
© Sentinel Secure ? x

{ersion: 18.0.0

. = oe cS Test Aids
Time Remaining : 01:34:01

43 of 60. Refer to the test method below


Single Book
GisTest
static void testAccountUpdate() |[
Account acct = new Account(Name = ‘Test*);

acet.Integration_Updared__c = false;
i insert acct; Multiple Books

4 CalloutUtil.sendAccountUpdate
(acct. Id):
:
1 ed
Account acetAfter = [SELECT Id, Integration_Updated_c FROM Account WHERE Id = sacet.Id] [0]: Calculator

| System.assert (true, acctAfter.Integration_Updated_c); |

\ ' SN
‘ The test method calls a web service that updates an external system with Account information and sets the Account's SRE SAI ra!
1 Integration_Updated__¢ checkbox to True when it completes. —
' ( Si
The test fails to execute and exits with an error: "Methods defined as TestMethod do not support Web service callouts.” N\

Written
What Is the optimal way to fix this? Materiais

A. Add test.starttest () before and Test. stoptest () after calloutUcil.sendAcecountUpdate.


B. o Add Test.startTest() and Test.serMock before and Test.stopTest() after calloutUtil.sendAccountUpdate.
G. Add Test. startTest() before and Test.setMock and Test.stopTest() after calloututil.sendAccountUpdate.

D. Add if (!Test.isRunningTest ()) around CalloutUtil.sendAccountUpdate.

Mark this item for later review.

Provide question feedback here (optional):


~
6 Sentinel Secure ? x

KRYTERION Version:

Test Aids
18.0.0

Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner

e
Single Book

Salesforce Certified Platform Developer II - Multiple Choice


| J
Multiple Books
Time Remaining : 01:33:57

44 of 60. A Salesforce org has more than 50,000 contacts. A new business process requires a calculation that aggregates data from all of these contact
records. This calculation needs to run once a day after business hours. Gun

Which two steps should a developer take to accomplish this?

Choose 2 answers
®
A. Use the ¢future annotation on the method that performs the aggregate calculation.
B. Implement the schedulable interface in the class that contains the aggregate calculation method.

G Use the @readonly annotation on the method that performs the aggregate calculation. BD IS CO rrect Answer

D. Implement the queuable interface in the class that contains the aggregate calculation method.

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


© Sentinel Secure ? x

KRYTERION Version: 18.0.0


= Test Aids

I<"KRY TERION” partner A)


| Wee TESTING SOLUTIONS itl
|
Single Book

Salesforce Certified Platform Developer II - Multiple Choice @


os : Multiple Books
' Time Remaining : 01:33:55

i 45 of 60. A Visualforce page needs to make a callout to get billing information and tax information from two different REST endpoints. The information ————
. needs to be displayed to the user at the same time and the return value of the billing information contains the input for the tax information Calculator
| callout. Each endpoint might take up to two minutes to process. Poet

\ How should a developer implement the callouts? Q

A. A Continuation for the billing callout and an HTTP REST callout for the tax callout pane Paes
} B. oO A Continuation for both the billing callout and the tax callout
'
' G& An HTTP REST callout for the billing callout and a Continuation for the tax callout | S

D. An HTTP REST callout for both the billing callout and the tax callout [ }
Written
Materials
Mark this item for later review.

Provide question feedback here (optional): Q

Please Provide Feedback here... i

~
© Sentinel Secure ? x

KRYTERION Version: 18.0.0


= Test Aids

I<"KRY TERION” partner A)


| Wee TESTING SOLUTIONS itl
|
Single Book

Salesforce Certified Platform Developer II - Multiple Choice @


os : Multiple Books
' Time Remaining : 01:33:54

i 45 of 60. A Visualforce page needs to make a callout to get billing information and tax information from two different REST endpoints. The information ————
. needs to be displayed to the user at the same time and the return value of the billing information contains the input for the tax information Calculator
| callout. Each endpoint might take up to two minutes to process. Poet

\ How should a developer implement the callouts? Q

A. A Continuation for the billing callout and an HTTP REST callout for the tax callout pane Paes
} B. oO A Continuation for both the billing callout and the tax callout
'
' G& An HTTP REST callout for the billing callout and a Continuation for the tax callout | S

D. An HTTP REST callout for both the billing callout and the tax callout [ }
Written
Materials
Mark this item for later review.

Provide question feedback here (optional): Q

Please Provide Feedback here... i

~
KRYTERION.
6 Sentinel Secure ? x

Version: 18.0.0

[Z/KRYTERION”
Test Aids

partner
By cioea TESTING SOLUTIONS

e
Single Book

Salesforce Certified Platform Developer II - Multiple Choice


| J
Multiple Books
Time Remaining : 01:33:51

46 of 60. Given the following code:


Gun

®
for ( Contact c : [SELECT Id, LastName FROM Contact WHERE CreatedDate = TODAY] )

{
Account a = [SELECT Id, Name FROM Account WHERE CreatedDate = TODAY LIMIT 5];

¢.Accountid = a.Id?
update ci

Assuming there were 10 Contacts and five Accounts created today, what Is the expected result? A is correct Answer
A. System. QueryException: List has more than one row for Assignment on Account
B. System.LimitException: Too many SOQL Queries on Contact

CG. System.QueryException: Too many DML Statement errors on Contact


D. oO System.LimitException: Too many SOQL Queries on Account

© Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


6 Sentinel Secure ? x

KRYTERION Version: 18.0.0

[Z/KRYTERION” sorte
Test Aids

By cioea TESTING SOLUTIONS

e
Single Book

Salesforce Certified Platform Developer II - Multiple Choice


| J
Multiple Books
Time Remaining : 01:33:48

47 of 60. A company uses Salesforce to sell products to customers. They also have an external product information management (PIM) system that is
the system of record for products. Gun

A developer received these requirements:


« Whenever a product is created or updated in the PIM, a product must be created or updated as a Product2 record in Salesforce and a ®
PricebookEntry record must be created or updated automatically by Salesforce.
« The PricebookEntry should be created in a Pricebook2 that is specified in a custom setting.

What should the developer use to satisfy these requirements?

A.C) Apex REST A is correct Answer


B. Event Monitoring
CG Invocable Action

D. oO SObject Tree

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


© Sentinel Secure ? x

KRYTERION Version: 18.0.0


= Test Aids

I<"KRY TERION” partner A)


| Wee TESTING SOLUTIONS |
Single Book

Salesforce Certified Platform Developer II - Multiple Choice @


os : Multiple Books
' Time Remaining : 01:33:44

i 48 of 60. A developer wants to write a generic Apex method that will compare the Salesforce Name field between any two object records. For example, =
. to compare the Name field of an Account and an Opportunity; or the Name of an Account and a Contact. Calculator

i Assuming the Name field exists, how should the developer do this?

\ A. oO Cast each object into an sObject and use sobject.get (‘Name’) to compare the Name fields. L ]
' B. Invoke a Schema.describe() function to compare the values of each Name field. Pencil
& Paper

’ G Use the Salesforce Metadata API to extract the value of each object and compare the Name fields. —

' D. Use a String.replace() method to parse the contents of each Name field and then compare the results. Uy

Written
Mark this item for later review. Materials

Provide question feedback here (optional):

Please Provide Feedback here... Q

~
© Sentinel Secure ? x

KRYTERION Version: 18.0.0


~ Test Aids

I<"KRY TERION” partner A)


| Wee TESTING SOLUTIONS |
Single Book

Salesforce Certified Platform Developer II - Multiple Choice @


os : Multiple Books
' Time Remaining : 01:33:40

i 49 of 60. There is an Apex controller and a Visualforce page in an org that displays records with a custom filter consisting of a combination of picklist =
q values selected by the user. Calculator

i The page takes too long to display results for some of the input combinations, while for other input choices it throws the exception,
\ "Maximum view state size limit exceeded”

What step should the developer take to resolve this issue? Pencil & Paper
' A. Adjust any code that filters by picklist values since they are not indexed. —
B. Split the layout to filter records in one Visualforce page and display the list of records in a second page using the same Apex Uy
controller. L J
iG, Remove instances of the transient keyword from the Apex controller to avoid the view state error. Written
Material
D. o Use a StandardSetController or SOQL LIMIT in the Apex controller to limit the number of records displayed at a time. .

Mark this item for later review. g

Provide question feedback here (optional): |

Please Provide Feedback here...

~
© Sentinel Secure ? x

KRYTERION Version: 18.0.0

= ee Test Aids
Time Remaining : 01:33:32 *

50 of G0. The Salesforce admin at Cloud Kicks created a custom object called Region__c to store all postal zip codes in the United States and the Cloud
Kicks sales region the zip code belongs to. Single Book

Object Name:
Region__c

Fields:
Zip_Code__c (Text)
Region_Name__< (Text)

i Cloud Kicks wants a trigger on the Lead to populate the Region based on the Lead's zip code.

| Which code segment Is the most efficient way to fulfill this request?

A. o Set<String> zips = new Set<String>():


for(Lead 1 : Trigger.new) {
‘ if(1.PostalCcode != Null) {
1 zips.add(1.PostalCode);
\

Materials
List<Region_c> regions = [SELECT Zip Code_c, Region_Name__c FROM Region__c WHERE
Zip Code_c IN :zips];

Map<String, String> zipMap = new Map<String, String>()?


for (Region_c r :regions) {
zipMap.put(r.Zip_Code_c, r.Region_Name__c);

for(Lead 1 : Trigger.new) {
iitiPostaloods
= Milli
KRYTERION
6 Sentinel Secure ? x

‘ersion: 18.0.0
ens Test Aids
Zip_Code__c¢ (Text)
Region_Name__c (Text)

Cloud Kicks wants a trigger on the Lead to populate the Region based on the Lead's zip code.

Which code segment is the most efficient way to fulfill this request?

A.© set<String> zips = new set<String>();


for(Lead 1 : Trigger.new) {
if(1.PostalCcode != Null) {
zips.add(1.Postalcode);

List<Region_c> regions = [SELECT zip Code_c, Region_Name__c FROM Region_c WHERE


Zip_Ccode_c IN :zips];

Map<String, String> zipMap = new Map<String, String>();


for(Region_ cr :regions) {
zipMap.put(r.Zip_Code_c, r.Region_Name_c);

for(Lead 1 : Trigger.new) {
if(1.Postalcode != Null) {
i.Region_c = zipMap.get(1.PostalCode);

Set<String> zips = new Set<String>({);


for(Lead 1 : Trigger.new) {
if(1.Postalcode != Null) {
zips.add(1l.Postalcode);
6 Sentinel Secure ? x

KRYTERION Version: 18.0.0

[Z/KRYTERION”
Test Aids

partner
By cioea TESTING SOLUTIONS

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:33:25

51 0f 60. Which statement is considered a best practice for writing bulk safe Apex triggers?
A. Add timrTr $0000 to every SOQL statement.
B. Instead of DML statements, use the Database methods with allorNone set to false.
& oO Add records to collections and perform DML operations against these collections.

D. Perform all DML operations from within a future method.

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


6 Sentinel Secure ? x

KRYTERION Version:

Test Aids
18.0.0

Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner

Salesforce Certified Platform Developer II - Multiple Choice


Multiple Books
Time Remaining : 01:33:21

52 0f 60. A company has a custom component that allows users to search for records of a certain object type by invoking an Apex Controller that
returns a list of results based on the user's input. When the search is completed, a searchComplete event is fired, with the results put ina
results attribute of the event. The component is designed to be used within other components and may appear on a single page more than
once.

What is the optimal code that should be added to fire the event when the search has completed?

A. Var evt = component.getEvent ("searchComplete");


evt.setParams((results: results));

eve. fire();

B. var evt = SA.get ("e.c.searchComplete") 7


evt.set("v.results", results);
evt.fire():

co Var evt = SA.get("e.c.searchComplete");


@Vt.setParams((results: results});

evt.fire();

D. var evt = component.getEvent (“searchComplete");


evt.set("v.results", results);

evt. fire();
6 Sentinel Secure ? x

KRYTERION Version:

Test Aids
18.0.0

Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner

Salesforce Certified Platform Developer II - Multiple Choice


Multiple Books
Time Remaining : 01:33:17

53 of 60. Consider the following code snippet:

public static List<Account> getAccounts (Date thisDate, Id goldenRT){


List<Account> accountList = [Select Id, Name, Industry FROM Account WHERE CreatedDate = :thisDate OR RecordTypeid =
rgoldenRT];

return accountList;
}

The Apex method is executed in an environment with a large data volume count for Accounts, and the query is performing poorly.

Which technique should the developer implement to ensure the query performs optimally, while preserving the entire result set?

A. Annotate the method with the ¢rucure annotation.


B. Create a formula field to combine the createdDate and RecordTyps value, then filter based on the formula.

ic. Use the Database. queryLocater method to retrieve the accounts.


D. oO Break down the query into two individual queries and join the two result sets.

Mark this item for later review.

Provide question feedback here (optional):


6 Sentinel Secure ? x

KRYTERION Version:

Test Aids
18.0.0

Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner

Salesforce Certified Platform Developer II - Multiple Choice


Multiple Books
Time Remaining : 01:33:16

53 of 60. Consider the following code snippet:

public static List<Account> getAccounts (Date thisDate, Id goldenRT){


List<Account> accountList = [Select Id, Name, Industry FROM Account WHERE CreatedDate = :thisDate OR RecordTypeid =
rgoldenRT];

return accountList;
}

The Apex method is executed in an environment with a large data volume count for Accounts, and the query is performing poorly.

Which technique should the developer implement to ensure the query performs optimally, while preserving the entire result set?

A. Annotate the method with the ¢rucure annotation.


B. Create a formula field to combine the createdDate and RecordTyps value, then filter based on the formula.

ic. Use the Database. queryLocater method to retrieve the accounts.


D. oO Break down the query into two individual queries and join the two result sets.

Mark this item for later review.

Provide question feedback here (optional):


© Sentinel Secure ? x

KRYTERION Version: 18.0.0


~ Test Aids

_
I<"KRY TERION' partner
Be GiosaL TestING SOLUTIONS l
Single Book

Salesforce Certified Platform Developer II - Multiple Choice


|@
Wy
os : Mulipe Books
Time Remaining : 01:33:12 :
; TON |

CS)is
i 54 of 60. A developer is creating a page in App Builder that will be used in the Salesforce mobile app. ~ /
J Calculator
| Which two practices should the developer follow to ensure the page operates with optimal performance?

Choose 2 answers | )
\ A. Limit five visible components on the page.
' B. Limit 25 fields on the record detail page. eee

1 C, @ Limit the number of Tabs and Accordion components. BD is correct Answer |


' D. Analyze the page with Performance Analysis for App Builder. Uy |
|

Written
Mark this item for later review. Materials

Provide question feedback here (optional):

Please Provide Feedback here... g


6 Sentinel Secure ? x

KRYTERION Version: 18.0.0

Test Aids
Time Remaining : 01:33:07

55 of GO. A company has code to update a Request and Request Lines and make a callout to their external ERP system's REST endpoint with the
updated records. Single Book

public void updateAndMakeCallout(Map<Id, Request_c> reqs, Map<Id, Request_Line_c> reqLines) {


Savepoint sp = Database.setSavepoint ();

try {
insert regs.values();

ingert reqlines.values();
HttpResponse response = CalloutUtil.makeRestCallout (reqs.keySet(), reqlbines.keySet()) +
} catch (Exception 9) {

Database.roliback (sp):
System.debug (e);

The CalloutUtil.makeRestCallout fails with a 'You have uncommitted work pending. Please commit or rollback before calling out’ error.

What should be done to address the problem?

A. Move the calloutUtil.makeRestCallour method call below the catch block.


B. Change the calloutUril.makeRestCallour to an @fucure method. .
Materials

CG Remove the Database.setSavepoint and Database. rollback.


B is correct Answer
D. o Change the calloutUtil.makeRestCallout to an @InvocableMethed method.

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


6 Sentinel Secure ? x

KRYTERION Version:

Test Aids
18.0.0

Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner

Salesforce Certified Platform Developer II - Multiple Choice


Multiple Books
Time Remaining : 01:33:04

56 of 60. Universal Containers implements a private sharing model for the convention_Attendee__c¢ custom object. As part of a new quality assurance
effort, the company created an Event_Reviewer__c user lookup field on the object. Management wants the event reviewer to automatically
gain Read/Wnite access to every record they are assigned to.

What is the best approach to ensure the assigned reviewer obtains Read/Write access to the record?

A. Create criteria-based sharing rules on the Convention Attendee custom object to share the records with the Event Reviewers.
B. Oo Create a before insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed
Sharing.
iG, Create an after insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed
Sharing.
D. Create a criteria-based sharing rule on the Convention Attendee custom object to share the records with a group of Event
Reviewers.

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


6 Sentinel Secure ? x

KRYTERION Version: 18.0.0

[Z/KRYTERION”
Test Aids

partner
By cioea TESTING SOLUTIONS

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:33:00

57 of 60. A page throws an ‘Attempt to dereference a null object’ error for a Contact.

What change in the controller will fix the error?

A. Change the getter's signature to be static Contact.


B. Change the setter's signature to return a Contact.
G oO Use a condition in the getter to return a new Contact if it is null.

D. Declare a static final Contact at the top of the controller.

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


6 Sentinel Secure ? x

KRYTERION Version: 18.0.0

[Z/KRYTERION” sorte
Test Aids

By cioea TESTING SOLUTIONS

e
Single Book

Salesforce Certified Platform Developer II - Multiple Choice


| J
Multiple Books
Time Remaining : 01:32:57

58 of 60. As part of a custom interface, a developer team creates various new Lightning web components. Each of the components handles errors
using toast messages. When the development is complete, all the components are added to the same Lightning page. Gun

During acceptance testing, users complain about the long chain of toast messages that display when errors occur loading the components.
®
Which two techniques should the developer implement to improve the user experience?

Choose 2 answers
A. Use a <template> tag to display in-place error messages.
B. Use a Lightning web component to aggregate and display all errors. AD is correct Answer
G& Use the window.alert () method to display the error messages.

D. Use public properties on each component to display the error messages.

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


6 Sentinel Secure ? x

KRYTERION Version: 18.0.0

Test Aids
Time Remaining : 01:32:52

59 of 60. Refer to the component code and requirements below:

<lightning: layout multipleRows="“true*>


<lightning:layoutItem size="12">(!v.account.Name)
</lighting: layoutItem>

<lightning:layoutItem size="12">{!v.account .AccountNumber}


</lighting: layoutItem>

<lightning:layoutItem size="12">{!v.account.Industry) S co ect S €


</lighting: layoutiItem>
</lightning: layout>

Requirements:
1. For mobile devices, the information should display In three rows.
2. For desktops and tablets, the information should display in a single row.

Requirement 2 is not displaying as desired.

Which option has the correct component code to meet the requirements for desktops and and tablets?

A. <lightning: layout muitipleRows="true">


Materials
<lightning:layoutItem size="12" largeDeviceSize="4">(!v.account.Name}
</lighting: layoutItem>

htning:layoutItem size="12" largeDeviceSize="4">(!v.account.AccountNumber}


</lighting: layoutItem>

<lightning:layoutItem size="12" largeDevicesSize="4">({!v.account. Industry}


</lighting: layoutItem>
</lightning: layout>

B Dightoinsslavour mulripiesowe="prue">
KRYTERION
6 Sentinel Secure ? x

‘ersion: 18.0.0
> 7 7 re Test Aids
“lightning: layoutItem size="12" largeDbevicesize="4">(!v.account .Name}
</lighting: layoutItem>

<lightning:layoutItem size="12" largeDevicesSize="4">(!v.account.AccountNumber}


</lighting: layoutItem> Single Book

“lightning: layoutItem size="12" largeDeviceSize="4">(!v.account. Industry)


</lighting: layoutItem>
</lightning: layout>

B. <lightning: layout multipleRows="true">


<lightning: layoutItem size="12" mediumPevicesize="6" largeDevicesSize="4">{lv.account.Name}
</lighting: layoutitem>

<lightning:layoutItem size="12" mediumDeviceSize="€" largeDevicesize="4">(!v.account.AccountNumber}


</lighting:layoutitem>

<lightning:layoutItem size="12" mediumDevicesSize="€" largeDevicesize="4">{!v.account. Industry}


</lighting: layoutItem>
</lightning: Layout>

c.O <lightning: layout multipleRows="true">


<lightning:layoutItem size="12" mediumPevicesize="€">{!v.account Name}
</lighting: layoutItem>

<lightning:layoutItem size="12" mediumPeviceSize="€">(!v,account sAccountNumber}

</lighting: layoutItem>

<lightning:layoutItem size="12" mediumPeviceSize="6">(!v.account -Industry}

</lighting: Llayoutitem>
</lightning: Layout>

D. <lightning: layout multipleRows="true">


<lightning:layoutItem size="12" madiumDeviceSize="4">({!v.account.
KRYTERION
6 Sentinel Secure ? x

‘ersion: 18.0.0

Test Aids
</lighting: layourItem>

<lightning:layoutItem size="12" madiumDevicesSize="6">{!v.account.AccountNumber)


</lighting: layoutitem>

Single Book
<lightning:layoutItem size="12" mediumPeviceSize="6">(!v. account. Industry)
</lighting: layoutiItem>
</lightning: layout>

D. <lightning: layout muitipleRows="true">


<lightning:layoutitem size="12" mediumPevicesize="4">
{!v. account .-Name}
</lighting: layoutiItem>

<lightning:layoutItem size="12" mediumPevicesize="4">({!v. account -AccountNumber}

</lighting: layoutItem>

<lightning:layoutItem size="12" mediumPevicesSize="4">{!v. account. Industry}


</lighting: layoutItem>

</lightning: layout>

oO Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...


6 Sentinel Secure ? x

KRYTERION Version:

Test Aids
18.0.0

Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
Single Book

Salesforce Certified Platform Developer II - Multiple Choice

Time Remaining : 01:32:44

60 of 60. How should a developer assert that a trigger with an asynchronous process has successfully run?

A. Create all test data, use @future in the test class, then perform assertions.
B. oO Create all test data In the test class, Invoke Test.startTest() and Test.stopTest() and then perform assertions,
G Insert records into Salesforce, use seeAlidata=true, then perform assertions.
D. Create all test data in the test class, use system. runAs() to invoke the trigger, then perform assertions.

Mark this item for later review.

Provide question feedback here (optional):

Please Provide Feedback here...

You might also like