ExamGecko
Home Home / Salesforce / Certified Platform Developer II

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

Question list
Search
Search

List of questions

Search

Related questions











A company has the Lightning Component above that allows users to dick a button to save their changes and redirects them to a different page. Currently, when the user hits the Save button the records are getting saved, but they are not redirected.

Which three techniques can a developer use to debug the JavaScript? Choose 3 answers

A.
Use Developer Console to view checkpoints.
A.
Use Developer Console to view checkpoints.
Answers
B.
Use Developer Console to view the debug log.
B.
Use Developer Console to view the debug log.
Answers
C.
Use consde.log() messages in the JavaScript.
C.
Use consde.log() messages in the JavaScript.
Answers
D.
Enable Debug Mode for Lightning components for the user.
D.
Enable Debug Mode for Lightning components for the user.
Answers
E.
Use the browser's dev tools to debug the JavaScript.
E.
Use the browser's dev tools to debug the JavaScript.
Answers
Suggested answer: C, D, E

An org has a custom object, Registeration_c that has a lookup relationship to the Opportunity object.

What should a developer use to create a stand-alone Vlsualforce page that displays the Registration__c records related to an Opportunity.

A.
A standard controller with a controller extension
A.
A standard controller with a controller extension
Answers
B.
A controler extension
B.
A controler extension
Answers
C.
A custom controler
C.
A custom controler
Answers
D.
A standard controller
D.
A standard controller
Answers
Suggested answer: D

What is the best practice to initialize a Visualforce page in a test class?

A.
Use Test.setCurrentpage,MyTestPage;
A.
Use Test.setCurrentpage,MyTestPage;
Answers
B.
Use Test.currentpage, getParameter, put (MyTestPage);
B.
Use Test.currentpage, getParameter, put (MyTestPage);
Answers
C.
Use Test, setCurrentPage(Page.MyTestPage);
C.
Use Test, setCurrentPage(Page.MyTestPage);
Answers
D.
Use controller,currentPage, setPage (MyTestPage
D.
Use controller,currentPage, setPage (MyTestPage
Answers
Suggested answer: C

Universal Containers implements a private sharing model for the Convention_Attendence_c custom object. As part of a new quality assurance effort, the company created an Event___Reviewer__c user lookup field on the object.

Management wants the event reviewer to automatically gain Read/write access to every record they are assigned to.

What is the best approach to ensure the assigned reviewer obtains Read/Write access to the record?

A.
Create an After Insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.
A.
Create an After Insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.
Answers
B.
Create a Before Insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.
B.
Create a Before Insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.
Answers
C.
Create a criteria-based sharing rule on the Convention Attendee custom object to share the records the a group of Event Reviewers.
C.
Create a criteria-based sharing rule on the Convention Attendee custom object to share the records the a group of Event Reviewers.
Answers
D.
Create criteria-based sharing rules on the Convention Attendee custom object to share the records with the Event Reviewers.
D.
Create criteria-based sharing rules on the Convention Attendee custom object to share the records with the Event Reviewers.
Answers
Suggested answer: B

This sales team needs a custom Visualforce page to enter sales orders. When a product is selected on the Visualforce page, a web service is invoked to determine if the product is in stock, and the result is displayed on the page.

How can a developer write this page to display the result of the web service and ensure governor limits for concurrent usage are not exceeded?

A.
Use Continuation that is invoked when a Submit button is clicked.
A.
Use Continuation that is invoked when a Submit button is clicked.
Answers
B.
Use visualforce Remoting to handle the web service callout.
B.
Use visualforce Remoting to handle the web service callout.
Answers
C.
Use the Salesforce Metadata API in the web service callout.
C.
Use the Salesforce Metadata API in the web service callout.
Answers
D.
Use an Apex trigger with callout=true annotation.
D.
Use an Apex trigger with callout=true annotation.
Answers
Suggested answer: A

A Visualforce page needs to make a callout to get biding information and tax information from two different REST endpoints. The information needs to be Displayed to the user at the same time and the return value of the billing information contains the input for the tax information callout. Each endpoint might take up to two minutes to process.

How should a developer implement the callouts?

A.
A Continuation for both the billing callout and the tax callout
A.
A Continuation for both the billing callout and the tax callout
Answers
B.
An HTTP REST call out for both the billing callout and the tax callout
B.
An HTTP REST call out for both the billing callout and the tax callout
Answers
C.
An HTTP REST callout for the billing callout and a Continuation for the tax callout
C.
An HTTP REST callout for the billing callout and a Continuation for the tax callout
Answers
D.
A Continuation for the billing callout and an HTTP REST callout for the tax callout
D.
A Continuation for the billing callout and an HTTP REST callout for the tax callout
Answers
Suggested answer: A

In an organization that has multi-currency enabled, a developer is tasked with building a Lighting Component that displays the top ten Opportunities most recently access by the logged in user. The developer must ensure the Amount and LastModifiedDate field values are displayed according to the user's locale.

What is the most effective approach to ensure values displayed respect the user's locale settings?

A.
Use the FOR VIEW clause in the SOQL Query.
A.
Use the FOR VIEW clause in the SOQL Query.
Answers
B.
Use REGEX expressions to format the values retrieved via SOQL.
B.
Use REGEX expressions to format the values retrieved via SOQL.
Answers
C.
Use the FORMAT() function in the SOQL query.
C.
Use the FORMAT() function in the SOQL query.
Answers
D.
Use a wrapper class to format the values retrieved via SOQL.
D.
Use a wrapper class to format the values retrieved via SOQL.
Answers
Suggested answer: C

A developer created three Rollup Summary fields: Total_timesheets_c, Total_Approved_timesheet_c and Total_project_Timesheet_c in the custom object, project _c Now, the developer is tasked with created a new field to show the ratio between and approved

A.
No test methods will be executed during deployment.
A.
No test methods will be executed during deployment.
Answers
B.
A test class that validates the formula field is needed for deployment.
B.
A test class that validates the formula field is needed for deployment.
Answers
C.
Using a formula field reduces maintenance overhead.
C.
Using a formula field reduces maintenance overhead.
Answers
D.
A formula field will calculate the value retroactively for existing records.
D.
A formula field will calculate the value retroactively for existing records.
Answers
Suggested answer: C, D

Refer to re code segment above.

When following best practices for writing Apex taggers, which two lots are wrong or cause for concern? Choose 2 answers

A.
Line 6
A.
Line 6
Answers
B.
Line 11
B.
Line 11
Answers
C.
Line 16
C.
Line 16
Answers
D.
Line 20
D.
Line 20
Answers
Suggested answer: A, D

A developer Is asked to develop a new AppExthange application. A feature of the program creates Survey records when a Case reaches a certain stage and Is of a certain Record Type. This feature needs to be configurable, as different

Salesforce instances require Surveys at different times.

Additionally, the out-of-the-box AppExchange app needs to come with a set of best practice settings that apply to most customers.

What should the developer use to store and package the custom configuration settings for the app?

A.
Custom Settings
A.
Custom Settings
Answers
B.
Custom Metadata
B.
Custom Metadata
Answers
C.
Custom Objects
C.
Custom Objects
Answers
D.
Process Builder
D.
Process Builder
Answers
Suggested answer: B
Total 408 questions
Go to page: of 41