ExamGecko
Home Home / Salesforce / Certified Platform Developer II

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

Question list
Search
Search

List of questions

Search

Related questions











Just prior to a new deployment, the Salesforce Administrator who configured a new order fulfillment process in a developer sandbox suddenly left the company. The users had fully tested all of the changes in the sandbox and signed off on them.

Unfortunately, although a Change Set was started, it was not complete. A developer is brought in to help finish the deployment.

What should the developer do to identify the configuration changes that need to be moved into production?

A.
Leverage the Setup Audit Trail to review the changes made by the departed Administrator and identify which changes should be added to the Change Set.
A.
Leverage the Setup Audit Trail to review the changes made by the departed Administrator and identify which changes should be added to the Change Set.
Answers
B.
Use the Metadata API and a supported development IDE to push all of the configuration from the sandbox into production to ensure no changes are lost.
B.
Use the Metadata API and a supported development IDE to push all of the configuration from the sandbox into production to ensure no changes are lost.
Answers
C.
Set up Continuous Integration and a Git repository to automatically merge all changes from the sandbox metadata with the production metadata.
C.
Set up Continuous Integration and a Git repository to automatically merge all changes from the sandbox metadata with the production metadata.
Answers
D.
In Salesforce setup, look at the last modified date for every object to determine which should be added to the Change Set.
D.
In Salesforce setup, look at the last modified date for every object to determine which should be added to the Change Set.
Answers
Suggested answer: A

What should be added to the setup, in the location indicated, for the unit test above to create the controller extension for the test?

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

A company has many different unit test methods that create Account records as part of their data setup. A new required field was added to the Account and now all of the unit tests fail. What is the optimal way for a developer to fix the issue?

A.
Add the required field to the data setup for all of the unit tests.
A.
Add the required field to the data setup for all of the unit tests.
Answers
B.
Add a before insert trigger on Account to set the value of the required field.
B.
Add a before insert trigger on Account to set the value of the required field.
Answers
C.
Create a TestDataFactory class that serves as the single place to create Accounts for unit tests and set the required field there.
C.
Create a TestDataFactory class that serves as the single place to create Accounts for unit tests and set the required field there.
Answers
D.
Change the required field to be a validation rule that excludes the System Administrator profile.
D.
Change the required field to be a validation rule that excludes the System Administrator profile.
Answers
Suggested answer: C

Explanation:

Topic 3, Exam Pool C

Universal Containers (UC) wants to develop a customer community to help their customers log issues with their containers. The community needs to function for their German- and Spanish-speaking customers also. UC heard that it's easy to create an international community using Salesforce, and hired a developer to build out the site.

What should the developer use to ensure the site is multilingual?

A.
Use Custom Settings to ensure custom messages are translated properly.
A.
Use Custom Settings to ensure custom messages are translated properly.
Answers
B.
Use Custom Labels to ensure custom messages are translated property.
B.
Use Custom Labels to ensure custom messages are translated property.
Answers
C.
Use Custom Metadata to translate custom picklist values.
C.
Use Custom Metadata to translate custom picklist values.
Answers
D.
Use Custom Objects to translate custom picklist values.
D.
Use Custom Objects to translate custom picklist values.
Answers
Suggested answer: B

How can a developer efficiently incorporate multiple JavaScript libraries, such as JQuery and MomenUS, in a Lightning Component?

A.
Implement the libraries in separate helper files.
A.
Implement the libraries in separate helper files.
Answers
B.
Use CONs with script attributes
B.
Use CONs with script attributes
Answers
C.
Use JavaScript remoting and script tags.
C.
Use JavaScript remoting and script tags.
Answers
D.
Join multiple assets from a static resource.
D.
Join multiple assets from a static resource.
Answers
Suggested answer: D

For compliance purposes, a company is required to track long-term product usage in their org. The information that they need to log will be collected from more than one object and, over time, they predict they will have hundreds of millions of records.

What should a developer use to implement this?

A.
Field Audit Trail
A.
Field Audit Trail
Answers
B.
Setup Audit Trail
B.
Setup Audit Trail
Answers
C.
Field History Tracking
C.
Field History Tracking
Answers
D.
Big objects
D.
Big objects
Answers
Suggested answer: D

A developer has a test class that creates test data before making a mock call-out, but now receives a you have uncommitted work pending. Please commit or callout before calling out error.

What step should be taken to resolve the error?

A.
Ensure both the insertion and mock callout occur after the Test.stopTest().
A.
Ensure both the insertion and mock callout occur after the Test.stopTest().
Answers
B.
Ensure the records are inserted before the Test.startTest() statement and the mock callout occurs within a method annotated with @testSetup.
B.
Ensure the records are inserted before the Test.startTest() statement and the mock callout occurs within a method annotated with @testSetup.
Answers
C.
Ensure both the insertion and mock callout occur after the Test.startTest().
C.
Ensure both the insertion and mock callout occur after the Test.startTest().
Answers
D.
Ensure the records are inserted before the Test.startTest() statement and the mock callout after the Test.startTest().
D.
Ensure the records are inserted before the Test.startTest() statement and the mock callout after the Test.startTest().
Answers
Suggested answer: D

The use of the transient keyword In Visualforce Page Controllers helps with which common performance issued?

A.
Reduces View State
A.
Reduces View State
Answers
B.
Improves Query Performance
B.
Improves Query Performance
Answers
C.
Improves Page Transfers
C.
Improves Page Transfers
Answers
D.
Reduces Load Times
D.
Reduces Load Times
Answers
Suggested answer: A

The test method above tests an Apex trigger that the developer knows will make a lot of queries when a lot of Account are simultaneously updated to be customer.

The test method fails at the Line 20 because of too many SOQL queries

What is the correct way to fix this?

The test method above tests an Apex trigger that the developer knows will make a lot of queries when a lot of Accounts are simultaneously updated to be customers.

The test method fails at the Line 20 because of too many SOQL queries.

What is the correct way to fix this?

A.
Add TesLstartTest() before and Test.stop Test() after both Line 7 of the code and Line 20 of the code.
A.
Add TesLstartTest() before and Test.stop Test() after both Line 7 of the code and Line 20 of the code.
Answers
B.
Change the DataFactory class to create fewer Accounts so that the number of queries in the trigger is reduced.
B.
Change the DataFactory class to create fewer Accounts so that the number of queries in the trigger is reduced.
Answers
C.
Add TeststartTest() before Line 18 of the code and add Test.stopTest() after line 18 of the code.
C.
Add TeststartTest() before Line 18 of the code and add Test.stopTest() after line 18 of the code.
Answers
D.
Replace most of the Apex Trigger with Process Builder processes to reduce the number of queries in the trigger.
D.
Replace most of the Apex Trigger with Process Builder processes to reduce the number of queries in the trigger.
Answers
Suggested answer: C

A developer is writing a Visualforce page that queries accounts in the system and presents a data table with the results. The users want to be able to filter the results based on up to five fields.

However, the users want to pick the five fields to use as filter fields when they run the page.

Which Apex code feature is required to facilitate this solution'

A.
Streaming API
A.
Streaming API
Answers
B.
Dynamic SOQL
B.
Dynamic SOQL
Answers
C.
Report API
C.
Report API
Answers
D.
Dynamic variable binding
D.
Dynamic variable binding
Answers
Suggested answer: D
Total 408 questions
Go to page: of 41