Practice Free PDII Exam Online Questions
A developer created and tested a Visualforce page in their developer sandbox, but now receives reports that users are encountering ViewState errors when using it in Production.
What should the developer ensure to correct these errors?
- A . Ensure queries do not exceed governor limits.
- B . Ensure variables are marked as Transient.
- C . Ensure properties are marked as private.
- D . Ensure profiles have access to the Visualforce page.
A developer writes a lightning web component that displays a dropdown list of all custom objects in the org from which a user will select Apex method prepares and returns data to the component.
What should the developer do to determine which objects to include in the response?
- A . Check the isCustom ( ) value on the sObject describe result.
- B . Use the getCustomObject ( ) method from the Schema class.
- C . Import the list of all custom objects from @salesforce/schema.
- D . Check the getObjectType () value for Custom’ or ‘Standard’ on the sObject describe result.
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)
B)
C)
D)
- A . Option A
- B . Option B
- C . Option C
- D . Option D
Account object has a field, Audit_Code__, that is used to specify what type of auditing the Account needs and a Lookup to user, Auditor__ that is the assigned auditor.
When an Account is initially created, the user specifies the Audit_Code__. Each User in the org has a unique text field, that is used to automatically assign the correct user to the Account Auditor__ field.
What should be changed to most optimize the code’s efficiency? Choose 2 answers
- A . Build a Map<String, List<Account>> of audit code to accounts.
- B . Add an initial SOQL query to get all distinct audit codes.
- C . Add a WHERE clause to the SOQL query to filter On audit codes.
- D . Build a Map <Id, List<String>> of Account Id to audit codes.
Which three actions must be completed in a Lightning web component for a JavaScript file in a static resource to be loaded? Choose 3 answer
- A . Import the static resource.
- B . Reference the static resource in a <script> tag.
- C . Import a method from the platformResourceLoader.
- D . Call LoadScript.
- E . Append the static resource to the DOM.
A developer created an Apex class that updates an Account based on input from a Lightning web component that is used to register an Account. The update to the Account should only be made if it has not already been registered.
What should the developer do to ensure that users do not overwrite each other’s updates to the same Account if they make updates at the same time?
- A . Use CastiCase.update(account, false).
- B . Add a try/catch block around the update.
- C . Use upsert instead of update.
- D . Use FOR UPDATE in a SOQL query.
A developer Is writing a Listener for implementing outbound messaging.
Which three considerations must the developer keep in mind in this case? Choose 3 answers
- A . Messages can be delivered out of order.
- B . Messages are retried Independent of their order In the queue.
- C . The session in an outbound message Is scoped for both API requests and UT requests.
- D . The Organization 1D is included only in the first outbound message.
- E . The Listener must be reachable from the public internet.
A developer used custom settings to store some configuration data that changes occasionally. However, tests are now failing in some of the sandboxes that were recently refreshed.
What should be done to eliminate this issue going forward?
- A . Set the setting type on the custom setting to List.
- B . Replace custom settings with custom metadata.
- C . Set the setting type on the custom setting to Hierarchy.
- D . Replace custom settings with static resources.
A developer 15 tasked with creating an application-centric feature on which end-users can access and update information. This feature must be available in lightning Experience while working seamlessly in multiple device form factors, such as desktops, phones, and tablets. Additionally, the feature must support Addressable URL Tabs and interact with the Salesforce Console APIs.
What arm two approaches a developer can take to build the application and support the business requirements? Choose 2 answers
- A . Create the application using Aura Components wrapped in Lightning Web Components.
- B . Create the application using Lightning web Components wrapped in Aura Components.
- C . Create application using Aura Components.
- D . Create the application using Lightning Experience Builder.
What is a benefit of JavaScript remoting over Visualforce Remote Objects?
- A . Supports complex server-side application logic
- B . Does not require any JavaScript code
- C . Does not require any Apex code
- D . Allows for specified re-render targets