[Jun-2023] The Best Salesforce PDI Study Guide for the PDI Exam
PDI certification guide Q&A from Training Expert VCEDumps
NEW QUESTION # 35
A developer has the controller class below.
Which code block will run successfully in an execute anonymous window?
- A. myFooController m = new myFooController();System.assert(m.prop ==1);
- B. myFooController m = new myFooController();System.assert(m.prop ==null);
- C. myFooController m = new myFooController();System.assert(m.prop !=null);
- D. myFooController m = new myFooController();System.assert(m.prop ==0);
Answer: B
NEW QUESTION # 36
A Salesforce Administrator is creating a record-triggered flow. When certain criteria are met, the flow must call an Apex method to execute complex validation involving several types of objects.
When creating the Apex method, which annotation should a developer use to ensure the method Can be used within the flow?
- A. @RemoteAction
- B. @InvocableMethod
- C. @future
- D. @AuraEnaled
Answer: B
NEW QUESTION # 37
Which action may cause triggers to fire?
- A. Updates to Feed Items
- B. Changing a user's default division when the transfer division option is checked
- C. Renaming or replacing a picklist entry
- D. Cascading delete operations
Answer: A
NEW QUESTION # 38
A developer is debugging the following code to determinate why Accounts are not being created Account a = new Account(Name = 'A'); Database.insert(a, false); How should the code be altered to help debug the issue?
- A. Collect the insert method return value a Saveresult record
- B. Set the second insert method parameter to TRUE
- C. Add a System.debug() statement before the insert method
- D. Add a try/catch around the insert method
Answer: D
NEW QUESTION # 39
Universal Containers wants Opportunities to no longer be editable when reaching the Closed/Won stage.
How should a developer accomplish this?
- A. Use a validation rule.
- B. Use the Process Automation settings.
- C. Use Flow Builder.
- D. Mark fields as read-only on the page layout.
Answer: A
NEW QUESTION # 40
A developer created an Apex trigger using the Developer Console and now wants to debug codeHow can the developer accomplish this in the Developer Console?
- A. Select the Override Log Triggers checkbox for the trigger
- B. Open the logs tab in the Developer Console.
- C. Open the Progress tab in the Developer Console.
- D. Add the user name in the Log Inspector.
Answer: B
NEW QUESTION # 41
How can a developer refer to, or instantiate a PageReference in Apex? Choose 2 answers
- A. By using a PageReference with a partial or full URL.
- B. By using the ApexPages.Page() method with a Visualforce page name.
- C. By using the PageReference.Page() method with a partial or full URL.
- D. By using the Page object and a Visualforce page name.
Answer: A,D
NEW QUESTION # 42
A developer created these three Rollup Summary fields in the custom object, Project_ct,
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. Record-triggered Flow
- B. Process Builder
- C. Apex Trigger
- D. Formula field
Answer: D
NEW QUESTION # 43
How many accounts will be inserted by the following block ofcode? for(Integer i = 0 ; i <
500; i++) { Account a = new Account(Name='New Account ' + i); insert a; }
0
87. Boolean odk;
Integer x;
if(abok=false;integer=x;){
X=1;
}elseif(abok=true;integer=x;){
X=2;
}elseif(abok!=null;integer=x;){
X=3;
)elseif{
X=4;}
- A. X=9
- B. X=8
- C. X=10
- D. X=4
Answer: D
NEW QUESTION # 44
How can a custom type be identified as unique when added to a Set?
- A. The class must implement the Equals and Hashcode methods
- B. Methods in the class must be static
- C. Methods in the class must be global
- D. The class must have a method with the @InvocableMethod annotation
Answer: A
NEW QUESTION # 45
A developer writes a trigger on the Account object on the before update event that increments a count field. A workflow rule also increments the count field every time that an Account is created or updated. The field update in the workflow rule is configured to not re-evaluate workflow rules.
What is the value of the count field if an Account is inserted with an initial value of zero, assuming no other automation logic is implemented on the Account?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: D
NEW QUESTION # 46
Given the code below, which three statements can be used to create the controller variable? Public class accountlistcontroller{ public list<account>getaccounts(){ return controller.getrecords(); } } Choose 3 answers
- A. Apexpages.standardsetcontroller controller = new apexpages.standardsetcontroller (database.getquerylocator([select id from account]));
- B. Apexpages.standardcontroller controller= new
apexpages.standardcontroller(database.getquerylocator('select id from account')); - C. Apexpages.standardcontroller controller= new apexpages.standardcontroller([select id from account]);
- D. Apexpages.standardsetcontroller controller=new
apexpages.standardsetcontroller(database.getquerylocator('select id from account')); - E. Apexpages.standardsetcontroller controller = new apexpages.standardsetcontroller (database.query('select id from account'));
Answer: A,C,E
NEW QUESTION # 47
Which two statements are true about using the @testSetup annotation in an Apex test class? (Choose two.)
- A. The @testSetup annotation cannot be used when the @isTest(SeeAllData=True) annotation is used.
- B. Test data is inserted once for all test methods in a class.
- C. Records created in the @testSetup method cannot be updates in individual test methods.
- D. The @testSetup method is automatically executed before each test method in the test class is executed.
Answer: D
NEW QUESTION # 48
Which control statement should a developer use to ensure that a loop body executes at least once?
- A. While (condition){}
- B. For(init_stmt;exit_cond;increment){}
- C. For(variable : list_or_set){}
- D. Do {} while (cond)
Answer: D
NEW QUESTION # 49
Which three statements are true regarding the @istest annotation? Choose 3 answers
- A. A method annotated @istest (seealldata=false) in a class annotated @istest (seealladata=true) has access to all org data
- B. Products and pricebooks are visible in a test even if a class is annotated @istest (seealldata=false)
- C. A method annotated @istest (seealldata=true) in a class annotated @istest (seealladata=false) has access to all org data
- D. A class containing test methods counts toward the apex code liit regardless of any @istest annotation (Missed
- E. Profiles are visible in a test even if a class is annotated @istest (seealldata=false)
Answer: A,D,E
NEW QUESTION # 50
......
The Best Salesforce PDI Study Guides and Dumps of 2023: https://www.vcedumps.com/PDI-examcollection.html
PDI Certification Overview Latest PDI PDF Dumps: https://drive.google.com/open?id=1XNqbceSCisNlfaf5_kao3Aadd_YfMyLW
