[Dec-2021] Salesforce PDII Actual Questions and Braindumps
Pass PDII Exam with Updated PDII Exam Dumps PDF 2021
NEW QUESTION 104
A developer wrote an Apex class to make several callouts to an external system.
If the URLs used in these callouts will change often, which feature should the developer use to minimize changes needed to the Apex class?
- A. Connected Apps
- B. Session Id
- C. Named Credentials
- D. Remote Site Settings
Answer: C
Explanation:
Explanation
Explanation/Reference: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/ apex_callouts_named_credentials.htm
NEW QUESTION 105
An Apex trigger and Apex class increment a counter, Edit_Count_c, any time that the Case is changed.
A new process on the case object was just created in production for when a Case is created or updated< since the process was created, they are reports that the Count is being incremented by more than one on Case edit.
Which change in the Apex code will fix the problem?
A)
B)
C)
D)
- A. Option A
- B. Option B
- C. Option D
- D. Option C
Answer: A
NEW QUESTION 106
Salesforce users consistently receive a "Maximum trigger depth exceeded" error when saving m Account.
How can a developer fix this error?
- A. Convert trigger to use the @future annotation, and chain any subsequent trigger invocations to the Account object.
- B. Modify the trigger to use the isMultiThread=true annotation.
- C. Split the trigger logic into two separate triggers.
- D. Use a helper class to set a Boolean to TRUE the first time a trigger is fired, and then; modify the trigger to only fire when modify the trigger to only fire when the Boolean is FALSE.
Answer: D
NEW QUESTION 107
A Visualforce page contains an industry select list and displays a table of Accounts that have a matching value in their Industry field.
When a user changes the value in the industry select list, the table of Accounts should be automatically updated to show the Accounts associated with the selected industry.
What is the optimal way to implement this?
- A. Add an <apex: actionSupport> within the <apex: selectOptions>.
- B. Add an <apex: actionFunction> within the <apex: select List >.
- C. Add an <apex: actionFunction> within the <apex : selectOptions>.
- D. Add an <apex: actionSupport> within the <apex:selectList>.
Answer: B
NEW QUESTION 108
Business rules require a Contact to always be created when a new Account is created.
What can be used when developing a custom screen to ensure an Account is not created if the creation of the Contact fails?
- A. Disable Validation rules on Contacts and set default values with a Trigger.
- B. Use the Database.Insert method with allOrNone set to False.
- C. Use setSavePoint() and rollback() with a try/catch block.
- D. Use the Database.Delete method if the Contact insertion fails.
Answer: C
NEW QUESTION 109
A business process requires sending new Account records to an external system. The Account Name, Id, CreatedDate. and CreatedByld must be passed to the external system in near real-time when an Account is Inserted without error.
How should a developer achieve this?
- A. Use a Workflow rule that calls an @InvocableMethod method.
- B. Use a Process Builder that calls an @InvocableMethod method.
- C. Use a before insert trigger and an @future method.
- D. Use a before insert trigger and a Queueable class.
Answer: C
NEW QUESTION 110
Which of the following about Dynamic Apex is incorrect?
- A. In dynamic SOQL, you can use bind variables and bind variable fields
- B. Schema.getGlobalDescribe() gives you a map of all sObject
- C. You can retrieve the sObject type from an Id by calling .getSObjectType()
- D. getDescribe() can get you a variety of info on a particular object/field
Answer: A
NEW QUESTION 111
A developer writes the following code:
While testing the code, the developer receives the following error message: System.CalloutException : You have uncommitted work pending What should the developer do? (Choose two.)
- A. Use the asyncSend() method of the HTTP class to send the request in async context
- B. Move the web service callout into an ©future method
- C. Ensure all callouts are completed prior to executing DML statements
- D. Use Database.insert (order, true) to immediately commit any database changes
Answer: B,C
NEW QUESTION 112
Trigger on Contact ensures that whenever a Contact's custom field "User Level" is given the value "President," the related Community User's Role is updated as Manager. The Apex unit test method for testing this functionality is failing for a mixed DML error. What is one way that this problem can be solved?
- A. Put the update of contact event inside startTest() and stopTest().
- B. Query the user roles before the test method's startTest () statement.
- C. Create test data for the roles before startTest 0.
- D. Use a System. runAs () block to update the contact.
Answer: D
NEW QUESTION 113
A large company uses Salesforce across several departments. Each department has its own Salesforce Administrator. It was agreed that each Administrator would have their own sandbox in which to test changes.
Recently, users notice that fields that were recently added for one department suddenly disappear without warning. Also, Workflows that once sent emails and created tasks no longer do so. Which two statements are true regarding these issues and resolution? Choose 2 answers
- A. Page Layouts should never be deployed via Change Sets, as this causes Workflows and Field-level Security to be reset and fields to disappear.
- B. A sandbox should be created to use as a unified testing environment instead of deploying Change Sets directly to production.
- C. The administrators are deploying their own Change Sets, thus deleting each other's fields from the objects in production.
- D. The administrators are deploying their own Change Sets over each other, thus replacing entire Page Layouts and Workflows in Production
Answer: B,D
NEW QUESTION 114
A company notices that their unit tests in a test class with many methods to create many records for prerequisite reference data are slow. What can a developer to do address the issue?
- A. Move the prerequisite reference data setup to the constructor for the test class.
- B. Move the prerequisite reference data setup to a @testSetup method in the test class.
- C. Move the prerequisite reference data setup to a TestDataFactory and call that from each test method.
- D. Move the prerequisite reference data setup to a static method in the test class and call that from each test method.
Answer: C
NEW QUESTION 115
A company requires an external system to be notified whenever an account is updated.
What LimitException could the following code trigger?
- A. System.LimitException: Too many future calls
- B. System.LimitException: Too many SOQL queries
- C. System.CalloutException: Callout from triggers are currently not supported
- D. System.LimitException: Too many callouts
Answer: A
NEW QUESTION 116
Universal Containers has a Visualforce page that displays a table every Container_ c being rented by a gives Account.. failing because some of the customers rent over 100,000 containers.
What should a developer change about the Visualforce page to help with the page load errors?
- A. Use JavaScript remoting with SOQL Offset.
- B. Implement pagination with a StandardSetController.
- C. Implement pagination with an OffsetController.
- D. Use lazy loading and a transient List variable.
Answer: B
NEW QUESTION 117
What is a valid request for the following REST method: @HttpPost global static void myPostMethod(String sl,Integer il, Boolean bl, String b2) Choose 2 answers
- A. < request> < sl>"my first string" < il>123 < sZ>"my second string" < bl>false < /request>
- B. "il" : 123, "S1" : "my first string", "S2" : "my second string", "bl" : false
- C. Sl" : "my first string", 11" : "123", "b1" : "false", "S2" : "my second string"
- D. < request> < sl>my first string < 11>123 < 32>my second string < b1>false < /request>
Answer: A,B
NEW QUESTION 118
What is the transaction limit on the recursive trigger depth?
- A. There is no limit
- B. 0
- C. 1
- D. 2
- E. 3
Answer: B
Explanation:
Explanation
NEW QUESTION 119
A company has an Apex process that makes multiple extensive database operations and web service callouts.
The database processes and web services can take a long time to run and must be run sequentially.
How should the developer write this Apex code without running into running into governor limits and system limitations?
- A. Use Apex Scheduler to schedule each process
- B. Use multiple @future methods for each process and callout
- C. Use Limits class to stop entire process once governor limits are reached
- D. Use Queueable Apex to chain the jobs to run sequentially
Answer: D
NEW QUESTION 120
What are three benefits of using declarative customizations over code? Choose 3 answers
- A. Declarative customizations cannot generate run time errors.
- B. Dectarative customizations will automatically update with each Salesforce release.
- C. Declarative customizations do not require user testing.
- D. Declarative customizations are not subject to governor limits.
- E. Declarative customizations generally require less maintenance.
Answer: B,C,D
NEW QUESTION 121
A developer is developing a reuseable Aura Component that will reside on an sObject Lightning Page with the following HTML snippet:
<aura:component implements="force:hasRecordId,flexipage:availableForAIIPageTypesM>
<div>Hello!</div>
</aura:component>
How can the component's Controller get the context of the Lightning Page that the sObject is on without requiring additional test coverage?
- A. Set the sObject type as a component attribute.
- B. Add force:hasSobjectName to the implements.
- C. Use the getSObjectTypeQ method in an Apex class.
- D. Create a design attribute and configure via App builder.
Answer: B
NEW QUESTION 122
......
Latest PDII Pass Guaranteed Exam Dumps with Accurate & Updated Questions: https://dumpscertify.torrentexam.com/PDII-exam-latest-torrent.html

