Salesforce PDI Sample Questions

Question # 31

How should a developer write unit tests for a private method in an Apex class?

A. Use the SeeAllData annotation. 
B. Add a test method in the Apex class. 
C. Mark the Apex class as global. 
D. Use the @TestVisible annotation. 


Question # 32

For which three items can a trace flag be configured? Choose 3 answers

A. Apex Class 
B. Flow 
C. User 
D. Visualforce 
E. Apex Trigger


Question # 33

What are two ways a developer can get the status of an enqueued job for a class that implements the queueable interface? Choose 2 answers

A. View the Apex Status page 
B. View the Apex Jobs page 
C. Query the AsyncApexJob object 
D. View the Apex Flex Queue 


Question # 34

How does the Lightning Component framework help developers implement solutions faster?

A. By providing device-awareness for mobile and desktops 
B. By providing an Agile process with default steps 
C. By providing change history and version control 
D. By providing code review standards and processes


Question # 35

A developer creates a batch Apex job to update a large number of records, and receives reports of the job timing out and not completing. What is the first step towards troubleshooting the issue?

A. Check the asynchronous job monitoring page to view the job status and logs.
 B. Check the debug logs for the batch job.
 C. Disable the batch job and recreate it with a smaller number of records. 
D. Decrease the batch size to reduce the load on the system. 


Question # 36

A developer has a Visualforce page and custom controller to save Account records. Thedeveloper wants to display any validation rule violations to the user. How can the developer make sure that validation rule violations are displayed?

A. Add custom controller attributes to display the message.
 B. Use a try/catch with a custom exception class.
 C. Include on the Visualforce page. 
D. Perform the DML using the database.unsert() method, 


Question # 37

Universal Containers wants to automatically assign new cases to the appropriate support representative based on the case origin. They have created a custom field on the Case object to store the support representative name. What is the best solution to assign the case to the appropriate support representative?

A. Use a trigger on the Case object. 
 B. Use a formula field on the Case object. 
C. Use a validation rule on the Case object. 
D. Use an Assignment Flow element.


Question # 38

When using Salesforce DX, what does a developer need to enable to create and manage scratch orgs?

A. Sandbox 
B. Environment Hub 
C. Production 
D. Dev Hub


Question # 39

A custom object Trainer__c has a lookup field to another custom object Gym__c.Which SOQL query will get the record for the Viridian City Gym and all it's trainers?

A. SELECT ID FROM Trainer_c WHERE Gym_r.Name = 'Viridian City Gym' 
B. SELECT Id, (SELECT Id FROM Trainer_c FROM Gym_c WHERE Name = ‘Viridian City Gym" 
C. SELECT Id, (SELECT Id FROM Trainers _r) FROM Gym_c WHERE Name = ‘Viridian City Gym' 
D. SELECT Id, (SELECT Id FROM Trainers _c) FROM Gym_c WHERE Name = 'Viridian City Gym' 


Question # 40

A developer created a child Lightning web component nested inside a parent Lightning web component. The parent component needs to pass a string value to the child component. In which two ways can this be accomplished? Choose 2 answers

A. The parent component can invoke a public method in the child component.
 B. The parent component can use a public property to pass the data to the child component, 
C. The parent can use the Apex controller class to send data to the child component.
 D. The parent component can use a custom event to pass the data to the child component. 


‹ First23456

Download All Questions PDF Check Customers Feedbacks