ExamGecko
Home Home / Salesforce / Certified Platform Developer II

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

Question list
Search
Search

List of questions

Search

Related questions











Universal Containers requested the addition of a third-party Map widget to an existing Lightning web component.

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.
A.
Import the third-party JavaScript module directly Into the component.
Answers
B.
Use a content distribution network and Include <script> <script> tags In the component.
B.
Use a content distribution network and Include <script> <script> tags In the component.
Answers
C.
Import loadscript from lightning platformResourceLoader.
C.
Import loadscript from lightning platformResourceLoader.
Answers
D.
Upload the third-party JavaScript library as a static resource that Imports Into the component.
D.
Upload the third-party JavaScript library as a static resource that Imports Into the component.
Answers
Suggested answer: C, D

A developer created an Opportunity trigger that updates the account rating when an associated opportunity is considered high value. Current criteria for an opportunity to be considered high value is an amount greater than or equal to SI,000,000. However, this criteria value can change over time.

There is a new requirement to also display high value opportunities In a Lightning web component.

Which two actions should the developer take to prevent the business logic that obtains the high value opportunities from being repeated in more than one place?

Choose 2 answers

A.
Use custom metadata to hold the high value amount.
A.
Use custom metadata to hold the high value amount.
Answers
B.
Call the trigger from the Lightning web component.
B.
Call the trigger from the Lightning web component.
Answers
C.
Leave the business logic code Inside the trigger for efficiency.
C.
Leave the business logic code Inside the trigger for efficiency.
Answers
D.
Create a helper class that fetches the high value opportunities.
D.
Create a helper class that fetches the high value opportunities.
Answers
Suggested answer: A, D

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.

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.
A.
Use the @future annotation on the method that performs the aggregate calculation.
Answers
B.
Implement the schedulable Interface In the class that contains the aggregate calculation method.
B.
Implement the schedulable Interface In the class that contains the aggregate calculation method.
Answers
C.
Use the areadOnly annotation on the method that performs the aggregate calculation.
C.
Use the areadOnly annotation on the method that performs the aggregate calculation.
Answers
D.
Implement the Queuable Interface in the class that contains the aggregate calculation method.
D.
Implement the Queuable Interface in the class that contains the aggregate calculation method.
Answers
Suggested answer: B, D

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.

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.
Apex REST
A.
Apex REST
Answers
B.
Event Monitoring
B.
Event Monitoring
Answers
C.
Invocable Action
C.
Invocable Action
Answers
D.
SObJect Tree
D.
SObJect Tree
Answers
Suggested answer: A

Consider the following code snippet:

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 @Future annotation.
A.
Annotate the method with the @Future annotation.
Answers
B.
Create a formula field to combine the CreatedDate and RecardType value, then filter based on the formula.
B.
Create a formula field to combine the CreatedDate and RecardType value, then filter based on the formula.
Answers
C.
Use the Database.queryLocator method to retrieve the accounts.
C.
Use the Database.queryLocator method to retrieve the accounts.
Answers
D.
Break down the query into two individual queries and Join the two result sets.
D.
Break down the query into two individual queries and Join the two result sets.
Answers
Suggested answer: D

A developer is creating a page in App Builder that will be used in the Salesforce mobile app.

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.
A.
Limit five visible components on the page.
Answers
B.
Limit 25 fields on the record detail page.
B.
Limit 25 fields on the record detail page.
Answers
C.
Limit the number of Tabs and Accordion components.
C.
Limit the number of Tabs and Accordion components.
Answers
D.
Analyze the page with Performance Analysis for App Builder.
D.
Analyze the page with Performance Analysis for App Builder.
Answers
Suggested answer: B, D

Get Cloudy Consulting (GCC) has a multitude of servers that host its customers' websites. GCC wants to provide a servers status page that is always on display in its call center. It should update in real time with any changes made to any servers. To accommodate this on the server side, a developer created a Server Update platform event.

The developer is working on a Lightning web component to display the information.

What should be added to the Lightning web component to allow the developer to interact with the Server Update platform event?

A.
import { subscribe, unsubscribe, onError } from 'lightning/MessageChannel'
A.
import { subscribe, unsubscribe, onError } from 'lightning/MessageChannel'
Answers
B.
import { subscribe, unsubscribe, onError } from 'lightning/empApi';
B.
import { subscribe, unsubscribe, onError } from 'lightning/empApi';
Answers
C.
import { subscribe, unsubscribe, onError } from 'lightning/pubsub'
C.
import { subscribe, unsubscribe, onError } from 'lightning/pubsub'
Answers
D.
import { subscribe, unsubscribe, onError } from 'lightning/ServerUpdate'
D.
import { subscribe, unsubscribe, onError } from 'lightning/ServerUpdate'
Answers
Suggested answer: B

Universal Containers (UC) has enabled the translation workbench and has translated picklist values.

UC has a custom multi-select picklist field, Products__z, on the Account object that allows sales reps to specify which of UC's products an Account already has. A developer is tasked with writing an Apex method that retrieves Account records, Including product_c field.

What should the developer do to ensure the value of Products__c is in the current user's language?

A.
Set the locale on each record in the SOQL result list.
A.
Set the locale on each record in the SOQL result list.
Answers
B.
Use the locale clause in the SOQL query.
B.
Use the locale clause in the SOQL query.
Answers
C.
Use toLabel1 Products_c in the fields list of the SOQL query.
C.
Use toLabel1 Products_c in the fields list of the SOQL query.
Answers
D.
Call the translate ( ) method on each record in the SOQL result list.
D.
Call the translate ( ) method on each record in the SOQL result list.
Answers
Suggested answer: C

A developer has created a Lightning web component that uses the getRecord wire adapter.

Which three things should the developer do in a Jest test to validate the wire method is working as expected?

Choose 3 answers

A.
Import mrf from iwe.
A.
Import mrf from iwe.
Answers
B.
Create a JSON file with mode data.
B.
Create a JSON file with mode data.
Answers
C.
Use the API.
C.
Use the API.
Answers
D.
Use an assert statement to validate results.
D.
Use an assert statement to validate results.
Answers
E.
Import getRecord from lightning/uiRecordAp1
E.
Import getRecord from lightning/uiRecordAp1
Answers
Suggested answer: A, D, E

A software company uses a custom object Defect_c, to track defects in their software, Defect__c has organisation-wide defaults set to private Each Dafect__c has a related list of Reviewer_c records, each with a lookup field to User that is used to indicate that the User will review the Defect_c.

What should be used to give the User on the Reviewer_c record read only access to the Defect_c record on the Reviewer_c record?

A.
View All on Defect_c
A.
View All on Defect_c
Answers
B.
Apex managed sharing
B.
Apex managed sharing
Answers
C.
lightning web component
C.
lightning web component
Answers
D.
Criteria based sharing
D.
Criteria based sharing
Answers
Suggested answer: A
Total 408 questions
Go to page: of 41