Exam Code: PDI (Practice Exam Latest Test Questions VCE PDF)
Exam Name: Platform Developer I (PDI)
Certification Provider: Salesforce
Free Today! Guaranteed Training- Pass PDI Exam.
Free PDI Demo Online For Salesforce Certifitcation:
NEW QUESTION 1
Which approach should a developer use to add pagination to a Visualforce page?
Answer: D
NEW QUESTION 2
The account object has a custom percent field, rating, defined with a length of 2 with 0 decimal places. An account record has the value of 50% in its rating field and is processed in the apex code below after being retrieved from the database with SOQL public void processaccount(){ decimal acctscore = acc.rating c * 100; } what is the value of acctscore after this code executes?
Answer: C
NEW QUESTION 3
Which action can a developer take to reduce the execution time of the following code? List<account> allaccounts = [select id from account]; list<account> allcontacts = [select id, accountid from contact]; for (account a :allaccounts){ for (contact c:allcontacts){ if(c.accountid = a.id){ //do work } } }
Answer: A
NEW QUESTION 4
A developer can use the debug log to see which three types of information? Choose 3 answers
Answer: BDE
NEW QUESTION 5
A user selects a value from a multi-select picklist. How is this selected value represented in Apex?
Answer: B
NEW QUESTION 6
A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple sObjects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URLWhich statement is unnecessary inside the unit test for the custom
controller?
Answer: AD
NEW QUESTION 7
What are two considerations for custom Apex Exception classes? Choose 2 answers.
Answer: BC
NEW QUESTION 8
Which two approaches optimize test maintenance and support future declarative configuration changes? Choose 2 answers.
Answer: BD
NEW QUESTION 9
Which actions can a developer perform using the Schema Builder?Choose 2 answers
Answer: BC
NEW QUESTION 10
A developer wrote a unit test to confirm that a custom exception works properly in a custom controller, but the test failed due to an exception being thrown. What step should the developer take to resolve the issue and properly test the exception?
Answer: D
NEW QUESTION 11
What is a capability of the Force.com IDE? Choose 2 answers
Answer: BD
NEW QUESTION 12
Which two conditions cause workflow rules to fire? Choose 2 answers
Answer: BD
NEW QUESTION 13
A developer has the following trigger that fires after insert and creates a child Case whenever a new Case is created. List<Case> childCases = new List<Case>();for (Case parent : Trigger.new){Case child = new Case (ParentId = parent.Id, Subject = parent.Subject);childCases.add(child);}insert childCases; What happens after the code block executes?
Answer: B
NEW QUESTION 14
A developer creates a custom controller and a custom Visualforce page by using the code block below: public class MyController {
public String myString { get {
if (myString == null) { myString = 'a';
}
return myString;
} private set; } public string getMyString (){ return 'getMyString';
} public string getStringMethod () { if (myString == null) {
myString = 'b';
} return myString;
}
} <apex:page controller = "MyController"> {!StringMethod}, {!myString}, {!myString} </apex:page> What can the user expect to see when accessing the custom page?
Answer: A
NEW QUESTION 15
A developer uses an 'after update' trigger on the Account object to update all the Contacts related to the Account. The trigger code shown below is randomly failing.
List<Contacts> theContacts = new List<Contacts>(); for(Account a : Trigger.new){ for(Contact c : [SELECT Id, Account_Date_c FROM Contact WHERE AccountId = :a.Id]){ c.Account_Date_c = Date.today(); theContacts.add(c);
}
} updates theContacts;
Which line of code is causing the code block to fail?
Answer: D
NEW QUESTION 16
What is a benefit of using a trigger framework?
Answer: D
NEW QUESTION 17
What are three characteristics of static methods? (Choose three.)
Answer: ACE
NEW QUESTION 18
Where can debug log filter settings be set?Choose 2 answers
Answer: AD
NEW QUESTION 19
In which two trigger types can a developer modify the new sObject records that are obtained by the trigger.new context? Choose 2 answers
Answer: CD
NEW QUESTION 20
The Review_c object has a lookup relationship up to the Job_Application_c object. The Job_Application c object has a master-detail relationship up the Position_c object. The relationship field names are based on the auto-populated defaults. What is the recommended way to display field data from the related Review c records on a Visualforce page for a single Position_c record?
Answer: A
NEW QUESTION 21
A developer wants to override a button using Visualforce on an object. What is the requirement?
Answer: B
NEW QUESTION 22
A developer needs to create records for the object Property_c. The developer creates the following code
block:List propertiesToCreate = helperClass.createProperties();try { // line 3 } catch (Exception exp ) {
//exception handling }Which line of code would the developer insert at line 3 to ensure that at least some records are created, even if a few records have errors and fail to be created?
Answer: A
NEW QUESTION 23
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
Answer: AC
NEW QUESTION 24
A developer needs to provide a way to mass edit, update, and delete records from a list view. In which two ways can this be accomplished? Choose 2 answers
Answer: AC
NEW QUESTION 25
A developer runs the following anonymous code block in a Salesforce org with 100 accounts List acc= {select id from account limit 10}; delete acc; database.emptyrecyclebin(acc); system.debug(limits.getlimitqueries()+'
,'+Limits.getlimitDMLStatements()); What is the debug output?
Answer: C
NEW QUESTION 26
What is a capability of the Developer Console?
Answer: A
NEW QUESTION 27
A method is passed a list of generic sObjects as a parameter.
What should the developer do to determine which object type (Account, Lead, or Contact, for example) to cast each sObject?
Answer: B
NEW QUESTION 28
What is a capability of a StandardSetController?Choose 2 answers
Answer: AB
NEW QUESTION 29
How can a developer retrieve all Opportunity record type labels to populate a list collection?Choose 2 answers
Answer: AD
NEW QUESTION 30
......
Thanks for reading the newest PDI exam dumps! We recommend you to try the PREMIUM Downloadfreepdf.net PDI dumps in VCE and PDF here: https://www.downloadfreepdf.net/PDI-pdf-download.html (373 Q&As Dumps)