Go Back on PDII Exam
Available in 1, 3, 6 and 12 Months Free Updates Plans
PDF: $15 $60

Test Engine: $20 $80

PDF + Engine: $25 $99

PDII Practice Test


Page 2 out of 39 Pages

A developer is tasked with creating a Lightning web component that is responsive on various devices, Which two components should help accomplish this goal? (Choose 2 answers)


A. lightning-navigation


B. Lightning-input-location


C. Lightning-layout


D. lightning-layout—-item





C.
  Lightning-layout

D.
  lightning-layout—-item

A business requires that every parent record must have a child record. A developer writes an Apex method with two DML statements to insert a parent record and a child record. A validation rule blocks child records from being created. The method uses a try/catch block to handle the DML exception. What should the developer do to ensure the parent always has a child record?


A. Use addError() on the parent record if an error occurs on the child record.


B. Set a database savepoint to rollback if there are errors.


C. Use Database.insert() and set the allOrNone parameter to true.


D. Delete the parent record in the catch statement when an error occurs on the child record DML operation.





B.
  Set a database savepoint to rollback if there are errors.

A company uses Salesforce to sell products to customers. They also have an external product information management (PIM) system that is the system of record for products.

A developer received these requirements:

* Whenever a product is created or updated in the PIM, a product must be created or updated as a Product? record in Salesforce and a PricebookEntry record must be created or updated automatically by Salesforce.

= The PricebookEntry should be created in a Priceboek2 that is specified in a custom setting.

What should the developer use to satisfy these requirements?


A. Event Monitoring


B. Invocable Action


C. SObject Tree REST


D. Custom Apex REST





D.
  Custom Apex REST


Universal Containers allows customers to log into a Salesforce Community and update their orders via a custom Visualforce page. Universal Containers’ sales representatives can edit the orders on the same Visualforce page. What should a developer use in an Apex test class to test that record sharing is enforced on the Visualforce page?


A. use System. profiles=() to test as a sales rep and a community user.


B. use System. profiles() to test as an administrator and a community user.


C. use System. profiles1h=() to test as a sales rep and a community user.


D. use System. runsAs () to test as an administrator and a community user.





C.
  use System. profiles1h=() to test as a sales rep and a community user.


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 REST web service


B. Apex SOAP web service


C. Apex SOAP callout


D. Apex REST callout





A.
  Apex REST web service



Page 2 out of 39 Pages
Previous