Share Latest Oct-2024 PDII DUMP with 198 Questions and Answers
PDF Dumps 2024 Exam Questions with Practice Test
Salesforce PDII Certification Exam requires candidates to have a deep understanding of Salesforce development concepts and best practices. Candidates must be proficient in Apex, Visualforce, and Lightning components, as well as have experience with Salesforce integrations and security mechanisms. Candidates who pass the PDII Certification Exam will have demonstrated their ability to design and develop complex applications that meet the specific needs of Salesforce customers.
NEW QUESTION # 63
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 the Custom Visualforce page controller and call that method from an Apex trigger on Contact.
- 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 an Apex trigger on Contact and also implement the logic within the Custom visualforce page controller.
Answer: B
NEW QUESTION # 64
There is an Apex controller and a Visualforce page in an org that displays records with a custom filter consisting of a combination of picklist values selected by the user.
The page takes too long to display results for some of the input combinations, while for other input choices it throws the exception, "Maximum view state size limit exceeded".
What step should the developer take to resolve this issue?
- A. Use a StandardSetController or SOQL LIMIT in the Apex controller to limit the number of records displayed at a time.
- B. Adjust any code that filters by picklist values since they are not indexed,
- C. Split the layout to filter records in one Visualforce page and display the list of records in a second page using the same Apex controller.
- D. Remove instances of the transient keyword from the Apex controller to avoid the view state error.
Answer: A
Explanation:
A StandardSetController or a SOQL LIMIT clause can be used to limit the number of records displayed at a time in a Visualforce page, and improve the performance and user experience of the page. A StandardSetController is a class that allows the developer to create list controllers, which can display a set of records using pagination, filtering, sorting, and other features. A SOQL LIMIT clause is a keyword that can be used to specify the maximum number of records to return from a query. By using either of these methods, the developer can reduce the amount of data that is transferred and processed by the page, and avoid the view state error, which occurs when the size of the view state exceeds the limit of 135 KB. Reference: [StandardSetController Class], [SOQL LIMIT Clause], [View State]
NEW QUESTION # 65
A custom Visualforce controller calls the ApexPages.addMessage() method, but no messages are rendering on the page. Which component should be added to the Visualforce page to display the message?
A)
B)
C)
D)
- A. Option A
- B. Option B
- C. Option C
- D. Option D
Answer: C
NEW QUESTION # 66
Universal Containers has an Apex trigger on Account that creates an Account Plan record when an Account is marked as a Customer.
Recently a record-triggered flow was added so that whenever an Account is marked as a Customer, a "Customer Since' date field is updated with today's date. Since the addition of the flow, two Account Plan records are created whenever the Account is marked as a Customer.
What might cause this to happen?
- A. The Apex trigger does not use a static variable to ensure it only fires once.
- B. The flow is configured to evaluate when a record is created and every time it is edited.
- C. The flow is configured to use an "Update Records' element.
- D. The Apex trigger is not bulk safe and calls insert inside of a for loop.
Answer: B
NEW QUESTION # 67
A company manages information about their product offerings in custom objects named Catalog and Catalog Item. Catalog Item has a master-detail field to Catalog, and each Catalog may have as many as 100,000 Catalog Items.
Both custom objects have a CurrencylsoCode text field that contains the currency code they should use. If a Catalog's CurrencylsoCode changes, all of its Catalog Items' CurrencylsoCodes should be changed as well.
What should a developer use to update the CurrencylsoCodes on the Catalog Items when the Catalog's CurrencylsoCode changes?
- A. An after insert trigger on Catalog Item that updates the Catalog Items if the Catalog's CurrencylsoCode is different
- B. A Database.Schedulable and Database.Batchacle class that queries the Catalog Item object and updates the Catalog Items if the Catalog CurrencylSoCode is different
- C. A Database. schedulable and Dazabase.Bazchacle class that queries the Catalog object and updates the Catalog Items if the Catalog CurrencylSoCode is different
- D. An after insert trigger on Catalog that updates the Catalog Items if the Catalogs CurrencylsoCode is different
Answer: B
NEW QUESTION # 68
A developer is writing a Jest test for a Lightning web component that conditionally displays child components based on a user's checkbox selections.
What should the developer do to properly test that the correct components display and hide for each scenario?
- A. Create a new describe block for each test.
- B. Reset the DOM after each test with the after Each() method.
- C. Create a new jsdom instance for each test.
- D. Add a teardown block to reset the DOM after each test.
Answer: B
NEW QUESTION # 69
Just prior to a new deployment, the Salesforce Administrator who configured a new order fulfillment process in a developer sandbox suddenly left the company. The users had fully tested all of the changes in the sandbox and signed off on them.
Unfortunately, although a Change Set was started, it was not complete. A developer is brought in to help finish the deployment.
What should the developer do to identify the configuration changes that need to be moved into production?
- A. Use the Metadata API and a supported development IDE to push all of the configuration from the sandbox into production to ensure no changes are lost.
- B. In Salesforce setup, look at the last modified date for every object to determine which should be added to the Change Set.
- C. Set up Continuous Integration and a Git repository to automatically merge all changes from the sandbox metadata with the production metadata.
- D. Leverage the Setup Audit Trail to review the changes made by the departed Administrator and identify which changes should be added to the Change Set.
Answer: D
NEW QUESTION # 70
Which tag should a developer use to display different text while an <apex:commandButton> is executing versus not executing?
- A. <ApexactionSupper>
- B. <ApexactionStatus>
- C. <apexactionPoller>
- D. <ApexpageMessages>
Answer: C
NEW QUESTION # 71
Universal Containers (UC) has an CRP system that stores customer information.
When an Account is created in Salesforce, the FRP system's REST endpoint for creating new customers must automatically be called with the Account information, If the call to the ERP system fails, the Account should still be created. Accounts in UC org are only created, one at a time, by users in the customer on-boarding department.
What should a developer to make the call to the CRP system's REST endpoint7
- A. REST call from JavaScript
- B. Headless Quick Action
- C. call a Queueable from a Trigger
- D. apex Continuation
Answer: C
Explanation:
According to 1, REST API provides you with programmatic access to your data in Salesforce. You can use REST API to make HTTP requests to Salesforce endpoints and perform operations on your data. However, you also need to authenticate your requests using OAuth endpoints 2.
According to 3, you can use Queueable Apex to schedule batch send the data from Salesforce to another system using REST API. Queueable Apex allows you to run asynchronous jobs that can be chained and monitored. You can call a Queueable class from a trigger to enqueue the job after an Account is created.
Therefore, using a Queueable from a Trigger seems to be the best way to make the call to the ERP system's REST endpoint.
NEW QUESTION # 72
Recently a Salesforce org's integration failed because it exceeded the number of allowed API calls in a 24-hour period. The integration handles a near real-time, complex insertion of data into Salesforce.
The flow of data is as follows:
* The integration looks up Contact records with a given email address and, if found, the integration adds a Task to the first matching Contact it finds.
* If a match is not found, the integration looks up Lead records with a given email address and, if found, the integration adds a Task to the first matching Lead it finds.
* If a match is not found, the integration will create a Lead and a Task for that newly created Lead.
What is one way in which the integration can stay near real-time, but not exceed the number of allowed API calls in a 24-hour period?
- A. Use the REST API as well as the SOAP API to effectively double the API calls allowed in a 24-hour period.
- B. Create an Inbound Message that, using Flow, can do all of the logic the integration code was doing.
- C. Write a custom Apex web service that, given an email address, does all of the logic the integration code was doing.
- D. Create several Apex InboundEmailHandlers to accept calls from the third-party system, thus bypassing the APT limits.
Answer: D
NEW QUESTION # 73
Invokable methods accept sObjects as parameters
- A. False
- B. True
Answer: A
NEW QUESTION # 74
As part of their quoting and ordering process, a company needs to send POFs 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. Named Credential with an OAuth Authentication Provider
- B. Named Credential with Password Authentication
- C. Hierarchy Custom Setting with 2 password custom field
- D. Hierarchy Custom Setting with an OAuth token custom field
Answer: A
Explanation:
Named Credentials with OAuth handle secure API calls. Individual authentication for each user with OAuth
2.0 is managed through Named Credentials.References: Named Credentials as Callout Endpoints
NEW QUESTION # 75
A developer is working with existing functionality that tracks how many times a stage has changed for an Opportunity. When the Opportunity's stage is changed, a workflow rule is fired to increase the value of a field by one. The developer wrote an after trigger to create a child record when the field changes from 4 to 5.
A user changes the stage of an Opportunity and manually sets the count field to 4. The count field updates to 5, but the child record is not created.
What is the reason this is happening?
- A. After triggers are not fired after field updates.
- B. Trigger.old does not contain the updated value of the count field.
- C. Trigger.new does not change after a field update.
- D. After triggers fire before workflow rules.
Answer: B
NEW QUESTION # 76
When calling a RESTful web service, the developer must implement two-way SSL authentication to enhance security. The Salesforce admin has generated a self-sign certificate within Salesforce with a unique name of "ERPSecCertificate".
Consider the following code snippet:
Which method must the developer implement in order to sign the HTTP request with the certificate?
- A. req.setSecure('ERPSecCertificare)';
- B. req.setClientCertificateName('ERPSecCertificate');
- C. req.setHeader('certificate', 'ERPSecCertificate');
- D. req.setSecureCertificate( 'ERPSecCertificate');
Answer: B
NEW QUESTION # 77
How can the DISTANCE and GEOLOCATION functions be used i|n SOQL queries? (Choose two.)
- A. To get the distance results from a latitude and longitude
- B. To group results in distance ranges from a latitude and longitude
- C. To filter results based on distance from a latitude and longitude
- D. To order results by distance from a latitude or longitude
Answer: C,D
NEW QUESTION # 78
A developer has been asked to create code that will meet the following requirements:
Receives input of: Map<ld, Project_c), List<Account>
Performs a potentially long-running callout to an outside web service
Provides a way to confirm that the process executed successfully
Which asynchronous feature should be used?
- A. Database.AllowCallouts interface
- B. Queueable interface
- C. Schedulable interface
- D. ©future (callout=true)
Answer: B
NEW QUESTION # 79
Customer billing data must be added and updated into Salesforce from a remote system on a weekly basis. Additionally, customer activity information must be extracted from Salesforce and put it into an on-premises data warehouse on a weekly basis.
Which approach should be used to import data into Salesforce and export data out of Salesforce, taking into consideration that these imports and exports can interfere with end-user operations during business hours and involve large amounts of data?
- A. Replication via third-party ETL to push data into Salesforce and pull data out in batches
- B. Call-in directly from each remote system to Salesforce APIs to push and pull the data
- C. Salesforce Connect to push data to and pull data from the remote systems
- D. Batch Apex, where Salesforce pushes data to and pulls data from the remote systems
Answer: C
NEW QUESTION # 80
A company has a native iOS order placement app that needs to connect to Salesforce to retrieve consolidated information from many different objects in a JSON format.
Which is the optimal method to implement this in Salesforce?
- A. Apex SOAP callout
- B. Apex REST web service
- C. Apex SOAP web service
- D. Apex REST callout
Answer: B
NEW QUESTION # 81
After a Platform Event is defined in a Salesforce org, events can be published via which two mechanisms? Choose 2 answers
- A. External Apps can use the standard Streaming API.
- B. External Apps require a custom Apex web service.
- C. Internal Apps can use Process Builder.
- D. internal Apps can use Outbound Messages
Answer: A,C
NEW QUESTION # 82
Universal Containers uses a custom Lightning page to provide a mechanism to perform a step-by-step wizard search for Accounts. One of the steps in the wizard is to allow the user to input text into a text field, ERF Number_c, that is then used in a query to find matching Accounts.
Which step should be taken to resolve the issue?
- A. Mark the ERP_Number__ c field as required.
- B. Move the SO0L query to within an asynchronous process.
- C. Mark the ERP_Numker = field as an external 10.
- D. Perform the SOQL query as part of a for loop.
Answer: C
NEW QUESTION # 83
Refer to the following code snippet:
A developer created a JavaScript function as part of a Lightning web component (LWC) that surfaces information about Leads by wire calling geyFetchLeadList whencertain criteria are met.
Which three changes should the developer implement in the Apex class above to ensure the LWC can display data efficiently while preserving security?
Choose 3 answers
- A. Use the WZ E D clause within the SOQL query.
- B. Annotate the Apex method with @AuraEnabled(Cacheable=True).
- C. Implement the with sharing keyword in the class declaration.
- D. Annotate the Apex method with @AuraEnabled.
- E. Implement the with keyword in the class declaration.
Answer: B,C,D
Explanation:
The Apex class needs to have the method annotated with @AuraEnabled to expose it to the LWC. The 'with sharing' keyword ensures that the data access is enforced according to the user's permissions.
@AuraEnabled(cacheable=true) allows client-side caching for improved performance.
References:
@AuraEnabled Annotation: Apex Developer Guide
Enforcing Sharing Rules: Apex Developer Guide
NEW QUESTION # 84
Line 1 public class AttributeTypes Line 2 { Line 3 private final String[] arrayItems; Line 4 Line 5
@AuraEnabled Line 6 public List<String> getStringArray() { Line 7 Strings+ arrayItems = new String*+,
'red', 'green', 'blue' -; Line 8 return arrayItems; Line 9 } Line 10 } Consider the Apex controller above that is called from a Lightning Aura Component. What is wrong with it?
- A. Lines 1 and 6: class and method must be global
- B. Line 1: class must be global
- C. Line 8: method must first serialize the list to JSON before returning
- D. Line 6: method must be static
Answer: D
NEW QUESTION # 85
......
Salesforce PDII certification exam is a challenging and valuable credential for developers who have advanced knowledge of Salesforce development. It is an excellent way for developers to demonstrate their skills and knowledge of the Salesforce platform. With this certification, developers can increase their career opportunities and demonstrate their expertise in building complex solutions on the Salesforce platform.
The Salesforce PDII exam consists of 60 multiple-choice questions and lasts for 120 minutes. It covers a wide range of topics that are essential to building complex applications on the Salesforce platform, such as designing and deploying scalable and maintainable solutions, integrating with third-party systems, and securing data and application access.
Dumps for Free PDII Practice Exam Questions: https://testinsides.actualpdf.com/PDII-real-questions.html
