ExamGecko
Ask Question

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

List of questions

Question 211

Report
Export
Collapse

Users report that a button on a custom Lightning Web Component is not working. However, there are no other details provided. What should the developer use to ensure error messages are properly displayed?

Add the <apex:messages/> tag to the component.
Add the <apex:messages/> tag to the component.
Use the Database method with allOrNone set to false.
Use the Database method with allOrNone set to false.
Add a Try/Catch block surrounding the DML statement.
Add a Try/Catch block surrounding the DML statement.
Add JavaScript and HTML to display an error message.
Add JavaScript and HTML to display an error message.
Suggested answer: D
asked 23/09/2024
Victor Avila
29 questions

Question 212

Report
Export
Collapse

A developer receives the exception 'SOQL query not selective enough' when performing a query on an object with a large amount of dat a. Which step should be taken to resolve the issue?

Use an ID in the WHERE clause of the SOQL query.
Use an ID in the WHERE clause of the SOQL query.
Perform the SOQL query as part of a FOR loop.
Perform the SOQL query as part of a FOR loop.
Perform the SOQL query via a call to the REST API.
Perform the SOQL query via a call to the REST API.
Move the SOQL query to within an asynchronous process.
Move the SOQL query to within an asynchronous process.
Suggested answer: A
asked 23/09/2024
mohamed elfateh
34 questions

Question 213

Report
Export
Collapse

How should a developer verify that a specific Account record is being tested in a test class for a visualforce controller?

Insert the Account in the test class, instantiate the page reference in the test class, then use System.currentPageReference().getParameters{}.put() to set the Account ID.
Insert the Account in the test class, instantiate the page reference in the test class, then use System.currentPageReference().getParameters{}.put() to set the Account ID.
Instantiate the page reference in the test class, insert the Account in the test class, then use seeAHData-true to view the Account.
Instantiate the page reference in the test class, insert the Account in the test class, then use seeAHData-true to view the Account.
Insert the Account into Salesforce, instantiate the page reference in the test class, then use System.setParentRecordId().get() to set the Account ID.
Insert the Account into Salesforce, instantiate the page reference in the test class, then use System.setParentRecordId().get() to set the Account ID.
Instantiate the page reference in the test class, insert the Account in the test class, then use System.setParentRecordld().get() to set the Account ID.
Instantiate the page reference in the test class, insert the Account in the test class, then use System.setParentRecordld().get() to set the Account ID.
Suggested answer: A
asked 23/09/2024
Vladimir Litvinenko
29 questions

Question 214

Report
Export
Collapse

A managed package uses a list of country ISO codes and country names as references data in many different places.. managed package Apex code.

What is the optimal way to store and retrieve the list?

Store the information in Custom Metadata and query it with SOQL.
Store the information in Custom Metadata and query it with SOQL.
Store the information in Custom Metadata and access it with the getAll() method.
Store the information in Custom Metadata and access it with the getAll() method.
Store the information in a List Custom Setting and query it with SOQL.
Store the information in a List Custom Setting and query it with SOQL.
Store the information in a list Custom Setting and access it with the getAll() method
Store the information in a list Custom Setting and access it with the getAll() method
Suggested answer: C
asked 23/09/2024
Kevin Collins
30 questions

Question 215

Report
Export
Collapse

A Lightning Component has a section that displays some information about an Account and it works well on the desktop, but users have to scroll horizontally to see the Description field output on their mobile devices and tablets.

Salesforce Certified Platform Developer II image Question 215 67862 09232024003105000000

Which option has the changes to make the component responsive for mobile and tablet devices?

Suggested answer: D
asked 23/09/2024
TONG CHEE LOONG
35 questions

Question 216

Report
Export
Collapse

A developer sees test failures in the sandbox but not in production. No code or metadata changes have been actively made to either environment since the sandbox was created.

Which consideration should be checked to resolve the issue?

Ensure the Apex Classes are on the same API version.
Ensure the Apex Classes are on the same API version.
Ensure Process Builder processes are inactive.
Ensure Process Builder processes are inactive.
Ensure the sandbox is on the same release as production.
Ensure the sandbox is on the same release as production.
Ensure Workflow Rules are inactive.
Ensure Workflow Rules are inactive.
Suggested answer: C
asked 23/09/2024
Harry Meijer
44 questions

Question 217

Report
Export
Collapse

Consider the following queries. For these queries, assume that there are more than 200,000 Account records. These records include soft-deleted records; that is, deleted records that are still in the Recycle Bin. Note that there are two fields that are marked as External Id on the Account. These fields are Customer_Number__c and ERP_Key__c.

Which two queries are optimized for large data volumes? Choose 2 answers

SELECT Id FROM Account WHERE Id IN : aListVariable
SELECT Id FROM Account WHERE Id IN : aListVariable
SELECT Id FROM Account WHERE Name != ' ' AND IsDeleted = false
SELECT Id FROM Account WHERE Name != ' ' AND IsDeleted = false
SELECT Id FROM Account WHERE Name != NULL
SELECT Id FROM Account WHERE Name != NULL
SELECT Id FROM Account WHERE Name != ' ' AND Customer Number c = 'ValueA'
SELECT Id FROM Account WHERE Name != ' ' AND Customer Number c = 'ValueA'
Suggested answer: A, D
asked 23/09/2024
Andrey Zhukovskiy
36 questions

Question 218

Report
Export
Collapse

A developer wants to use an Aura Component with a Custom Action.

What should be considered in order to do this?

A default value must be provided for each component attribute marked as required.
A default value must be provided for each component attribute marked as required.
The component must implement the force:lightningQuickActionButton interface.
The component must implement the force:lightningQuickActionButton interface.
The component's JavaScript controller must handle a method on initialization.
The component's JavaScript controller must handle a method on initialization.
The class "slds-modal__container" must be added to the top-level element of the component.
The class "slds-modal__container" must be added to the top-level element of the component.
Suggested answer: B
asked 23/09/2024
Bright Ngobeni
40 questions

Question 219

Report
Export
Collapse

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 in a 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?

Suggested answer: B
asked 23/09/2024
Rio Ordonez
40 questions

Question 220

Report
Export
Collapse

Universal Containers needs to integrate with a Heroku service that resizes product images submitted by users.

What are two alternatives to implement the integration and protect against malicious calls to Heroku app's endpoint? Choose 2 answers

Create a trigger that uses an @future Apex HTTP callout passing JSON serialized data and someform of pre-shared secret key. so that the Heroku app can authenticate requests and store the resizedimages in Salesforce.
Create a trigger that uses an @future Apex HTTP callout passing JSON serialized data and someform of pre-shared secret key. so that the Heroku app can authenticate requests and store the resizedimages in Salesforce.
Create a trigger that uses an @future Apex HTTP callout passing JSON serialized data; thereforethe Heroku app can automatically reply back to the callout with the resized images in Salesforce.
Create a trigger that uses an @future Apex HTTP callout passing JSON serialized data; thereforethe Heroku app can automatically reply back to the callout with the resized images in Salesforce.
Create a Workflow Rule with an Outbound Message and select Send Session ID so that the Heroku app can use it to send the resized images back to Salesforce.
Create a Workflow Rule with an Outbound Message and select Send Session ID so that the Heroku app can use it to send the resized images back to Salesforce.
Create a Workflow Rule with an Outbound Message allowing the Heroku app to automatically store the resized images in Salesforce.
Create a Workflow Rule with an Outbound Message allowing the Heroku app to automatically store the resized images in Salesforce.
Suggested answer: C, D
asked 23/09/2024
Emergya Ingenieria SLU Emergya Ingenieria SLU
25 questions
Total 438 questions
Go to page: of 44
Search

Related questions