Practice Free PDII Exam Online Questions
An org has a requirement that an Account must always have one and only one Contact listed as Primary. So selecting one Contact will de-select any others. The client wants a checkbox on the Contact called ‘Is Primary’ to control this feature. The client also wants to ensure that the last name of every Contact is stored entirely in uppercase characters.
What is the optimal way to implement these requirements?
- A . write a single trigger on Contact for both after update and before update and callout to helper classes to handle each set of logic.
- B . Write an after update trigger on Contact for the Is Primary logic and a separate before update trigger on Contact for the last name logic.
- C . write an after update trigger on Account for the Is Primary logic and a before update trigger on Contact for the last name logic.
- D . write a Validation Rule on the Contact for the Is Primary logic and a before update trigger on Contact for the last name logic.
A developer created a Lightning web component that allows users to input a text value that is used to search for Accounts by calling an Apex method. The Apex method returns a list of AccountWrappers and is called imperatively from a JavaScript event handler.
Which two changes should the developer make so the Apex method functions correctly? Choose 2 answers
- A . Add @AuraEnafcle3 to line 09.
- B . Add @AuraEnabled to line 03.
- C . Add @AuraEnabled to lines 11 and 12.
- D . Add @AuraEnat:ei to line 01.
A developer wrote an Apex method that makes an HTTP callout to an external system to get specialized data when a button is clicked from a custom Lightning web component on the Account record page.
Recently, users have complained that it takes longer than desired for the data to appear on the page after clicking the button.
What should the developer use to troubleshoot this issue?
- A . Lightning Inspector
- B . Developer Console
- C . Salesforce CU
- D . Event Logs
A developer notices the execution of all the test methods in a class takes a long time to run, due to the initial setup of ail the test data that is needed to perform the tests.
What should the developer do to speed up test execution?
- A . Define a method that creates test data and annotate with @testSetup.
- B . Define a method that creates test data and annotate with @createData
- C . Reduce the amount of test methods in the class.
- D . Ensure proper usage of test data factory In all test methods.