[Oct-2023] Get 100% Real PDII Free Online Practice Test
BEST Verified Salesforce PDII Exam Questions (2023)
Achieving the PDII certification demonstrates to employers and colleagues that a developer has a deep understanding of the Salesforce platform and can design and develop complex solutions to meet business requirements. It can also help developers advance their careers and increase their earning potential. The PDII certification is a valuable asset for any developer looking to work with Salesforce, and it is recognized globally as a mark of expertise in the field.
NEW QUESTION # 77
If the "PageReference.setRedirect" Apex function is set to False, what type of request is made?
- A. Postback request
- B. If PageReference points to the same controller and subset of extensions, postback request, otherwise get request
- C. Get request
Answer: B
NEW QUESTION # 78
A developer encounters an error that states that the Apex heap size is exceeded. Which technique may reduce heap size?
- A. Use SOQL for loops instead of standard SOQL queries.
- B. Move the variable definition inside the scope of the function.
- C. Add the transient keyword to the variable definition.
- D. Use static variables instead of instance variables.
Answer: A
NEW QUESTION # 79
Exhibit.
A developer created a JavaScript function as a part of a Lightning web component (LWC) that surfaces information... about leads by imperatively calling getFetchLeadList when certain criteria are met.
What are these changes the developer should implement in the Apex class above to ensure the LWC can display data efficiently while preserving security?
Choose 3 answers
- A. Annotate the Apex method with gAuraEnabled-
- B. Annotate the Apex method with 8AuraEnabled (Cacheable-true).
- C. Implement the without sharing keyword in the class declaration.
- D. Use the WITH SECURITY_ENFORCED clause within the SOQL query.
- E. Implement the with sharing keyword in the class declaration.
Answer: B,D,E
NEW QUESTION # 80
A Developer wishes to improve runtime performance of Apex calls by caching results on the client. What is the best way to implement this?
- A. Decorate the server-side method with @AuraEnabled(storable=true).
- B. Set a cookie in the browser for use upon return to the page.
- C. Call the setStorable() method on the action in the JavaScript client-side code.
- D. Decorate the server-side method with @AuraEnabled(cacheable=true).
Answer: A
NEW QUESTION # 81
A developer wrote the following method to find all the test accounts in the org:
What should be used to fix this falling test?
- A. @isTest (See AllData=true) to access org data for the test
- B. @testSetup method to set up expected data
- C. Test. loaddata to set up expected data
- D. Test. fixedSearchResults ( ) method to set up expected data
Answer: D
NEW QUESTION # 82
An Apex test method is testing a Visualforce page's controller, which queries for all Opportunities in Salesforce with StageName = 'Closed'. There are 10,000 existing records that match the criteria. What is the best practice for accessing data in the test method?
- A. Query existing data in the test method and use seeAllData=true.
- B. Create test data in the test method and use seeAllData=false.
- C. Create test data in the test method and use seeAllData=true.
- D. Use @testVisible on the relevant property of the controller
Answer: B
NEW QUESTION # 83
Refer to the Aura component below:
Component markup:
Controller JS:
A developer receives complaints that the component loads slowly.
Which change can the developer implement to make the component perform faster?
- A. Change the type of contactInfo to "Map'.
- B. Add a change event handler for showcontactInfo.
- C. Change the default for showcontactlnfo to "false'.
- D. Move the contents of <c: contactlnfo> into the component.
Answer: C
NEW QUESTION # 84
A developer Is tasked with ensuring that email addresses entered into the system for Contacts and for a Custom Object called Survey_Response__c do not belong to a list of blacklisted domains. The list of blacklisted domains will be stored In a custom object for ease of maintenance by users. Note that the Survey_Response__c object is populated via a custom visualforce page.
What is the optimal way to implement this?
- A. Implement the logic in an Apex trigger on Contact and also implement the logic within the Custom visualforce page controller.
- B. Implement the logic in a helper class that is called by an Apex trigger on Contact and from the Custom Visualforce page controller.
- C. Implement the logic in a Validation Rule on the Contact and a validation Rule on the Survey_Response__c object.
- D. Implement the logic in the Custom Visualforce page controller and call that method from an Apex trigger on Contact.
Answer: B
NEW QUESTION # 85
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 the screen need to be rendered as a PDF without using a third-party application?
- D. Does the screen need to be accessible from the lightning Experience UI?
Answer: C
NEW QUESTION # 86
A company's support process dictates that any time a case is closed with a status of 'Could not fix,' an Engineering Review custom object record should be created and populated with information from the case, the contact and any of the products associated with the case.
What Is the correct way to automate this us ng an Apex trigger?
- A. A before upsert trigger or Case that creates the Engineering Review record and inserts it
- B. A before update trigger or Case that creates the Engineering Review record and Inserts It
- C. An after upsert trigger on Case that creates the
Engineering Review record and inserts it - D. An alter update trigger on Case that creates the
Engineering Review record and inserts it
Answer: D
NEW QUESTION # 87
An Apex trigger creates a Contract record every time an Opportunity record is marked as Closed end Won. This trigger is working great, except (due to a recent acquisition) historical Opportunity records need to be loaded into the Salesforce instance.
When a test batch of records are loaded, the Apex trigger creates Contract records. A developer is tasked with preventing Contract records from being created when mass loading the Opportunities, but the daily users still need to have the Contract records created.
What is the most extendable way to update the Apex trigger to accomplish this?
- A. Add a Validation Rule to the Contract to prevent Contract creation by the user who loads the data.
- B. Use a Hierarchy Custom Setting to skip executing the logic inside the trigger for the user who loads the data.
- C. Use a List Custom Setting to disable the trigger for the user who loads the data.
- D. Add the Profile ID of the user who loads the data to the trigger so the trigger will not fire for this user.
Answer: B
NEW QUESTION # 88
A developer creates a Lightning web component to allow a Contact to be quickly entered- However, error messages are not displayed.
Which component should the developer add to the form to display error messages?
- A. lightning-error
- B. aura:messages
- C. lightning-messages
- D. apex:messages
Answer: C
NEW QUESTION # 89
In a previous data audit, It was determined that close to 5 million Opportunity records are stored within the Salesforce environment. The organization-wide default for the object are set to Public Read-Only and most opportunities are related to an external case.
The method is called from a Lightning web component. Some end users do not provide a cased value and experience low performance while running the query.
Which two techniques should the developer implement to avoid low performance queries from executing? Choose 2 answers
- A. Implement a LIMIT clause within the SOQL query to restrict the result set.
- B. Ensure the user-provided input is not null before executing the SOQL query.
- C. Implement the with sharing keyword on the Apex class.
- D. Use SOSL instead of SOQL queries to perform text-based searches.
Answer: A,D
NEW QUESTION # 90
A developer is creating a Lightning web component that contains a child component. The property stage is being passed from the parent to the child. The public property is changing, but the setOppList function is not being invoked.
What should the developer change to allow this?
- A. Move the logic from connectedCallback() nto renderedCallback().
- B. Move the logic to a getter/setter pair.
- C. Move the logic from connectedCalIback() to constructor().
- D. Create a custom event from the parent component to set the property.
Answer: B
NEW QUESTION # 91
What is a consideration when testing batch Apex? (Choose two.)
- A. Test methods must execute the batch with a scope size of less than 200 records
- B. Test methods must call the batch execute() method once
- C. Test methods must run the batch between TeststartTestQ and Test.stopTestQ
- D. Test methods must use the @isTest (SeeAIIData=true) annotation
Answer: A,C
NEW QUESTION # 92
As part of their quoting and ordering process, a company needs to send PDFs to their document storage system's REST endpoint that supports OAuth 2.0. Each Salesforce user must be individually authenticated with the document storage system to send the PDF.
What is the optimal way for a developer to implement the authentication to the REST endpoint?
- A. Hierarchy Custom Setting with an OAuth token custom field
- B. Named Credential with an OAuth Authentication Provider
- C. Hierarchy Custom Setting with a password custom field
- D. Named Credential with Password Authentication
Answer: B
NEW QUESTION # 93
A company has code to update a Request and Request Lines and make a callout to their external ERP system's REST endpoint with the updated records.

What should be done to address the problem?
- A. Change the CalloutUtil.makeRestCallout to an @future method.
- B. Remove the Database.setSavepoint and Database.rollback.
- C. Change the CalloutUtil.makeRastCallout to an @InvocableMethed method.
- D. Move the CalloutUtil.makeRestCallout method call below the catch block.
Answer: A
NEW QUESTION # 94
......
PDII Exam Dumps, Practice Test Questions BUNDLE PACK: https://www.realvce.com/PDII_free-dumps.html
The Best Practice Test Preparation for the PDII Certification Exam: https://drive.google.com/open?id=1YnPLDK9sCKgl6UZioqxPzwZ7F_GlMebd