ExamGecko
Home Home / Salesforce / Certified Platform Developer II

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

Question list
Search
Search

List of questions

Search

Related questions











What should a developer use to query all Account fields for the Acme account in their sandbox?

A.
SELECT * FROM ACCOUNT WHERE Name = 'Acme' LIMIT 1
A.
SELECT * FROM ACCOUNT WHERE Name = 'Acme' LIMIT 1
Answers
B.
SELECT ALL FROM Account WHERE Name = 'Acme' LIMIT 1
B.
SELECT ALL FROM Account WHERE Name = 'Acme' LIMIT 1
Answers
C.
SELECT FIELDS FROM Account WHERE Name = 'Acme' LIMIT 1
C.
SELECT FIELDS FROM Account WHERE Name = 'Acme' LIMIT 1
Answers
D.
SELECT FIELDS (ALL) FROM Account WHERE Name = 'Acme' LIMIT 1
D.
SELECT FIELDS (ALL) FROM Account WHERE Name = 'Acme' LIMIT 1
Answers
Suggested answer: D

Consider the following code snippet:

How should <c-order> component communicate to the <c-order-order> component that an order has been selected by the user?

A.
Created and fire an application event.
A.
Created and fire an application event.
Answers
B.
Create and fire a standard DOM event.
B.
Create and fire a standard DOM event.
Answers
C.
Create and fire a component event.
C.
Create and fire a component event.
Answers
D.
Create and dispatch a custom event
D.
Create and dispatch a custom event
Answers
Suggested answer: D

A developer is asked to create a Lightning web component that will be invoked via button on a record page. The component must be displayed in a model dialog.

Which three steps should the developer take to achieve this/ Choose 3 answers

A.
Add a tarqetConfig anf set targets to lightning_RecordAction.
A.
Add a tarqetConfig anf set targets to lightning_RecordAction.
Answers
B.
In targetConfigs, add Lightning_Apppage as a target.
B.
In targetConfigs, add Lightning_Apppage as a target.
Answers
C.
Set action Type to screenAction.
C.
Set action Type to screenAction.
Answers
D.
In target, add lightning_RecordAction as a target.
D.
In target, add lightning_RecordAction as a target.
Answers
E.
Set eventType to action.
E.
Set eventType to action.
Answers
Suggested answer: C, D

Consider the following code snippet:

Which governor limit is likely to be exceeded when the trigger runs when a scope of 200 newly inserted accounts?

A.
Total number of DML statements issued
A.
Total number of DML statements issued
Answers
B.
Total number of records processed as a result of DML
B.
Total number of records processed as a result of DML
Answers
C.
Total number of SOQL queries issued
C.
Total number of SOQL queries issued
Answers
D.
Total number of SOQL queries issued
D.
Total number of SOQL queries issued
Answers
Suggested answer: A

A developer is asked to look into an issue where a scheduled Apex is running into DML limits. Upon investigation, the developer finds that the number of records processed by the scheduled Apex has recently increased to more than 10,000.

What should the developer do to eliminate the limit exception error?

A.
Use the @future annotation.
A.
Use the @future annotation.
Answers
B.
Implement the Bathable interface.
B.
Implement the Bathable interface.
Answers
C.
Use platform events.
C.
Use platform events.
Answers
D.
Implement the Queueable interface.
D.
Implement the Queueable interface.
Answers
Suggested answer: B

A developer implemented a custom data table in a Lightning web component with filter functionality. However, users are submitted support tickets about long load times when the filters are changed. The component uses an Apex method that is called to query for records the selected filters.

What should the developer do to improve performance of the component?

A.
Use setStorable( ) in the Apex method to store the response in the client-side cache
A.
Use setStorable( ) in the Apex method to store the response in the client-side cache
Answers
B.
Return all records into a list when the component is created and filter the array in JavaScript
B.
Return all records into a list when the component is created and filter the array in JavaScript
Answers
C.
Use SOSL to Query the records on filter change.
C.
Use SOSL to Query the records on filter change.
Answers
D.
Use a selective SOQL query with a custom index.
D.
Use a selective SOQL query with a custom index.
Answers
Suggested answer: A

In a previous data audit, It was determined that close to 5 million Opportunity records are stored within the Salesforce environment. The organization-wide default for the object are set to Public Read-Only and most opportunities are related to an external case.

The method is called from a Lightning web component. Some end users do not provide a cased value and experience low performance while running the query.

Which two techniques should the developer implement to avoid low performance queries from executing? Choose 2 answers

A.
Implement a LIMIT clause within the SOQL query to restrict the result set.
A.
Implement a LIMIT clause within the SOQL query to restrict the result set.
Answers
B.
Ensure the user-provided input is not null before executing the SOQL query.
B.
Ensure the user-provided input is not null before executing the SOQL query.
Answers
C.
Implement the with sharing keyword on the Apex class.
C.
Implement the with sharing keyword on the Apex class.
Answers
D.
Use SOSL instead of SOQL queries to perform text-based searches.
D.
Use SOSL instead of SOQL queries to perform text-based searches.
Answers
Suggested answer: A, D

A developer wrote a class named AccountHistoryManager that relies on field history tracking. The class has a static method called getAccountHistory that takes in an Account as a parameter and returns a list of associated AccountHistroy object records.

The following test falls:

What should be done to make this test pass?

A.
Use test. Is Running test () in getAccountHostory () to conditionally return fake AccountHistory records.
A.
Use test. Is Running test () in getAccountHostory () to conditionally return fake AccountHistory records.
Answers
B.
Use @istest (SeeAll Data=true) to see historical data from the org and query for AccountHistory records.
B.
Use @istest (SeeAll Data=true) to see historical data from the org and query for AccountHistory records.
Answers
C.
Create AccountHistory records manually in the test setup and write a query to get them.
C.
Create AccountHistory records manually in the test setup and write a query to get them.
Answers
D.
The test method should be deleted since this code cannot be tested.
D.
The test method should be deleted since this code cannot be tested.
Answers
Suggested answer: A

A developer created the following test method:

The developer org has five accounts where the name starts with Test". The developer executes this test in the Developer Console.

After the test code runs, which statement is true?

A.
The test will fail.
A.
The test will fail.
Answers
B.
There will be no accounts where the name starts with "Test".
B.
There will be no accounts where the name starts with "Test".
Answers
C.
There will be five accounts where the name starts with Test"
C.
There will be five accounts where the name starts with Test"
Answers
D.
There will be six accounts where the name starts with Test".
D.
There will be six accounts where the name starts with Test".
Answers
Suggested answer: C

A developer is tasked with creating a Lightning web component that is responsive on various devices. which two components should help accomplish this goal?

Choose 2 answers

A.
lightning-input-location
A.
lightning-input-location
Answers
B.
lightning-navigation
B.
lightning-navigation
Answers
C.
lightning-layout
C.
lightning-layout
Answers
D.
lightning-layout-item
D.
lightning-layout-item
Answers
Suggested answer: C, D
Total 408 questions
Go to page: of 41