[Nov 27, 2023] Valid PDI Test Answers & Salesforce PDI Exam PDF
Realistic PDI Exam Dumps with Accurate & Updated Questions
NEW QUESTION # 98
AW Computing (AWC) handles orders In Salesforce and stores Its product Inventory In a fter, inventory__c, on a custom object, Product__c. When en order for aProduct__c Is placed, the inventory__c field Is reduced by the quantity of the order using an Apex trigger.
AWC wants the real-time inventory reduction for a product to be sent to many of Its external systems, Including some future systems the company Iscurrently planning.
What should a developer add to the code at the placeholder to meet these requirements?
A)
B)
C)
D)
- A. Option
- B. Option
- C. Option
- D. Option
Answer: C
NEW QUESTION # 99
A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple subjects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URL.
Which three statements are useful inside the unit test to effectively test the custom controller?
Choose 3 answers
- A. ApexPages.CurrentPage().getParameters().put('input\', 'TestValue');
- B. String nextPage - controller.save().getUrl();
- C. public ExtendedController(ApexPages StandardController cntrl) { }
- D. insert pageRef.
- E. Test.setCurrentPage(pageRef);
Answer: A,B,E
NEW QUESTION # 100
Which three code lines are required to create a Lightning component on a Visualforce page? Choose 3 answers
- A. $Lightning.use
- B. <apex:includeLightning/>
- C. <apex:slds/>
- D. $Lightning.useComponent
- E. $Lightning.createComponent
Answer: A,B,E
NEW QUESTION # 101
The sales team at Universal Containers would like to see a visual indicator appear on both Account and Opportunity page layouts to alert salespeople when an Account is late making payments or has entered the collections process. What can a developer implement to achieve this requirement without having to write custom code?
- A. Formula Field
- B. Quick Action
- C. Workflow Rule
- D. Roll-up Summary Field
Answer: A
NEW QUESTION # 102
Which data type or collection of data types can SOQL statements populate or evaluate to? (Choose 3)
- A. An integer
- B. A string
- C. A single sObject
- D. A Boolean
- E. A list of sObjects
Answer: A,C,E
NEW QUESTION # 103
When using SalesforceDX, what does a developer need to enable to create and manage scratch orgs?
- A. Production
- B. Sandbox
- C. Dev Hub
- D. Environment Hub
Answer: C
Explanation:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs.htm When using SalesforceDX, a developer needs to enable Dev Hub in order to create and manage scratch orgs. A Dev Hub is a special type of org used by developers to store source code and other development-related artifacts. It is also used to create and manage scratch orgs, which are temporary orgs used for development and testing. Reference: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_intro.htm
NEW QUESTION # 104
Given the following Apex statement:
Account myAccount = [SELECT Id, Name FROM Account];
What occurs when more than one Account is returned by the SOQL query?
- A. An unhandled exception is thrown and the code terminates.
- B. The first Account returned is assigned to myAccount.
- C. The query fails and an error is written to the debug log.
- D. The variable, myAccount, is automatically cast to the List data type.
Answer: A
NEW QUESTION # 105
How many levels of child records can be returned in a single SOQL query from one parent object?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: C
NEW QUESTION # 106
A developer uses a test setup method to create an account named 'test'. The first method deletes the account record. What must be done in the second test method to use the account?
- A. Use select id from account where name='test'
- B. The account cannot be used in the second method
- C. Call the test setup method at the start of the test
- D. Restore the account using an undelete statement
Answer: A
NEW QUESTION # 107
An Apex method, getAccounts, that returns a List of Accounts given a search Term, is available for Lighting Web components to use. What is the correct definition of a Lighting Web component property that uses the getAccounts method?
- A. @AuraEnabled(getAccounts, {searchTerm: '$searchTerm'})
accountList; - B. @wire(getAccounts, {searchTerm: '$searchTerm'})
accountList; - C. @wire(getAccounts, '$searchTerm')
accountList; - D. @AuraEnabled(getAccounts, '$searchTerm')
accountList;
Answer: B
Explanation:
Explanation
https://developer.salesforce.com/docs/component-library/documentation/en/48.0/lwc/lwc.data_wire_service_abo
NEW QUESTION # 108
A developer creates a Lightning web component that imports a method within an Apex class. When a Validate button is pressed, the method runs to execute complex validations.
In this implementation scenario, which artifact is part of the Controller according to the MVC architecture?
- A. HTML file
- B. XML file
- C. Apex class
- D. JavaScript file
Answer: C
NEW QUESTION # 109
What should a developer do to check the code coverage of a class after running all tests?
- A. View the Code Coverage column in the list on the Apex Classes page.
- B. Select and run the class on the Apex est Execution page in the Developer Console.
- C. View the Class test Percentage tab on the Apex Class list view in Salesforce Setup.
- D. View the code coverage percentage or the class using the Overalll code Coverage panel in the Developer Console Test tab.
Answer: D
NEW QUESTION # 110
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. <apex: pageMessage severity="info''/>
- B. <Apex: facet name='' message''/>
- C. <Apex: message for='' info''/>
- D. <apex: pageMessages />
Answer: A
NEW QUESTION # 111
Which requirement needs to be implemented by using standard workflow instead of Process Builder? Choose
2 answers
- A. Submit a contract for approval.
- B. Create activities at multiple intervals.
- C. Send an outbound message without Apex code.
- D. Copy an account address to its contacts.
Answer: C,D
NEW QUESTION # 112
What should a developer use to script the deployment and unit test execution as part of continuous integration?
- A. Developer Console
- B. Salesforce CLI
- C. Execute Anonymous
- D. VS Code
Answer: B
NEW QUESTION # 113
A developer in a Salesforce org with 100 Accounts executes the following code using the Developer console:Account myAccount = new Account(Name = 'MyAccount');Insert myAccount;For (Integer x = 0; x <
150; x++)
{Account newAccount = new Account (Name='MyAccount' + x);try {Insert newAccount;} catch (Exception ex) {System.debug (ex) ;}}insert new Account (Name='myAccount');How many accounts are in the org after this code is run?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: B
NEW QUESTION # 114
Universal Container is building a recruiting app with an Applicant object that stores information about an individual person that represents a job. Each application may apply for more than one job.
What should a developer implement to represent that an applicant has applied for a job?
- A. Formula field on Applicant that references Job
- B. Master-detail field from Applicant to Job
- C. Lookup field from Applicant to Job
- D. Junction object between Applicant and Job
Answer: D
NEW QUESTION # 115
What are two testing consideration when deploying code from a sandbox to production? Choose 2 answers
- A. Apex code requires 100% coverage
- B. 75% of test must execute without failure
- C. Apex code requires 75% coverage
- D. 100% of test must execute without failure
Answer: C,D
NEW QUESTION # 116
A company wants to create an employee rating program that allows employees to rate each other. An employee's average rating must be displayed on the employee record. Employees must be able to create rating records, but are not allowed to create employee records. Which two actions should a developer take to accomplish this task? choose 2 answers
- A. Create a trigger on the rating object that updates a field on the employee object
- B. Create a lookup realntionship beteween the rating and employee object
- C. Create a master-detail relanstionship between the rating and employee object
- D. Create a roll-up sumary field on the employee and use avg to calculate the average rating score
Answer: C,D
NEW QUESTION # 117
......
PDI Exam Dumps - PDF Questions and Testing Engine: https://www.lead1pass.com/Salesforce/PDI-practice-exam-dumps.html
PDI Dumps - The Sure Way To Pass Exam: https://drive.google.com/open?id=1P9rv2tUaLy0cXn0FrV3QrFmesdIfoTyT