PD2 Set 1
PD2 Set 1
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?
i 2of 60. An Apex class does not achieve expected code coverage. The testSerup method explicitly calls a method in the Apex class.
: 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.
'
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
Written
Provide question feedback here (optional): Materials
KRYTERION Version:
Test Aids
18.0.0
Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
e
Single Book
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
KRYTERION Version:
Test Aids
18.0.0
Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
Single Book
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?
KRYTERION Version: —
ly” KRYTERION’
By cioea TESTING SOLUTIONS
partner
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
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.
KRYTERION Version:
Test Aids
18.0.0
Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
Single Book
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?
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.
Test Aids
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
Written
Provide question feedback here (optional): Materials
‘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__-¢.
AND Transaction_Date__c=2019-05-31T00:062
[ZKRYTERION”
Test Aids
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?
this.dispatchEvent (cEvent):
© Sentinel Secure ? x
I<” KRYTERION’
By cioea TESTING SOLUTIONS
partner ®
Single Book
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?
KRYTERION Version:
Test Aids
18.0.0
Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
e
Single Book
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/
Single Book
Salesforce Certified Platform Developer II - Multiple Choice
| 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? :
Test Aids
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
‘ersion: 18.0.0
Test Aids
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?
Test Aids
Time Remaining : 01:36:12
Qwire (getOrders)
wiredOrders({ error, data }) {
if (data) {
this.orders = data;
this.errer = undefined:
} else if (error) {
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';
‘ersion: 18.0.0
Test Aids
15 of 60. Consider the following code snippet:
@wire (getOrders)
wiredOrders({ error, data }) [
if (data) (
this.orders = data;
this.error = undefined;
} else if (error) [
this.error = error;
this.orders = undefined:
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';
I<” KRYTERION’
By cioea TESTING SOLUTIONS
partner ®
Single Book
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.
ly|”WeeKRYTERION”
TESTING SOLUTIONS
partner ®Q |
Single Book
i 17 of 60. Salesforce users consistently receive a "Maximum trigger depth exceeded” error when saving an Account.
I<” KRYTERION’
By cioea TESTING SOLUTIONS
partner ®
Single Book
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.
‘
G Apex REST Web Service
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
\ 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
‘ersion: 18.0.0
Test Aids
public class searchFeature|
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?
KRYTERION Version: —
ly” KRYTERION’
By cioea TESTING SOLUTIONS
partner
‘ D. o Allows for classes to be generated from WSDL and imported into Salesforce
'
'
Mark this item for later review.
KRYTERION Version: —
ly” KRYTERION’
By cioea TESTING SOLUTIONS
partner
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
|| WeeKRYTERION”
TESTING SOLUTIONS
partner Q |
Single Book
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.
|| WeeKRYTERION”
TESTING SOLUTIONS
partner Q |
Single Book
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
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
D. Write a cron job In Salesforce to poll the ERP system for order updates. : Written :
Materials
~
6 Sentinel Secure ? x
KRYTERION Version:
Test Aids
18.0.0
Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
e
Single Book
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
D. Event Logs
Test Aids
Time Remaining : 01:35:08
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
Test Aids
Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
e
Single Book
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?
‘ersion: 18.0.0
Test Aids
export default class MyOpportunities extends LightningElement {
@api userId;
Qwire(getOpportunities, (oppOwner: ‘Suserid"})
opportunities;
Single Book
OpportunityController.cls
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?
KRYTERION Version:
Test Aids
18.0.0
Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
e
Single Book
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
D is correct Answer
Mark this item for later review.
KRYTERION Version:
Test Aids
18.0.0
Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
Single Book
31 o0f 60. A developer wishes to improve runtime performance of Apex calls by caching results on the client.
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.
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);
@isTest
public static void testSearchTestAccounts () (
Account a = new Account (nam|e="test");
insert a;
Recount [] accounts = TestAccountFinder.searchTestaAccounts
();
System.assert(accounts.size() == 1 );
KRYTERION Version:
Test Aids
18.0.0
Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
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.
| KRYTERION’
By cioea TESTING SOLUTIONS
partner
Salesforce Certified Platform Developer II - Multiple Choice
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.
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?
| KRYTERION’
By cioea TESTING SOLUTIONS
partner
Salesforce Certified Platform Developer II - Multiple Choice
i 36 of 60. What is the best practice to initialize 4 Visualforce page in a test class?
q D. Use Test.setCurrentPage.MyTestPage;
t
1
'
Mark this item for later review.
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.
| KRYTERION’
By cioea TESTING SOLUTIONS
partner
Single Book
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.
KRYTERION Version:
Test Aids
18.0.0
Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
e
Single Book
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.
D. Upload the third-party JavaScript library as a static resource that imports into the component.
KRYTERION (Version: —
lx” KRYTERION’
Be cicea. TESTING SOLUTIONS
partner
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')
} 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')
KRYTERION =
Version:
Test Aids
18.0.0
_
partner |
yl AK TESTING SOLUTIONS [
Single Book
:
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.
| KRYTERION”
By cioea TESTING SOLUTIONS
partner ®
Single Book
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.
{ersion: 18.0.0
. = oe cS Test Aids
Time Remaining : 01:34:01
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
\ ' 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
KRYTERION Version:
Test Aids
18.0.0
Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
e
Single Book
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
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.
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
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.
~
© Sentinel Secure ? x
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
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.
~
KRYTERION.
6 Sentinel Secure ? x
Version: 18.0.0
[Z/KRYTERION”
Test Aids
partner
By cioea TESTING SOLUTIONS
e
Single Book
®
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
[Z/KRYTERION” sorte
Test Aids
e
Single Book
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
D. oO SObject Tree
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
~
© Sentinel Secure ? x
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. .
~
© Sentinel Secure ? x
= 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?
Materials
List<Region_c> regions = [SELECT Zip Code_c, Region_Name__c FROM Region__c WHERE
Zip Code_c IN :zips];
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?
for(Lead 1 : Trigger.new) {
if(1.Postalcode != Null) {
i.Region_c = zipMap.get(1.PostalCode);
[Z/KRYTERION”
Test Aids
partner
By cioea TESTING SOLUTIONS
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.
KRYTERION Version:
Test Aids
18.0.0
Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
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?
eve. fire();
evt.fire();
evt. fire();
6 Sentinel Secure ? x
KRYTERION Version:
Test Aids
18.0.0
Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
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?
KRYTERION Version:
Test Aids
18.0.0
Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
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?
_
I<"KRY TERION' partner
Be GiosaL TestING SOLUTIONS l
Single Book
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
Written
Mark this item for later review. Materials
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
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.
KRYTERION Version:
Test Aids
18.0.0
Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
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.
[Z/KRYTERION”
Test Aids
partner
By cioea TESTING SOLUTIONS
57 of 60. A page throws an ‘Attempt to dereference a null object’ error for a Contact.
[Z/KRYTERION” sorte
Test Aids
e
Single Book
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.
Test Aids
Time Remaining : 01:32:52
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.
Which option has the correct component code to meet the requirements for desktops and and tablets?
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>
</lighting: layoutItem>
</lighting: Llayoutitem>
</lightning: Layout>
‘ersion: 18.0.0
Test Aids
</lighting: layourItem>
Single Book
<lightning:layoutItem size="12" mediumPeviceSize="6">(!v. account. Industry)
</lighting: layoutiItem>
</lightning: layout>
</lighting: layoutItem>
</lightning: layout>
KRYTERION Version:
Test Aids
18.0.0
Ix” KRYTERION”
By cioea TESTING SOLUTIONS
partner
Single Book
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.