[Aug 21, 2023] Uplift Your PDII Exam Marks With The Help of PDII Dumps
Use Salesforce PDII Dumps To Succeed Instantly in PDII Exam
NEW QUESTION # 73
Which API can b|e used to execute unit tests? (Choose three.)
- A. Tooling API
- B. Metadata API
- C. SOAP API
- D. Test API
- E. Streaming AP
Answer: A,B,C
NEW QUESTION # 74
A developer writes the following Apex trigger so that when a Case is closed, a single Survey record is created for that Case. The issue is that multiple Survey_c records are being created per Case.
trigger CaseTrigger on Case (after insert, after update){ List<Survey_c> createSurveys = new List<Survey_c>(); for (Case c : trigger.new){ if (c.IsClosed
&& (trigger.isInsert II trigger.isUpdate && trigger.oldMap.get(c.Id).IsClosed == false)){ createSurveys.add(new Survey_c(Case_c = c.Id)); } } insert createSurveys; } What could be the cause of this issue?
- A. A workflow rule is firing with a Field Update action
- B. A user is creating the record as Closed
- C. A workflow rule is firing with a Create Task action
- D. A user is editing the record multiple times
Answer: D
NEW QUESTION # 75
Line 1 public class AttributeTypes Line 2 { Line 3 private final String[] arrayItems; Line 4 Line 5 @AuraEnabled Line 6 public List<String> getStringArray() { Line 7 Strings+ arrayItems = new String*+, 'red', 'green', 'blue' -; Line 8 return arrayItems; Line 9 } Line 10 } Consider the Apex controller above that is called from a Lightning Aura Component. What is wrong with it?
- A. Line 1: class must be global
- B. Lines 1 and 6: class and method must be global
- C. Line 6: method must be static
- D. Line 8: method must first serialize the list to JSON before returning
Answer: C
NEW QUESTION # 76
A company requires an external system to be notified whenever an account is updated.
trigger AccountTrigger on Account (after update){ for (Account
updatedAccount:Trigger.new){ AccountTriggerHelper.notinyxternalSystem
(updatedAccount.id); } } public class AccountTriggerHelperfuture(callout=true)
{ public static void notinyxternalSystem(Id accountId){ Account acc = [Select id, name from Account where accountId = :accountId]; http objectHttp h = new Http(); HttpRequest req = new HttpRequest(); req.setEndpoint('http://example.org/ restService'); req.setMethod('POST'); req.setBody(JSON.serialize(acc)); HttpResponse res = h.send(req); } } What LimitException could the following code trigger?
- A. System.LimitException: Too many SOQL queries
- B. System.LimitException: Too many callouts
- C. System.LimitException: Too many future calls
- D. System.CalloutException: Callout from triggers are currently not supported
Answer: C
NEW QUESTION # 77
The following code segment is railed from a Trigger handler class from the Opportunity trigger:
Which two changes should improve this code and make it more efficient? Choose 2 answers
- A. Move business logic inside the Opportunity trigger.
- B. Move the SOQL to fetch the account record outside of the for loop.
- C. Use Triginstead.old instead of Trigger.new.
- D. Move the DML outside of the for loop.
Answer: B,D
NEW QUESTION # 78
A developer is writing a Visualforce page that queries accounts in the system and presents a data table with the results. The users want to be able to filter the results based on up to five fields. However, the users want to pick the five fields to use as filter fields when they run the page.
Which Apex code feature is required to facilitate this solution'
- A. Dynamic variable binding
- B. Dynamic SOQL
- C. Streaming API
- D. Report API
Answer: B
NEW QUESTION # 79
A developer has built a multi-page wizard using a single Custom Controller to query and update data. Users are complaining that the pages are loading slowly.
What will improve performance? (Choose three.)
- A. Setting the Apex Page attribute cache=true
- B. Using selective queries
- C. Reducing the view state
- D. Using actionRegion and rerender
- E. Turning off the standard stylesheet
Answer: A,B,C
NEW QUESTION # 80
A developer is asked to create a Lightning web component that will be invoked via button on a record page.
The component must be displayed in a model dialog.
Which three steps should the developer take to achieve this?
Choose 3 answers
- A. In target, add lightning_RecordAction as a target.
- B. Set action Type to screenAction.
- C. Add a tarqetConfig anf set targets to lightning_RecordAction.
- D. In targetConfigs, add Lightning_Apppage as a target.
- E. Set eventType to action.
Answer: A,B,C
NEW QUESTION # 81
Code must have X% overall code coverage.
- A. X = 100
- B. X = 50
- C. X = 75
- D. X = 65
Answer: C
Explanation:
All triggers must have at least 1% code coverage
NEW QUESTION # 82
A developer has created a Team Member sObject that has a Master-Detail relationship to a Project sObject and a Lookup relationship to the User sObject. The developer must ensure that a User listed on a Team Member record has Read-Write access to the parent Project record.
How can the developer accomplish this if the Project sObject has a Private sharing model and thousands of Project records?
- A. Create a Criteria-Based Sharing Rule on the Project sObject
- B. Create a Project Sharing Rule that shares to the Team Member Group
- C. Create a Controller that uses the Without Sharing keyword
- D. Create a Team Member Trigger that inserts Project_Share records
Answer: D
NEW QUESTION # 83
A developer wrote the following method to find all the test accounts in the org:
What should be used to fix this falling test?
- A. @isTest (See AllData=true) to access org data for the test
- B. Test. loaddata to set up expected data
- C. Test. fixedSearchResults ( ) method to set up expected data
- D. @testSetup method to set up expected data
Answer: C
NEW QUESTION # 84
A developer is trying to access org data from within a test class. Which sObject type requires the test class to have the (seeAllData=true) annotation?
- A. Profile
- B. RecordType
- C. Report
- D. User
Answer: A
NEW QUESTION # 85
A developer has built a multi-page wizard using a single Custom Controller to query and update dat
a. Users are complaining that the pages are loading slowly.
What will improve performance? (Choose three.)
- A. Setting the Apex Page attribute cache=true
- B. Using selective queries
- C. Reducing the view state
- D. Using actionRegion and rerender
- E. Turning off the standard stylesheet
Answer: A,B,C
NEW QUESTION # 86
A developer wants to call an Apex Server-side Controller from a Lightning Aura Component.
What are two limitations to the data being returned by the Controller? (Choose two.)
- A. Basic data types are supported, but defaults, such as maximum size for a number, are defined by the objects that they map to.
- B. Only Basic data types and sObjects are supported as return types for Apex Controllers called by Lightning Aura Components.
- C. Lists of Custom Apex Classes cannot be returned by Apex Controllers called by Lightning Aura Components.
- D. A custom Apex Class can be returned, but only the values of public instance properties and methods annotated with @AuraEnabled are serialized and returned.
Answer: A,D
NEW QUESTION # 87
Consider the following code snippet:
Which governor limit is likely to be exceeded when the trigger runs when a scope of 200 newly inserted accounts?
- A. Total number of SOQL queries issued
- B. Total number of records processed as a result of DML
- C. Total number of SOQL queries issued
- D. Total number of DML statements issued
Answer: D
NEW QUESTION # 88
Universal Containers decided to use Salesforce to manage a new hire interview process. A custom object called candidate as created with organization-wide default set to Private. A lookup on the Candidate object sets an employee as an the viewer user
- A. The record can be shared using a sharing rule.
- B. The record can be shared using a permission set.
- C. The record cannot be shared with the current setup
- D. The record can be shared an Apex class.
Answer: D
NEW QUESTION # 89
A Salesforce developer created a Contact validation rule so that the Email field cannot contain "abc.com." There is an active workflow rule that updates the Email field of a contact record to "[email protected]" if the contact's First Name field contains the word "Test." A customer tries to create a Contact record with the first name "Test Contact" and the email "[email protected]." What behavior will be observed?
- A. The customer will receive a system error message.
- B. The contact record will be created with the email address [email protected].
- C. The contact record will be created with the email address "[email protected]."
- D. The customer will receive a validation error message.
Answer: C
NEW QUESTION # 90
An Apex Trigger creates a Contract record every time an Opportunity record is marked as Closed and Won. This trigger is working great, except (due to a recent acquisition) historical Opportunity records need to be loaded into the Salesforce instance. When a test batch of records are loaded, the Apex Trigger creates Contract records. A developer is tasked with preventing Contract records from being created when mass loading the Opportunities, but the daily users still need to have the Contract records created. What is the most extendable way to update the Apex Trigger to accomplish this?
- A. add the Profile Id of the user who does the data loading to the Trigger so the Trigger won't fire for this user.
- B. Add a Validation Rule to the Contract to prevent Contract creation by the user who does the data loading.
- C. Use a Hierarchy Custom Setting to disable the Trigger for the user who does the data loading.
- D. Use a List Custom Setting to disable the Trigger for the user who does the data loading.
Answer: C
NEW QUESTION # 91
A developer wrote a test class that successfully asserts a trigger on Account. It fires and updates data correctly in a sandbox environment.
A salesforce admin with a custom profile attempts to deploy this trigger via a change set into the production environment, but the test class fails with an insufficient privileges error.
What should a developer do to fix the problem?
- A. Add seeAllData=true to the test class to work within the sharing model for the production environment.
- B. Add system.runAd ( ) to the best class to execute the trigger as a user with the correct object permissions.
- C. Verify that Test, statement ( ) is not inside a For loop in the test class.
- D. Configure the production environment to enable ''Run All tests as Admin User.''
Answer: B
NEW QUESTION # 92
How long is field history retained?
- A. 24 Months
- B. 36 Months
- C. 18 Months
- D. 12 Months
- E. 6 Months
Answer: C
Explanation:
Explanation/Reference:
NEW QUESTION # 93
What is the recommended approach to create test data when testing Apex that involves Pricebooks, PricebookEntries, and Products?
- A. Insert a new standard Pricebook record within your Test Method so that it can be used with other test records.
- B. Use the isTest (SeeAllData=true) annotation on the entire Test Class to allow your Test Methods access to the standard Pricebook.
- C. Use the isTest (SeeAllData=true) annotation on Test Methods that require access to the standard Pricebook.
- D. Use the Test.getStandardPricebookId() method to get theId of the standard Pricebook so that it can be used with other test records.
Answer: D
NEW QUESTION # 94
......
Salesforce Dumps - Learn How To Deal With The Exam Anxiety: https://www.crampdf.com/PDII-exam-prep-dumps.html
Ultimate Guide to PDII Dumps - Enhance Your Future Career Now: https://drive.google.com/open?id=1ev0JkzndFoWg8IenDRMYXYgsP6e1L2Ol