Exam Details

  • Exam Code
    :PDI
  • Exam Name
    :Salesforce Certification for Platform Developer I
  • Certification
    :Salesforce Developer
  • Vendor
    :Salesforce
  • Total Questions
    :719 Q&As
  • Last Updated
    :May 08, 2024

Salesforce Salesforce Developer PDI Questions & Answers

  • Question 1:

    Which action can a developer take to reduce the execution time of the following code? List allaccounts = [select id from account]; list allcontacts = [select id, accountid from contact]; for (account a :allaccounts){ for (contact c:allcontacts){ if(c.accountid = a.id){ //do work } } }

    A. Use a map for allaccounts

    B. Add a group by clause to the contact SOQL

    C. Put the account loop inside the contact loop

    D. Create an apex helper class for the SOQL

  • Question 2:

    What can used to delete components from production?

    A. A change set deployment with the delete option checked

    B. An ant migration tool deployment with destructivechanges xml file and the components to delete in the package .xml file

    C. A change set deployment with a destructivechanges XML file

    D. An ant migration tool deployment with a destructivechanges XML file and an empty package .xml file

  • Question 3:

    Which feature allows a developer to create test records for use in test classes?

    A. Static resources

    B. Documents

    C. Httpcalloutmocks

    D. Webservicetests

  • Question 4:

    Candidates are reviewed by four separate reviewers and their comments and scores which range from 1 (lowest) to 5 (highest) are stored on a review record that is a detail record for a candidate what is the best way to indicate that a combined review score of 15 of better is required to recommend that the candidate come in for an interview?

    A. Use a validation rule on a total score field on the candidate record that prevents a recommended field from being true if the total score is less than 15

    B. Use a workflow rule to calculate the sum of the review scores and send an email to the hiring manager when the total is 15 or better

    C. Use visual workflow to set a recommended field on the candidate whenever the cumulative

    D. Use a rollup summary field to calculates the sum of the review scores, and store this in a total score field on the candidate

  • Question 5:

    Which control statement should a developer use to ensure that a loop body executes at least once?

    A. For(variable : list_or_set){}

    B. While (condition){}

    C. For(init_stmt;exit_cond;increment){}

    D. Do {} while (cond)

  • Question 6:

    A platform developer needs to implement a declarative solution that will display the most recent closed won date for all opportunity records associated with an account. Which field is required to achieve this declaratively?

    A. Roll-up summary field on the opportunity object

    B. Cross-object formula field on the account object

    C. Roll-up summary field on the account object

    D. Cross-object formula field on the opportunity object

  • Question 7:

    While writing a test class that covers an OpportunityLineItem trigger, a Developer is unable to create a standard Pricebook since one already exist in the org.

    How should the developer overcome this problem?

    A. Use @IsTest(SeeAllData=true) and delete the existing standard Pricebook.

    B. Use @TestVisible to allow the test method to see the standard Pricebook.

    C. Use Test.getStandardPricebbokId()to get the standard Pricebook ID.

    D. Use Test.loaddata() and a Static Resource to load a standard Pricebook

  • Question 8:

    Which three data types can be returned from an SOQL statement?

    A. Boolean

    B. List of objects

    C. String

    D. Integer

    E. Single object

  • Question 9:

    To which data type in Apex a currency field automatically assigned?

    A. Integer

    B. Decimal

    C. Double

    D. Currency

  • Question 10:

    Which two statement can a developer use to throw a custom exception of type MissingFieldValueException?Choose 2 answers

    A. Throw (MissingFieldValueException,'Problem occurred');

    B. Throw new MissingFieldValueException('Problem occurred');

    C. Throw new MissingFieldValueException();

    D. Throw Exception(new MissingFieldValueException());

Tips on How to Prepare for the Exams

Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Salesforce exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your PDI exam preparations and Salesforce certification application, do not hesitate to visit our Vcedump.com to find your solutions here.