function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Madhusudan Singh 19Madhusudan Singh 19 

Doubts related to PD2 Exam

Hi All,

I have doubts about the below questions. can you help me in and correct me if my analysis is wrong

1. A developer is writing a Visualforce page that queries accounts in the system and presents a data with the results. The users wnat to be able to filter the results based on up to five fields. However, the users want to pick the five fields when they run the page. WHich feature of the Apex code is required to facilitate this solution?
A. REST API
B. SOSL Queries
C. Dynamic Schema binding
D. describeSObjects

My Answer: D
Reason: We can use describeSObjects methods to get field lists of an object

2. A developer built a component to be used at the front desk for guests to self-register upon arrival at a kiosk. The developer is now asked to create a component for the Utility Tray to alert users whenever a guest has arrived at front desk. What should be used?
A. DML Operation
B. Component Event
C. Application Event
D. Changelog

My Answer: C
Reason: Application event can be handled out of parent child context

3. A developer created a new trigger that insers a Tast when a new Lead is created. After deploying to product, an outside integration is periodically reporting errors. Which change should be the developer make to ensure the integration is not affected with minimal impact to business logic?
A. use a Try/Catch block after insert statement.
B. Remove the Apex Class from the Integration User's Profile
C. Deactivate the trigger before the Integration runs
D. Use the Database method with allOrNone set to False

My Answer: D
Reason: We can minimize failure by using Database method with allOrNone set to False

4. Universal Containers has a visualforce page that displays a table of every Container__c being rented by given Account. Recently this page is failing because some of the customers rent over 100000 containers. What should a developer change about the visualforce page to help with the page load errors
A. Implement pagination with an OffsetController
B. Implement pagination with a StandardSetController
C. Use lazy loading and transient List variables
D. Use Javascript remoting with SOQL OffsetController

My Answer: B
Reason: We can implement pagination with a StandardSetController

5. A developer is trying to decide between creating a visualforce component or a lightning component for a custom screen. Which functionality consideration impacts the final decision?
A. Will the screen make use of a JavaScript framework?
B. Will the screen be accessed via a mobile app?
C. Does screen need to be accessbile from the Lightning Experience UI
D. Does the screen need to be rendered as a PDF

My Answer: D
Reason: rendering screen to pdf is not supported in Lightning component, and all new components we can create in lightning and cal lit VF page using lightning out Application hence my vote for D

Regards
Madhusudan Singh
AbhishekAbhishek (Salesforce Developers) 
Hi Madhu,

This forum's main intention is to help developers or people who are having issues with salesforce.

But you can't post this type of question here.

Regards,
Salesforce Support.