ExamGecko
Home Home / Salesforce / Certified Platform Developer II

Salesforce Certified Platform Developer II Practice Test - Questions Answers, Page 34

Question list
Search
Search

List of questions

Search

Related questions











Universal Containers uses a custom Lightning page to provide a mechanism to perform a step-bystep wizard search for Accounts. One of the steps in the wizard is to allow the user to input text into a text field, ERP_Number__c, that is then used in a query to find matching Accounts.

A developer receives the exception 'SOQL query not selective enough.

Which step should be taken to resolve the issue?

A.
Move the SOQL query to within an asyncronous process.
A.
Move the SOQL query to within an asyncronous process.
Answers
B.
Mark the lRP_Number__c field as an external ID.
B.
Mark the lRP_Number__c field as an external ID.
Answers
C.
Perform the SOQL query as part of a for loop.
C.
Perform the SOQL query as part of a for loop.
Answers
D.
Mark the ERP_Number__c field as required.
D.
Mark the ERP_Number__c field as required.
Answers
Suggested answer: B

When calling a RESTful web service, the developer must implement two-way SSL authentication to enhance security. The Salesforce admin has generated a self-sign certificate within Salesforce with a unique name of "ERPSecCertificate". Consider the following code snippet:

Which method must the developer implement in order to sign the HTTP request with the certificate?

A.
req.setHeader('certificate', 'ERPSecCertificate');
A.
req.setHeader('certificate', 'ERPSecCertificate');
Answers
B.
req.setSecure('ERPSecCertificare)';
B.
req.setSecure('ERPSecCertificare)';
Answers
C.
req.setClientCertificateName('ERPSecCertificate');
C.
req.setClientCertificateName('ERPSecCertificate');
Answers
D.
req.setSecureCertificate( 'ERPSecCertificate');
D.
req.setSecureCertificate( 'ERPSecCertificate');
Answers
Suggested answer: C

A developer created a JavaScript library that simplifies the development of repetitive tasks and features and uploaded the library as a static resource called jsutils in Salesforce. Another developer is coding a new Lightning web component (LWC) and wants to leverage the library.

Which statement properly loads the static resource within the LWC?

A.
import {jsUtilities} from '@salesforce/reaourceUrljsUtila';
A.
import {jsUtilities} from '@salesforce/reaourceUrljsUtila';
Answers
B.
import jUtilities from '@salesforce/reaourceUrljsUtila';
B.
import jUtilities from '@salesforce/reaourceUrljsUtila';
Answers
C.
<lightning-require scripts=N { ! SReaource. j sUtils}"/>
C.
<lightning-require scripts=N { ! SReaource. j sUtils}"/>
Answers
D.
const jsUtility = SA.get ('SReaource.jsUtils');
D.
const jsUtility = SA.get ('SReaource.jsUtils');
Answers
Suggested answer: B

Ursa Major Solar has a custom object, serviceJcb__c, with an optional Lookup field to Account called Partr,er_service_Provid«r__c.

The TocaUobs__c field on Account tracks the total number of serviceJcb__o records to which a partner service provider Account is related.

What should be done to ensure that the TotalJobs_c field is kept up to date?

A.
Build a Process Builder with an invocable action.
A.
Build a Process Builder with an invocable action.
Answers
B.
Create an Apex trigger on serviceJob__c
B.
Create an Apex trigger on serviceJob__c
Answers
C.
Implement a workflow cross-object field update.
C.
Implement a workflow cross-object field update.
Answers
D.
Change TotalJobi__a to a roll-up summary field.
D.
Change TotalJobi__a to a roll-up summary field.
Answers
Suggested answer: B

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.

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

A.
A.
Answers
B.
B.
Answers
C.
C.
Answers
D.
D.
Answers
Suggested answer: A

Refer to the code below:

A developer is building this Aura component to display information about top Opportunities in the org.

Which three code changes must be made for the component to work?

Choose 3 answers

A.
Add the static keyword to the Apex method.
A.
Add the static keyword to the Apex method.
Answers
B.
Set the controller in the component markup.
B.
Set the controller in the component markup.
Answers
C.
Add the RemoteAction annotation to the Apex method.
C.
Add the RemoteAction annotation to the Apex method.
Answers
D.
Add the AuraEnabled annotation to the Apex method.
D.
Add the AuraEnabled annotation to the Apex method.
Answers
E.
Get the controller action with cmp.get("oppController.getTopOpps").
E.
Get the controller action with cmp.get("oppController.getTopOpps").
Answers
Suggested answer: A, B, D

A developer is building a Lightning web component that retrieves data from Salesforce and assigns it to the record property.

What must be done in the component to get the data from Salesforce?

A.
A.
Answers
B.
B.
Answers
C.
C.
Answers
D.
D.
Answers
Suggested answer: B

Which three approaches should a developer Implement to obtain the best performance for data retrieval when building a Lightning web component?

Choose 3 answers

A.
Use lazy load for occasionally accessed data.
A.
Use lazy load for occasionally accessed data.
Answers
B.
Use layoutTypes : ['Full'] to display a set of fields.
B.
Use layoutTypes : ['Full'] to display a set of fields.
Answers
C.
Use the Lightning Data Service.
C.
Use the Lightning Data Service.
Answers
D.
Use getRecordUi to obtain metadata.
D.
Use getRecordUi to obtain metadata.
Answers
E.
Use (cacheable-true) whenever possible.
E.
Use (cacheable-true) whenever possible.
Answers
Suggested answer: A, C, E

A developer is creating a Lightning web component that can be added to a Lightning App Page and displayed when the page Is rendered in desktop and mobile phone format. To ensure a great mobile experience, the developer chooses to use the SLDS grid utility.

Which two Lighting web components should the developer implement to ensure the application Is mobile-ready? Choose 2 answers

A.
<lightning-layou></lightning-layout>
A.
<lightning-layou></lightning-layout>
Answers
B.
<lightning-tree-grid></lightning-tree-grid>
B.
<lightning-tree-grid></lightning-tree-grid>
Answers
C.
<lightning-layout-item></lightning-layout-item>
C.
<lightning-layout-item></lightning-layout-item>
Answers
D.
<lightning-tree></lightning-tree>
D.
<lightning-tree></lightning-tree>
Answers
Suggested answer: A, C

Universal Containers wants to use a Customer Community with Customer Community Plus licenses to allow their customers access to track how many containers they have rented and when they are due back. Universal Containers uses a Private sharing model for External users.

Many of their customers are multi-national corporations with complex Account hierarchies. Each account on the hierarchy represents a department within the same business.

One of the requirements is to allow certain community users within the same Account hierarchy to see several departments' containers, based on a custom junction object that relates the Contact to the various Account records that represent the departments.

Which solution solves these requirements?

A.
Lightning web component on the Community Home Page that uses Lightning Data Services.
A.
Lightning web component on the Community Home Page that uses Lightning Data Services.
Answers
B.
A custom list view on the junction object with filters that will show the proper records based on owner
B.
A custom list view on the junction object with filters that will show the proper records based on owner
Answers
C.
An Apex trigger that creates Apex managed sharing records based on the junction object's relationships
C.
An Apex trigger that creates Apex managed sharing records based on the junction object's relationships
Answers
D.
A Visualforce page that uses a custom controller that specifies wither sharing to expose the records
D.
A Visualforce page that uses a custom controller that specifies wither sharing to expose the records
Answers
Suggested answer: C
Total 408 questions
Go to page: of 41