ExamGecko
Ask Question

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

List of questions

Question 321

Report
Export
Collapse

Users complain that a page Is very slow to respond. Upon investigation, the query below Is found to perform slowly.

SELECT id, Name FROM Contact WHERE CustomField_c null;

Which two actions can a developer take to improve performance?

Choose 2 answers

Add a UMir dause to the query to reduce the number of records returned.
Add a UMir dause to the query to reduce the number of records returned.
Contact Salesforce customer support to create a custom index to include null values
Contact Salesforce customer support to create a custom index to include null values
Make the CustomFleld__c field an External ID.
Make the CustomFleld__c field an External ID.
Make the field CustomReW__c required because Salesforce field Indexes do not Include nulls.
Make the field CustomReW__c required because Salesforce field Indexes do not Include nulls.
Suggested answer: A, D
asked 23/09/2024
Salvatore Buscio
28 questions

Question 322

Report
Export
Collapse

A developer has a Batch Apex process, Batch_Account_Sales, that updates the sales amount for 10,000 Accounts on a nightly basis. The Batch Apex works as designed In the sandbox. However, the developer cannot get code coverage on the Batch Apex class.

The test class is below:

Salesforce Certified Platform Developer II image Question 322 67969 09232024003105000000

What is causing the code coverage problem?

The batch process will not recognize new accounts created in the same session
The batch process will not recognize new accounts created in the same session
The account creation already sets the sates amount to 0.
The account creation already sets the sates amount to 0.
The executeBatch must fail within test. startTest ( ) and – test. stopTest().
The executeBatch must fail within test. startTest ( ) and – test. stopTest().
The batch needs more than one account record created.
The batch needs more than one account record created.
Suggested answer: C
asked 23/09/2024
Gishi Anurag
30 questions

Question 323

Report
Export
Collapse

A developer is developing a reusable Aura component that will reside on an sObject Lightning page with the following HTML snippet:

Caura: component implements-"forcethaaRecordid, flexipage:availableForAllPageTypes">

<div>Hello!</div>

</aura:component> How can the component's controller get the context of the Lightning page that the sobject is an without requiring additional best coverage?

Use the getSObjectType () method in an Apex class
Use the getSObjectType () method in an Apex class
Create a design attribute and configure via App Builder
Create a design attribute and configure via App Builder
Set the object type as a component attribute.
Set the object type as a component attribute.
Add force:hasSobjectName to the implements attribute
Add force:hasSobjectName to the implements attribute
Suggested answer: D
asked 23/09/2024
Ana Santos
40 questions

Question 324

Report
Export
Collapse

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 values selected by the user.

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?

Split the layout to filter records in one Visualforce page and display the list of records in a second page using the same Apex Controller.
Split the layout to filter records in one Visualforce page and display the list of records in a second page using the same Apex Controller.
Adjust any code that filters by picklist values since they are not indexed.
Adjust any code that filters by picklist values since they are not indexed.
Use a StandardSetController or SOQL LIMIT in the Apex controller to limit the number of records displayed at a time.
Use a StandardSetController or SOQL LIMIT in the Apex controller to limit the number of records displayed at a time.
Remove instances of the transient keyword from the Apex controller to avoid the view state error.
Remove instances of the transient keyword from the Apex controller to avoid the view state error.
Suggested answer: C
asked 23/09/2024
niels valk
41 questions

Question 325

Report
Export
Collapse

The Account edit button must be overridden in an org where a subset of users still use Salesforce Classic. The org already has a Lightning Component that will do the work necessary for the override, and the client wants to be able to reuse it,

How should a developer implement this?

Override the edit button for both Lightning and Classic with a Lightning Component.
Override the edit button for both Lightning and Classic with a Lightning Component.
Override the edit button for Lightning with a Lightning Page; and for Classic, override the edit button with a Visualforce pag That contains the Lightning Component.
Override the edit button for Lightning with a Lightning Page; and for Classic, override the edit button with a Visualforce pag That contains the Lightning Component.
Override the edit button for Lightning with a Lightning Component; and for Classic, override the edit button with a Visualforce page that contains the Lightning Component.
Override the edit button for Lightning with a Lightning Component; and for Classic, override the edit button with a Visualforce page that contains the Lightning Component.
the edit button for both Lightning and Classic with a new Visualforce page.
the edit button for both Lightning and Classic with a new Visualforce page.
Suggested answer: C
asked 23/09/2024
Vojtech Danek
38 questions

Question 326

Report
Export
Collapse

Universal Containers needs to integrate with their own, existing, internal custom web application.

The web application accepts JSON payloads, resizes product images, and sends the resized images back to Salesforce.

What should the developer use to implement this integration?

A workflow rule with an outbound message that contains a session ID
A workflow rule with an outbound message that contains a session ID
An Apex trigger that calls an @future method that allows callouts
An Apex trigger that calls an @future method that allows callouts
A platform event that makes a callout to the web application
A platform event that makes a callout to the web application
A flow that calls an @future method that allows callouts
A flow that calls an @future method that allows callouts
Suggested answer: C
asked 23/09/2024
Francisli Lilles
42 questions

Question 327

Report
Export
Collapse

As part of a custom development, a developer creates a Lightning component to show how a particular opportunity progresses over time. The component must display the date stamp when any of the following fields change:

• Amount, Probability, Stage, or Close Date

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

Execute a SOQL query for Amount, Probability, Stage, and Close Date on the OpportunityHistory object.
Execute a SOQL query for Amount, Probability, Stage, and Close Date on the OpportunityHistory object.
Create custom a custom date field on Opportunity for each field to track the previous date and execute a SOQL query for date fields.
Create custom a custom date field on Opportunity for each field to track the previous date and execute a SOQL query for date fields.
Subscribe to the Opportunity Change Data Capture event in the Lightning component.
Subscribe to the Opportunity Change Data Capture event in the Lightning component.
Subscribe to the OpportunityHistory Change Data Capture event in the Lightning component.
Subscribe to the OpportunityHistory Change Data Capture event in the Lightning component.
Suggested answer: B
asked 23/09/2024
ANTONIO M SILVA
41 questions

Question 328

Report
Export
Collapse

Universal Containers has an Apex trigger on Account that creates an Account Plan record when an Account is marked as a Customer. Recently a workflow rule was added so that whenever an Account is marked as a Customer, a 'Customer

Since' date field is updated with today's date.

Since the addition of the workflow rule, two Account Plan records are created whenever the Account is marked as a Customer.

What might cause this to happen?

Become a Premium Member for full access
  Unlock Premium Member

Question 329

Report
Export
Collapse

A developer is building a Lightning web component that displays quantity, unit price, and the total for an order line item. The total is calculated dynamically as the quantity multiplied by the unit price.

Salesforce Certified Platform Developer II image Question 329 67976 09232024003105000000

What must be added to display the total?

Become a Premium Member for full access
  Unlock Premium Member

Question 330

Report
Export
Collapse

Which two scenarios require an Apex method to be called imperatively from a Lightning web component?

Choose 2 answers

Become a Premium Member for full access
  Unlock Premium Member
Total 438 questions
Go to page: of 44
Search

Related questions