[Sep 11, 2021] Latest PDII Exam with Accurate Salesforce Certified Platform Developer II (PDII) PDF Questions
Practice To PDII - PassSureExam Remarkable Practice On your Salesforce Certified Platform Developer II (PDII) Exam
NEW QUESTION 132
Universal Containers wants to use an external Web Service provided by a third-party vendor to validate that shipping and billing addresses are correct. The current vendor uses basic password authentication, but Universal Containers might switch to a different vendor who uses OAuth. What would allow Universal Containers to switch vendors without updating the code to handle authentication?
- A. Dynamic Endpoint
- B. Custom Metadata
- C. Named Credential
- D. Custom Setting (List)
Answer: C
NEW QUESTION 133
The "action" attribute on <apex:page> is ONLY evaluated on which type of request?
- A. Postback request
- B. Get request
Answer: B
NEW QUESTION 134
Exhibit:
What should be added to the setup, in the location indicated, for the unit test above to create the controller extension for the test?
A)
B)
C)
D)
- A. Option D
- B. Option C
- C. Option A
- D. Option B
Answer: B
NEW QUESTION 135
A developer needs to create a Lightning page for entering Order Information. An error message should be displayed if the zip code entered as part of the Order's shipping address is not numeric.
What is a recommended way for the error message be displayed to the end user?
- A. Use the ui:outputText tag to display errors
- B. Use the apex:message tag to display errors
- C. Use the aura:component tag to display errors
- D. Use the ui:inputDefaultError tag to display errors
Answer: D
NEW QUESTION 136
1 Contact con = new Contact ( LastName =fSmith', Department = fAdminT)
2 insert con;
3 Contact insertedContact=[select Name from Contact where id=icon.Id];
4 Savepoint sp_admin = Database.setSavepoint();
5 con.Department = fHRf;
6 update con;
7 Database.rollback(sp_admin);
8 System.debug(Limits.getDmlStatements 0);
Given the following code, what value will be output in the logs by line #8?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: C
NEW QUESTION 137
A developer has written an After Update trigger on Account. A workflow rule and field update cause the trigger to repeatedly update the Account records. How should the developer handle the recursive trigger?
- A. Deactivate the workflow rule to prevent the field update from executing.
- B. Use a global variable to prevent the trigger from executing more than once.
- C. Deactivate the trigger and move the logic into a Process or Flow.
- D. Use a static variable to prevent the trigger from executing more than once.
Answer: D
NEW QUESTION 138
An Apex trigger creates an Order__c record every time an Opportunity is won by a Sales Rep. Recently the trigger is creating two orders. What is the optimal method for a developer to troubleshoot this?
- A. Turn off all Workflow Rules, then turn them on one at at time to see which one causes the error.
- B. Set up debug logging for every Sales Rep, then monitor the logs for errors and exceptions.
- C. Run the Apex Test Classes for the Apex trigger to ensure the code still has sufficient code coverage.
- D. add system.debug() statements to the code and use the Developer Console logs to trace the code.
Answer: D
NEW QUESTION 139
Choose the correct definition for <apex:actionPoller>.
- A. Adds AJAX support to another component (e.g. onClick, onMouseUp, onFocus, etc.)
- B. Signifies which components should be processed by the server when an AJAX request is generated
- C. Sends an AJAX request according to the time interval you specify. If this ever gets re-rendered, it resets
- D. Can be associated with an AJAX request (actionFunction/actionSupport/actionPoller) and shows content conditionally depending on the status of the request (in progress/complete). Use the "id" field to specify name; use "status" field on related components to connect them
- E. Allows for controller methods to be called directly from Javascript. Must be encapsulated in <apex:form> tags. Unlike actionSupport, these function<apex:actionPoller>s can be called directly from Javascript code
Answer: C
NEW QUESTION 140
What is a consideration when testing batch Apex? (Choose two.)
- A. Test methods must execute the batch with a scope size of less than 200 records
- B. Test methods must run the batch between TeststartTestQ and Test.stopTestQ
- C. Test methods must use the @isTest (SeeAIIData=true) annotation
- D. Test methods must call the batch execute() method once
Answer: A,B
NEW QUESTION 141
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. getDescribe() can get you a variety of info on a particular object/field
- D. You can retrieve the sObject type from an Id by calling .getSObjectType()
Answer: A
Explanation:
While you can use simple bind variables in dynamic SOQL, you cannot use bind variable fields (e.g. :myVariable.field1_c) Use escapeSingleQuotes to prevent SOQL injection
NEW QUESTION 142
What is a recommended practice with regard to the Apex CPU limit? (Choose two.)
- A. Optimize SOQL query performance
- B. Avoid nested Apex iterations
- C. Use Map collections to cache sObjects
- D. Reduce view state in Visualforce pages
Answer: B,C
NEW QUESTION 143
A developer must create a custom pagination solution. Users will access the solution on a mobile device and will rarely access subsequent pages of records. Performance is crucial. Which approach is optimal?
- A. Use OFFSET in SOQL queries.
- B. Use @Cache annotation in the controller.
- C. Use a StandardSetController.
- D. Use OFFSET CURSOR in SOQL queries.
Answer: A
NEW QUESTION 144 
Consider the above trigger intended to assign the Account to the manager of the Account''s region. Which two changes should a developer make in this trigger to adhere to best practices? Choose 2 answers
- A. Remove the last line updating accountList as it is not needed.
- B. Use a Map to cache the results of the Region__c query by Id.
- C. Use a Map accountMap instead of List accountList.
- D. Move the Region__c query to outside the loop.
Answer: A,D
NEW QUESTION 145
An Apex trigger creates an Order__c record every time an Opportunity is won by a Sales Rep. Recently the trigger is creating two orders. What is the optimal method for a developer to troubleshoot this?
- A. add system.debug() statements to the code and use the Developer Console logs to trace the code.
- B. Set up debug logging for every Sales Rep, then monitor the logs for errors and exceptions.
- C. Run the Apex Test Classes for the Apex trigger to ensure the code still has sufficient code coverage.
- D. Turn off all Workflow Rules, then turn them on one at at time to see which one causes the error.
Answer: D
NEW QUESTION 146
Which object can a developer use to programmatically determine who is following a specific User record in Chatter?
- A. FollowHistory
- B. FollowSubscription
- C. Entityfiistory
- D. EntitySubscription
Answer: D
NEW QUESTION 147
A Visualforce page contains an industry select list and displays a table of Accounts that have a matching value in their Industry field. <apex:selectList value=",!selectedIndustry- "> <apex:selectOptions values="{!industries}"/> </apex:selectList> 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: actionFunction> within the <apex:selectList>.
- B. Add an <apex: actionSupport> within the <apex:selectList>.
- C. Add an <apex: actionFunction> within the <apex:selectOptions>.
- D. Add an <apex: actionSupport> within the <apex: selectOptions>.
Answer: B
NEW QUESTION 148
What is the transaction limit on the recursive trigger depth?
- A. 0
- B. There is no limit
- C. 1
- D. 2
- E. 3
Answer: D
NEW QUESTION 149
The REST API __________.
- A. Is used to retrieve, deploy, create, update, or delete customizations for your org. The most common use is to migrate changes from a sandbox or testing org to your production environment
- B. Is based on REST principles and is optimized for loading or deleting large sets of data. You can use it to query, queryAll, insert, update, upsert, or delete many records asynchronously by submitting batches
- C. Provides a powerful, convenient, and simple REST-based web services interface for interacting with Salesforce. Its advantages include ease of integration and development, and it's an excellent choice of technology for use with mobile applications and web projects
- D. Is used to create, retrieve, update or delete records, such as accounts, leads, and custom objects, and allows you to maintain passwords, perform searches, and much more
Answer: C
Explanation:
Explanation
NEW QUESTION 150
Just prior to a new deployment, the Salesforce Administrator who configured a new order fulfillment process in a developer sandbox suddenly left the company. The users had fully tested all of the changes in the sandbox and signed off on them.
Unfortunately, although a Change Set was started, it was not complete. A developer is brought in to help finish the deployment.
What should the developer do to identify the configuration changes that need to be moved into production?
- A. Use the Metadata API and a supported development IDE to push all of the configuration from the sandbox into production to ensure no changes are lost.
- B. Set up Continuous Integration and a Git repository to automatically merge all changes from the sandbox metadata with the production metadata.
- C. Leverage the Setup Audit Trail to review the changes made by the departed Administrator and identify which changes should be added to the Change Set.
- D. In Salesforce setup, look at the last modified date for every object to determine which should be added to the Change Set.
Answer: C
NEW QUESTION 151
A company has a custom object, Order__c, that has a custom picklist field, Status__c, with values of 'New',
'In Progress', or 'Fulfilled' and a lookup field, Contact__c, to Contact.
Which SOQL query will return a unique list of all the Contact records that have no 'Fulfilled' Orders?
SELECT Id FROM Contact WHERE Id NOT IN (SELECT Id FROM Order__c WHERE
- A. Where Status__c = 'Fulfilled')
- B. WHERE Status__c = 'Fulfilled')
SELECT Contact__c FROM Order__c WHERE Id NOT IN (SELECT Id FROM Order__c - C. SELECT Id FROM Contact WHERE Id NOT IN (SELECT Contact__c FROM Order__c
- D. Status__c = 'Fulfilled')
SELECT Contact__c FROM Order__c WHERE Status__c <> 'Fulfilled'
Answer: A
NEW QUESTION 152
Choose the correct definition for <apex:actionSupport>.
- A. Sends an AJAX request according to the time interval you specify. If this ever gets re-rendered, it resets
- B. Adds AJAX support to another component (e.g. onClick, onMouseUp, onFocus, etc.)
- C. Signifies which components should be processed by the server when an AJAX request is generated
- D. Can be associated with an AJAX request (actionFunction/actionSupport/actionPoller) and shows content conditionally depending on the status of the request (in progress/complete). Use the "id" field to specify name; use "status" field on related components to connect them
- E. Allows for controller methods to be called directly from Javascript. Must be encapsulated in <apex:form> tags. Unlike actionSupport, these function<apex:actionPoller>s can be called directly from Javascript code
Answer: B
NEW QUESTION 153
A developer is writing a complex application involving triggers, workflow rules, Apex classes, and processes. The developer needs to carefully consider the order of execution when developing the application.
1. Before Triggers
2. After Triggers
3. Post commit logic such as sending email
4. DML committed to the database
5. Workflow rules
6. Roll-up summary calculations
In what order do the following operations execute?
- A. 1,2,4,5,6,3
- B. 1,5,6,2,4,3
- C. 1,6,5,2,4,3
- D. 1,2,5,6,4,3
Answer: D
NEW QUESTION 154
......
Exam Questions and Answers for PDII Study Guide Questions and Answers!: https://www.passsureexam.com/PDII-pass4sure-exam-dumps.html
Practice To PDII - PassSureExam Remarkable Practice On your Salesforce Certified Platform Developer II (PDII) Exam: https://drive.google.com/open?id=1zepkncWwTh_jGw6vE3oX1cMiCXgsQ-U2