
Oct-2022 Realistic PDI Accurate & Verified Answers As Experienced in the Actual Test!
Latest Salesforce PDI Practice Test Questions, Platform Developer I (PDI) Exam Dumps
NEW QUESTION 158
A developer created a Visualforce page and custom controller to display the account type field as shown below. Custom controller code: public class customCtrlr{ private Account theAccount; public String actType; public customCtrlr() { theAccount = [SELECT Id, Type FROM Account WHERE Id = :apexPages.currentPage().getParameters().get('id')]; actType = theAccount.Type; } } Visualforce page snippet: The Account Type is {!actType} The value of the account type field is not being displayed correctly on the page. Assuming the custom controller is property referenced on the Visualforce page, what should the developer do to correct the problem?
- A. Convert theAccount.Type to a String.
- B. Add a getter method for the actType attribute.
- C. Change theAccount attribute to public.
- D. Add with sharing to the custom controller.
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_custom.htm
Answer: B
NEW QUESTION 159
A candidate may apply to multiple jobs at the company Universal Containers by submtting a single application per job posting. Once an application is submitted for a job posting, that application cannot be modified to be resubmitted to a different job posting.What can the administrator do to associate an application with each job posting in the schema for the organization?
- A. Create a lookup relationship in the Applications custom object to the Job Postings custom object
- B. Create a master-detail relationship in the Application custom object to the Job Postings custom object.
- C. Create a master-detail relationship in the Job Postings custom object to the Applications custom object.
- D. Create a lookup relationship on both objects to a junction object called Job Posting Applications.
Answer: C
NEW QUESTION 160
Which two settings must be defined in order to update a record of a junction object? Choose 2 answers
- A. Read/Write access on the secondary relationship
- B. Read/Write access on the primary relationship
- C. Read access on the primary relationship
- D. Read/Write access on the junction object
Answer: A,B
NEW QUESTION 161
A company would like to send an offer letter to a candidate, have the candidate sign it electronically, and then send the letter back.What can a developer do to accomplish this?
- A. Install a managed package that will allow the candidate to sign documents electronically
- B. Create a visual workflow that will capture the candidate's signature electronically
- C. Create an assignment rule that will assign the offer letter to the candidate
- D. Develop a Process Builder that will send the offer letter and allow the candidate to sign it electronically.
Answer: A
NEW QUESTION 162
Which three process automations can immediately send an email notification to the owner of an Opportunity when its Amount is changed to be greater than $10,000? Choose 3 answers
- A. Process Builder (Missed)
- B. Workflow Rule (Missed)
- C. Approval Process (Missed)
- D. Escalation Rule
- E. Flow Builder
Answer: A,B,C
NEW QUESTION 163
Which three Salesforce resources can be accessed from a Lightning web component' Choose 3 answers
- A. SVG resources
- B. All external libraries
- C. Third-party web components
- D. Static resources
- E. Content asset files
Answer: A,B,D
NEW QUESTION 164
A Lightning component has a wired property, searchResults, that stores a list of Opportunities. Which definition of the Apex method, to which the searchResults property is wired, should be used?
- A. @AuraEnabled(cacheable=false)
public List<Opportunity> search(String term) { /*implementation*/ } - B. @AuraEnabled(cacheable=true)
public static List<Opportunity> search(String term) { /* implementation*/ } - C. @AuraEnabled(cacheable=false)
public static List<Opportunity> search(String term) { /*implementation*/ } - D. @AuraEnabled(cacheable=true)
public List<Opportunity> search(String term) { /*implementation*/ }
Answer: B
NEW QUESTION 165
What is the result of the following code?
- A. The record will not be created and a exception will be thrown.
- B. The record will be created and a message will be in the debug log.
- C. The record will not be created and no error will be reported.
- D. The record will be created and no error will be reported.
Answer: C
NEW QUESTION 166
What are two best practices when it comes to Lightning Web Component events?
- A. Use event.detail to communicate data to elements in the same shadow tree
- B. Use event.target to communicate data to elements that aren't in the same shadow tree.
- C. Use CustomEvent to pass data from a child to a parent component.
- D. Use events configured with bubbles: false and composed:false.
Answer: B,C
NEW QUESTION 167
Which action may cause triggers to fire?
- A. Renaming or replacing a picklist entry
- B. Cascading delete operations
- C. Changing a user's default division when the transfer division option is checked
- D. Updates to Feed Items
Answer: D
NEW QUESTION 168
Opportunity opp=[select id ,stagename from opportunity limit 1] Given the code above, how can a developer get the label for the stagename field?
- A. Call"opp.stagename.label"
- B. Call"opportunity.stagename.getdescribe().getlabel()"
- C. Call "opportunity.stagename.label"
- D. Call"opp.stagename.getdescribe().getlabel()"
Answer: B
NEW QUESTION 169
A user selects a value from a multi-select picklist. How is this selected value represented in Apex?
- A. As a string
- B. As a string ending with a comma
- C. As a set< string > with one element
- D. As a list< String > with one element
Answer: A
NEW QUESTION 170
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. JavaScript file
- C. Apex class
- D. XML file
Answer: C
NEW QUESTION 171
Which three options allow a developer to use custom styling in a Visualforce page? (Choose three.)
- A. A static resource
- B. <apex:stylesheets>tag
- C. Inline CSS
- D. <apex:stylesheet> tag
- E. <apex:style>tag
Answer: A,C,D
NEW QUESTION 172
An org has two custom objects:
* Plan_c, that has a master-detail relationship to the Account object.
* Plan_item_c, that has a master-detail relationship to the plan_C object.
What should a developer use to create a Visualforce section in the Account page layout that displays all of the plan.. Account and all of the Plan_item_c records related to those plan_c records.
- A. A standard controller with a controller extension
- B. A custom controller by itself
- C. A controller extension with a custom controller
- D. A standard controller with a custom controller
Answer: A
NEW QUESTION 173
Which two statements are true regarding formula fields? Choose 2 answers
- A. Formula fields may reference formula field on the same object to a level of one deep.
- B. When concatenating fields, line breaks can be added to improve readability.
- C. When using the & operator to concatenate strings, the result is automatically truncated to fit the destination.
- D. Fields that are referenced by formula field can not be deleted until the formula is modified or deleted.
Answer: A,D
NEW QUESTION 174
Universal Container use a simple order Management app. On the Order Lines, the order line total is calculated by multiplying the item price with the quantity ordered. There is a Master-Detail relationship between the Order and the Order Lines object.
What is the practice to get the sum of all order line totals on the order header?
- A. Roll-Up Summary Field
- B. Declarative Roll-Up Summaries App
- C. Process Builder
- D. Apex Trigger
Answer: A
NEW QUESTION 175
A developer has the following requirements:
Calculate the total amount on an Order.
Calculate the line amount for each Line Item based on quantity selected and price.
Move Line Items to a different Order if a Line Item is not stock.
Which relationship implementation supports these requirements?
- A. Line Items has a Master-Detail field to Order and the Master can be re-parented.
- B. Order has a Lookup field to Line Item and there can be many Line Items per Order.
- C. Order has a Master-Detail field to Line Item and there can be many Line Items per Order.
- D. Line Item has a Lookup field to Order and there can be many Line Items per Order
Answer: A
NEW QUESTION 176
A team of developers is working on a source-driven project that allows them to work independently, with many different org configurations. Which type of Salesforce orgs should they use for their development?
- A. Scratch orgs
- B. Developer sandboxes
- C. Developer orgs
- D. Full Copy sandboxes
Answer: A
NEW QUESTION 177
Which is a valid Apex assignment?
- A. Integer x = 5.0;
- B. Integer x = 5*1.0;
- C. Double x = 5;
- D. Float x = 5.0;
Answer: C
NEW QUESTION 178
......
Free PDI Exam Files Downloaded Instantly 100% Dumps & Practice Exam: https://vcetorrent.passreview.com/PDI-exam-questions.html