PD 2 Certification Free Practice Mock Test 1 Take this test with no time limit and a set of 15 questions to check your preparation readiness for the PD 2 Certification Exam.A company has a custom object, order__c, that has a required, unique external ID field called order_Number__c Which statement should be used to perform the DML necessary to insert new records and update existing records in a list of order__c records using the external ID field? upsert orders Order_Number_¢; upsert orders; merge orders; merge orders Order Number ¢; None A corporation has many different Salesforce orgs, with some different objects and some common objects, and wants to build a single Java 2 application that can create, retrieve, and update common object records in all of the different orgs. Which method of integration should the application use? SOAP API with the Enterprise WSDL SOAP API with the Partner WSDL Apex REST Web Service Metadata API None A developer is tasked with creating a Lightning web component that allows users to create a Case for a selected product, directly from a custom Lightning page. The input fields in the component are displayed in a non-linear fashion on top of an image of the product to help the user better understand the meaning of the fields. Which two components should a developer use to implement the creation of the Case from the Lightning web component? lightning-record-edit-form lightning-input lightning-record-form lightning-input-field None What are three reasons that a developer should write Jest tests for Lightning web components? Choose 3 answers To verify that events fire when expected To test basic user interaction To verify the DOM output of a component To test how multiple components work together To test a component's non-public properties None A developer is inserting, updating, and deleting multiple lists of records in a single transaction and wants to ensure that any error prevents all execution. How should the developer implement error exception handling in their code to handle this? Use Database methods to obtain lists of Database. SaveResults. Use Database.setSavepoint() and Database.rolisack() with a try-catch statement. Use a try-catch statement and handle DML cleanup in the catch statement. Use a try-catch and use sebject.adderror() on any failures. None Which method should be used to convert a Date to a String in the current user's locale? Date. parse Date. format String.format String. valueOf None Which annotation should a developer use on an Apex method to make it available to be wired to a property in a Lightning web component? @RemoteAction @AuraEnabled(cacheable=true) @RemoteAction (cacheable=true) @auraEnabled None Given the following containment hierarchy: What is the correct way to communicate the new value of a property named "passthrough" to my-parent-component If the property is defined within my-child-component? let cEvent = new CustomEvent ($passthrough) this. dispatchEvent (cEvent); let cEvent = new customEvent('passthrough', { detail: ‘this.passthrough' }); this.dispatchEvent (cEvent); let cEvent = new CustomEvent('passthrough', { detail: this.passthrough }); this.dispatchEvent (cEvent); let cEvent = new CustomEvent (‘passthrough *') ; this.dispatchEvent (cEvent); None Universal Containers uses Big Objects to store almost a billion customer transactions called customer_Transaction__b. These are the fields on customer_Transaction__b: Account__c Programs Points_Earned__c Location_« Transaction Date__c The following fields have been identified as Index Fields for the customer_Transaction__b object; Account__c, Program__c, and Transaction _Date__-¢. Which SOQL query is valid on the customer_Transaction__b Big Object? SELECT Account_c, Program_c, Transaction_Date_c FROM Customer_Transaction_b WHERE Account_c = '601R000000302D3" AND Program _c INCLUDES ("Shoppers', "Womens') AND Transaction_Date__c=2019-05-31T00:002 SELECT Account_¢, Program_c, Transaction_Date_c FROM Customer_Transaction__b WHERE Account_¢ = '601R000000302D3" AND Program__c ="Shoppers'" AND Transaction_Date__c=2019-05-31T00:062 SELECT Account_c, Program__c, Transaction_Date_c FROM Customer Transaction _b WHERE Account__c = '601R000000302D3" AND Program__c EXCLUDES ("*Shoppers', “Womens')} AND Transaction _Date__c=2019-05-31T00: 002 SELECT Account_¢, Program_c, Transaction_Date_c FROM Customer_Transacrion__b WHERE Account _c = '001R000000302n3"' None As part of a custom development, a developer creates a Liahtning component to show how a particular opportunity progresses over time. The = q component must display the date stamp when any of the following fields change: Calculator | « Amount, Probability, Stage, or Close Date Poet \ How should the developer access the data that must be displayed? Execute a SOQL query for Amount, Probability, Stage, and Close Date on the Opportunity History object. Create a custom date field on Opportunity for each field to track the previous date and execute a SOQL query for date fields. Subscribe to the OpportunityHistory Change Data Capture event in the Lightning component. Subscribe to the Opportunity Change Data Capture event in the Lightning component. None Users upload .csv files in an external system to create account and contact records in Salesforce. Up to 200 records can be created at a time. The users need to wait for a response from Salesforce in the external system, but the data does not need to synchronize between the two systems. Based on these requirements, which method should a developer use to create the records in Salesforce? REST API request using compssite/batch/ REST API request using composite/tree/ Apex web services Bulk API 2.0 None Consider the following code snippet: import { LightningElement }) from ‘iwe': import getOrders from ‘@apex/OrderController.getAvailableoOrders'; export default class OrderManagement extends Lightning=lement [ Qwire (getOrders) wiredOrders({ error, data }) { if (data) { this.orders = data; this.errer = undefined: } else if (error) { Rte. eer slaneasy AD is correct Answer this.orders = undefined: When the component is deployed, an error is reported. Which two changes should the developer implement in the code to ensure the component deploys successfully? Choose 2 answers import getOrders from ‘@salesforce/apex/OrderController.getAvailableorders'; import { LightningElement, api } from ‘lwc'; import getOrders from ‘@salesforce/apex/c-.OrderController.getAvailableOrders'; import { LightningElement, wire } from ‘lwc'; None There are user complaints about slow render times of a custom data table within a Visualforce page that loads thousands of Account records 5 at once. What can a developer do to help alleviate such issues? Use JavaScript remoting to query the accounts. Upload a third-party data table library as a static resource. Use the standard Account List controller and implement pagination. Use the transient keyword in the Apex code when querying the Account records. None Salesforce users consistently receive a "Maximum trigger depth exceeded” error when saving an Account. | How can a developer fix this error? Use a helper class to set a Boolean to TRUE the first time a trigger Is fired, and then modify the trigger to only fire when the ' Boolean Is FALSE. Split the trigger logic into two separate triggers. Convert the trigger to use the ¢future annotation, and chain any subsequent trigger invocations to the Account object. Modify the trigger to use the isMultithread=crue annotation. None A developer is tasked with creating a Lightning web component that allows users to create a Case for a selected product, directly from a custom Lightning page. The input fields in the component are displayed in a non-linear fashion on top of an image of the product to help the user better understand the meaning of the fields. Which two components should a developer use to implement the creation of the Case from the Lightning web component? lightning-record-edit-form lightning-input lightning-record-form lightning-input-field None Time's upRelated