[Jan-2024] Salesforce PDI Actual Questions and Braindumps
Pass PDI Exam with Updated PDI Exam Dumps PDF 2024
NEW QUESTION # 76
Which action causes a before trigger to fire by default for Accounts?
- A. Renaming or replacing picklist
- B. Converting Leads to Contact accounts
- C. Importing data using the Data Loader and the Bulk API
- D. Updating addresses using the Mass Address update tool
Answer: C
NEW QUESTION # 77
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 view on the Apex Classes page.
- B. Select and run the class on the Apex Test Execution page in the Developer Console.
- C. View Use cede coverage percentage for the class using the Overall Code Coverage panel in the Developer Console Tests tab.
- D. View the Class Test Percentage tab on the Apex Class fist view m Salesforce Setup.
Answer: D
NEW QUESTION # 78
Given the code block: Integer x; for (x =0; x<10; x+=2){
if (x==8) break; if (x==10) break;
} system.debug(x); Which value will the system.debug display?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: D
NEW QUESTION # 79
A developer has a VF page and custom controller to save Account records. The developer wants to display any validation rule violation to the user. How can the developer make sure that validation rule violations are displayed?
- A. Include <apex:messages> on the Visualforce page.
- B. Add custom controller attributes to display the message.
- C. Perform the DML using the Database.upsert() method
- D. Use a try/catch with a custom exception class.
Answer: A
Explanation:
Explanation
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_message.htm
NEW QUESTION # 80
Universal Containers has an order system that uses an Order Number to identify an order for customers and service agents. Order will be imported into Salesforce.
- A. Indirect Lookup
- B. Direct Lookup
- C. Number with External ID
- D. Lookup
Answer: C
NEW QUESTION # 81
Developer needs to automatically populate the Reports To field in a Contact record based on the values of the related Account and Department fields in the Contact record. Which type of trigger would the developer create? Choose 2 answers
- A. Before insert
- B. After update
- C. After insert
- D. Before update
Answer: A,D
NEW QUESTION # 82
Refer to the following Apex code:
What is the value of x when it is written to the debug log?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: C
NEW QUESTION # 83
In a single record, a user selects multiple values from a multi-select picklist.
How are the selected values represented in Apex?
- A. As a List<String> with each value as an element in the list
- B. As a Set<String> with each value as an element in the set
- C. As a String with each value separated by a comma
- D. As a String with each value separated by a semicolon
Answer: D
NEW QUESTION # 84
Which three resources in an Aura Component can contain Javascript functions? Choose 3 answers
- A. Renderer
- B. Controller
- C. Helper
Answer: A,B,C
NEW QUESTION # 85
A developer must modify the following code snippet to prevent the number of SOQL queries issued from exceeding the platform governor limit. public class without sharing OpportunityService( public static List<OpportunityLineItem> getOpportunityProducts(Set<Id> opportunityIds){ List<OpportunitylineItem> oppLineItems = new List<OpportunityLineItem>(); for(Id thisOppId : opportunityIds){ oppLineItems.addAll([Select Id FROM OpportunityLineItems WHERE OpportunityId = :thisOppId)]; } return oppLineItems; } } The above method might be called during a trigger execution via a Lightning component.
Which technique should be implemented to avoid reaching the governor limit?
- A. Refactor the code above to perform only one SOQL query, filtering by the Set of opportunityIds.
- B. Refector the code above to perform the SOQL query only if the Set of opportunityIds contains less 100 Ids.
- C. Use the System.Limits.getQueries() method to ensure the number of queries is less than 100.
- D. Use the System.Limits.getlimitQueries() method to ensure the number of queries is less than 100.
Answer: C
NEW QUESTION # 86
A developer created a new trigger that inserts a Task when a new Lead is created. After deploying to production, an outside integration chat reads task records is periodically reporting errors.
Which change should the developer make to ensure the integration is not affected with minimal impact to business logic?
- A. Use a try-catch block after the insert statement.
- B. Use the Database method with allorNone set to false
- C. Deactivate the trigger before the integration runs.
- D. Remove the Apex class from the integration user's profile.
Answer: B
NEW QUESTION # 87
Universal Container(UC) wants to lower its shipping cost while making the shipping process more efficient. The Distribution Officer advises UC to implement global addresses to allow multiple Accounts to share a default pickup address. The Developer is tasked to create the supporting object and relationship for this business requirement and uses the Setup Menu to create a custom object called "Global Address". Which field should the developer ad to create the most efficient model that supports the business need?
- A. Add a Master-Detail field on the Global Address object to the Account object.
- B. Add a Lookup field on the Account object to the Global Address object.
- C. Add a Lookup field on the Global Address object to the Account object
- D. Add a Master-Detail field on the Account object to the Global Address object
Answer: A
NEW QUESTION # 88
A developer created these three Rollup Summary fields in the custom object, Project__c:
The developer is asked to create a new field that shows the ratio between rejected and approved timesheets for a given project.
Which should the developer use to implement the business requirement in order to minimize maintenance overhead?
- A. Field Update actions
- B. Apex trigger
- C. Record-triggered flow
- D. Formula field
Answer: D
NEW QUESTION # 89
what are the methods used to show input in classic and lightning ?
- A. Use visualforce page in classic and lightning component in lightning
Answer: A
NEW QUESTION # 90
Refer to the following code snippet for an environment has more than 200 Accounts belonging to the Technology' industry:
When the code execution, which two events occur as a result of the Apex transaction?
When the code executes, which two events occur as a result of the Apex transaction?
Choose 2 answers
- A. If executed In a synchronous context, the apex transaction is likely to fall by exceeding the DHL governor limit.
- B. The Apex transaction succeeds regardless of any uncaught exception and all processed accounts are updated.
- C. If executed in an asynchronous context, the apex transaction is likely to fall by exceeding the DML governor limit
- D. The Apex transaction fails with the following message. "SObject row was retrieved via SOQL without querying the requested field Account.Is.Tech__c''.
Answer: B,D
NEW QUESTION # 91
A developer writes a single trigger on the Account object on the after insert and after update events. A workflow rule modifies a field every time an Account is created or updated.
How many times will the trigger fire if a new Account is inserted, assuming no other automation logic is implemented on the Account?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: B
NEW QUESTION # 92
Which two operations can be performed using a formula field? Choose 2 answers
- A. Displaying an Image based on the Opportunity Amount (Missed)
- B. Displaying the last four digits of an encrypted Social Security number
- C. Calculating a score on a Lead based on the information from another field (Missed)
- D. Triggering a Process Builder
Answer: A,C
NEW QUESTION # 93
A company has a custom object, Sales, }_Help_Request__c, that has a Lookup relationship to Opportunity. The Seles Help Request__c has a mumber field, Number_ct_Hours__c, that represents the amount of time spent on the Sales_Help Request__C.
A developer is tasked with creating a field, total_Hour2__c, on Opportunity that should be the sum of all of the Number_of_Hours_c values for the Sales_Help_Request__c records related to that Opportunity.
What should the developer use to implement this?
- A. A record-triggered flow on the Sales Help Request__c object
- B. A roll-up summary field on the Opportunity object
- C. A trigger on the Opportunity object
- D. A roll-up summary field on the sales Help_Request__c object
Answer: C
NEW QUESTION # 94
How can a developer warn users of SOQL governor limit violations in a trigger?
- A. Use Messaging.SendEmail() to continue the transaction and send an alert to the user after the number of SOQL queries exceeds the limit.
- B. Use Limits.getQueries() and display an error message before the number of SOQL queries exceeds the limit.
- C. Use PageReference.setRedirect() to redirect the user to a custom Visualforce page before the number of SOQL queries exceeds the limit.
- D. Use ApexMessage.Message() to display an error message after the number of SOQL queries exceeds the limit.
Answer: B
NEW QUESTION # 95
A developer needs to create a custom button for the Account object that, when clicked, will perform a series of calculation and redirect the user to a custom visualforce page.
Which three attributes need to be defined with values in the <apex:page> tag to accomplish this?
Choose 3 answers
- A. readOnly
- B. extensions
- C. renderAs
- D. standard Controller
- E. Action
Answer: B,C,D
NEW QUESTION # 96
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 Opportunity.StageName.getDescribe().getLabel()
- B. Call Opportunity.StageName.Label
- C. Call Opp.StageName.getDescri
- D. Call Opp.StageName.Label
Answer: A
NEW QUESTION # 97
A primaryid_c custom field exists on the candidate_c custom object. The filed is used to store each candidate's id number and is marked as Unique in the schema definition.
As part of a data enrichment process. Universal Containers has a CSV file that contains updated data for all candidates in the system, the file contains each Candidate's primary id as a data point. Universal Containers wants to upload this information into Salesforce, while ensuring all data rows are correctly mapped to a candidate in the system.
Which technique should the developer implement to streamline the data upload?
- A. Update the primaryid__c field definition to mark it as an External Id
- B. Upload the CSV into a custom object related to Candidate_c.
- C. Create a before Insert trigger to correctly map the records.
- D. Create a Process Builder on the Candidate_c object to map the records.
Answer: A
NEW QUESTION # 98
Which resource can be included in a Lightning Component bundle? Choose 2 answers
- A. Documentation
- B. Apex class
- C. JavaScript
- D. Adobe Flash
Answer: A,C
NEW QUESTION # 99
Which Apex collection is used to ensure that all values are unique?
- A. An sObject
- B. A Set
- C. A List
- D. An Enum
Answer: B
NEW QUESTION # 100
......
Latest PDI Pass Guaranteed Exam Dumps with Accurate & Updated Questions: https://www.latestcram.com/PDI-exam-cram-questions.html
PDI Exam Brain Dumps - Study Notes and Theory: https://drive.google.com/open?id=1H812ddncQelUM6K5mhMNQnNggvcimQIw
