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.

Online Salesforce PDI free dumps demo Below:

NEW QUESTION 1

Which governor limit applies to all the code in an apex transaction?

  • A. Elapsed CPU time
  • B. Number of new records created
  • C. Number of classes called
  • D. Elapsed SOQL query time

Answer: A

NEW QUESTION 2

How should a developer create a new custom exception class?

  • A. public class CustomException extends Exception{}
  • B. CustomException ex = new (CustomException)Exception();
  • C. public class CustomException implements Exception{}
  • D. (Exception)CustomException ex = new Exception();

Answer: A

NEW QUESTION 3

Which two condition cause workflow rules to fire? Choose 2 answers

  • A. Changing territory assignments of accounts and opportunities
  • B. Updating record using bulk API
  • C. Converting leads to person account
  • D. An Apex batch process that changes field values

Answer: BD

NEW QUESTION 4

Which three options can be accomplished with formula fields? (Choose three.)

  • A. Generate a link using the HYPERLINK function to a specific record.
  • B. Display the previous value for a field using the PRIORVALUE function.
  • C. Determine if a datetime field value has passed using the NOW function.
  • D. Return and display a field value from another object using the VLOOKUP function.
  • E. Determine which of three different images to display using the IF function.

Answer: ACE

NEW QUESTION 5

A sales manager wants to make sure that whenever an opportunity stage is changed to 'Closed Won', a new case will be of created for the support team to collect necessary information from the customer. How should a developer accomplish this?

  • A. Create a Process Builder to create the new case.
  • B. Set up a validation rule on the Opportunity Stage.
  • C. Create a lookup field to the Case object on the opportunity object.
  • D. Create a workflow rule to create the new case.

Answer: A

NEW QUESTION 6

When a task is created for a contact, how can a developer prevent the task from being included on the activity timeline of the contact's account record?

  • A. In activity settings,uncheck roll-up activities to a contact's primary account
  • B. By default,tasks do not display on the account activity timeline
  • C. Use process builder to create a process to set the task account field to blank
  • D. Create a task trigger to set the account field to NULL

Answer: A

NEW QUESTION 7

Which two approaches optimize test maintenance and support future declarative configuration changes? Choose 2 answers.

  • A. Create a method that queries for valid records, then call this method within test methods.
  • B. Create a methods that loads valid Account records from a static resources, then call this method within test methods.
  • C. Create a method that performs a callout for valid records, then call this method within test methods.
  • D. Create a method that creates valid records,then call this method within test methods.

Answer: BD

NEW QUESTION 8

A developer is creating an enhancement to an application that will allow people to be related to their employer. Which date model should be used to track the data?

  • A. Create a junction object to relate many people to many employers trough master-detail relationship
  • B. Create a junction object to relate many people to many employers trough lookup relationship
  • C. Create a lookup relationship to indicate that a person has an employer
  • D. Create a master detail relationship to indicate that a person has an employer

Answer: C

NEW QUESTION 9

What is an accurate statement about variable scope? (Choose 3)

  • A. Parallel blocks can use the same variable name.
  • B. A variable can be defined at any point in a block.
  • C. Sub-blocks cannot reuse a parent block's variable name.
  • D. Sub-blocks can reuse a parent block's variable name if it's value is null.
  • E. A static variable can restrict the scope to the current block of its value is null.

Answer: ABC

NEW QUESTION 10

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 statement display?

  • A. 2
  • B. 10
  • C. 8
  • D. 4

Answer: C

NEW QUESTION 11

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 String with each value separated by a comma
  • C. As a String with each value separated by a semicolon
  • D. As a Set<String> with each value as an element in the set

Answer: C

NEW QUESTION 12

A developer has the controller class below.
PDI dumps exhibit
Which code block will run successfully in an execute anonymous window?

  • A. myFooController m = new myFooController();System.assert(m.prop !=null);
  • B. myFooController m = new myFooController();System.assert(m.prop ==0);
  • C. myFooController m = new myFooController();System.assert(m.prop ==null);
  • D. myFooController m = new myFooController();System.assert(m.prop ==1);

Answer: C

NEW QUESTION 13

Which two practices should be used for processing records in a trigger? Choose 2 answers

  • A. Use @future methods to handle DML operations.
  • B. Use a Map to reduce the number of SOQL calls
  • C. Use (callout=true) to update an external system
  • D. Use a Set to ensure unique values in a query filter

Answer: BD

NEW QUESTION 14

A developer has the following code:try {List nameList;Account a;String s = a.Name;nameList.add(s);} catch (ListException le ) {System.debug(' List Exception ');} catch (NullPointerException npe) {System.debug('
NullPointer Exception ');} catch (Exception e) {System.debug(' Generic Exception ');} What message will be logged?

  • A. List Exception
  • B. NullPointer Exception
  • C. Generic Exception
  • D. No message is logged

Answer: B

NEW QUESTION 15

Account acct = {SELECT Id from Account limit 1}; Given the code above, how can a developer get the type of object from acct?

  • A. Call "acct.getsObjectType()"
  • B. Call "Account.getSobjectType()"
  • C. Call "Account.SobjectType"
  • D. Call "acct.SobjectType"

Answer: A

NEW QUESTION 16

A developer creates an Apex class that includes private methods. What can the developer do to ensure that the private methods can be accessed by the test class?

  • A. Add the TestVisible attribute to the Apex class
  • B. Add the SeeAllData attribute to the test methods.
  • C. Add the TestVisible attribute to the apex methods.
  • D. Add the SeeAllData attribute to the test class

Answer: C

NEW QUESTION 17

What are two considerations for custom Apex Exception classes? Choose 2 answers.

  • A. Custom Exceptions cannot be extended by other Exception classes.
  • B. Custom Exception class names must end with the word 'Exception'.
  • C. Custom Exception classes must extend the base Exception class.
  • D. Constructor for custom Exceptions can only accept string values as arguments.

Answer: BC

NEW QUESTION 18

What are two benefits of the Lightning Component framework? (Choose two.)

  • A. It simplifies complexity when building pages, but not applications.
  • B. It provides an event-driven architecture for better decoupling between components.
  • C. It promotes faster development using out-of-box components that are suitable for desktop and mobile devices.
  • D. It allows faster PDF generation with Lightning components.

Answer: BC

NEW QUESTION 19

For which three items can a trace flag be configured? (Choose three.)

  • A. Apex Trigger
  • B. Apex Class
  • C. Process Builder
  • D. User
  • E. Visualforce

Answer: ABD

NEW QUESTION 20

Which code block returns the ListView of an Account object using the following debug statement? system.debug(controller.getListViewOptions() );

  • A. ApexPages.StandardSetController controller = new ApexPages.StandardSetController( Database.getQueryLocator( 'SELECT Id FROM Account LIMIT 1'));
  • B. ApexPages.StandardController controller = new ApexPages.StandardController( [SELECT Id FROM Account LIMIT 1]);
  • C. ApexPages.StandardController controller = new ApexPages.StandardController( Database.getQueryLocator( 'SELECT Id FROM Account LIMIT 1'));
  • D. ApexPages.StandardController controller = new ApexPages.StandardController( [SELECT Id FROM Account LIMIT 1]);

Answer: A

NEW QUESTION 21

Which two number expression evaluate correctly? Choose 2 answers

  • A. Integer I = 3.14159;
  • B. Decimal D = 3.14159;
  • C. Long I = 3.14159;
  • D. Double D =3.14159;

Answer: BD

NEW QUESTION 22

Which two automation tools include a graphical designer? Choose 2 answers

  • A. Approvals
  • B. Flow builder
  • C. Process builder
  • D. Workflows

Answer: AB

NEW QUESTION 23

A developer working on a time management application wants to make total hours for each timecard available to application users. A timecard entry has a Master-Detail relationship to a timecard.
Which approach should the developer use to accomplish this declaratively?

  • A. A Visualforce page that calculates the total number of hours for a timecard and displays it on the page
  • B. A Roll-Up Summary field on the Timecard Object that calculates the total hours from timecard entries for that timecard
  • C. A Process Builder process that updates a field on the timecard when a timecard entry is created
  • D. An Apex trigger that uses an Aggregate Query to calculate the hours for a given timecard and stores it in a custom field

Answer: B

NEW QUESTION 24

In the Lightning Component framework, where is client-side controller logic contained?

  • A. Apex
  • B. Visualforce
  • C. HTML
  • D. JavaScript

Answer: D

NEW QUESTION 25

Which type of controller should a developer use to include a list of related records for a Custom Object record on a Visualforce page without needing additional test coverage?

  • A. Controller Extension
  • B. Custom Controller
  • C. Standard Controller
  • D. List Controller

Answer: C

NEW QUESTION 26

A developer wants to handle the click event for a lightning:button componentthe onclick attribute for the component references a javascript function in which resource in the component bundle?

  • A. Helper.js
  • B. Handler.js
  • C. Renderer.js
  • D. Controller.js

Answer: D

NEW QUESTION 27

Which statement would a developer use when creating test data for products and pricebooks?

  • A. Id pricebookId = Test.getStandardPricebookId();
  • B. Pricebook pb = new Pricebook();
  • C. IsTest(SeeAllData = false);
  • D. List objList = Test.loadData(Account.sObjectType, 'myResource');

Answer: A

NEW QUESTION 28
......

Thanks for reading the newest PDI exam dumps! We recommend you to try the PREMIUM Certleader PDI dumps in VCE and PDF here: https://www.certleader.com/PDI-dumps.html (373 Q&As Dumps)