[Sep-2021] Pass Salesforce PDII Exam in First Attempt Guaranteed!
Full PDII Practice Test and 325 unique questions with explanations waiting just for you, get it now!
NEW QUESTION 44
If a developer wanted to display error messages with the standard Salesforce UI styling, what would they use?
- A. <apex:error>
- B. <apex:outputText>
- C. <apex:pageMessages>
- D. <apex:message>
Answer: C
Explanation:
Explanation/Reference:
NEW QUESTION 45
An integration user makes a successful login() call via the SOAP API. What can be used in the SOAP header to provide server authorization for subsequent API requests?
- A. Named Credentials
- B. OAuth access token
- C. Session ID
- D. Security token
Answer: C
NEW QUESTION 46
REST uses___________.
- A. All of the above
- B. The HTTP class
- C. The HTTPResponse class
- D. The HTTPRequest class
Answer: A
NEW QUESTION 47
What is the transaction limit on the number of "sendEmail" method calls?
- A. 0
- B. There is no limit
- C. 1
- D. 2
- E. 3
Answer: C
Explanation:
Explanation
Explanation/Reference:
Explanation:
The reserveEmailCapacity methods let you declare how many emails you want to send prior to actually sending, allowing you to handle limit errors prematurely
NEW QUESTION 48 
Consider the Apex controller above, that is called from a Lightning Aura Component.
What is wrong with it?
- A. Line 6: method must be static
- B. Line 1: class must be global
- C. Line 8: method must first serialize the list to JSON before returning
- D. Lines 1 and 6: class and method must be global
Answer: A
NEW QUESTION 49
What is a controller value that will NOT be saved in the viewstate of a Visualforce page? Choose 3 answers
- A. A variable of a type that is a collection of SObjects.
- B. A system-generated object such as a Schema Describe object.
- C. A variable of a type that is a custom Apex class.
- D. A variable declared with the Static keyword.
- E. A variable declared with the Transient keyword.
Answer: B,D,E
NEW QUESTION 50
A company uses a custom-built enterprise resource planning (ERP) system to handle order management. The company wants Sales Reps to know the status of orders so that if a customer calls to ask about their shipment, the Sales Rep can advise the customer about the order's status and tracking number if it is already shipped.
Which two methods can make this ERP order data visible in Salesforce? Choose 2 answers
- A. Have the ERP system push the data into Salesforce using the SOAP API.
- B. Use Salesforce Connect to view real-time Order data in the ERP system.
- C. Write a cron job In Salesforce to poll the ERP system for order updates.
- D. Ensure real-time order data is in Salesforce using the Streaming API.
Answer: B,D
NEW QUESTION 51
When developing a Visualforce page that will be used by a global organization that does business in many languages and many currencies, which feature should be used? (Choose three.)
- A. Custom Labels
- B. convertCurrency()
- C. getLocalCurrency()
- D. Global Labels
- E. Translation Workberic
Answer: A,B,E
NEW QUESTION 52
An org has a requirement that addresses on Contacts and Accounts should be normalized to a company standard by Apex code any time that they are saved.
What is the optimal way to implement this?
- A. Apex trigger on Contact that calls the Account trigger to normalize the address
- B. Apex trigger on Account and Account that call a helper class to normalize the address
- C. Apex trigger on Account that calls the Contact trigger to normalize the address
- D. Apex trigger on Account that and Account that normalized the address
Answer: B
NEW QUESTION 53
A custom Visualforce controller calls the ApexPages.addMessage() method, but no messages are rendering on the page. Which component should be added to the Visualforce page to display the message?
A)
B)
C)
D)
- A. Option D
- B. Option C
- C. Option A
- D. Option B
Answer: B
NEW QUESTION 54
Which of the following exceptions cannot be caught and will force an error? (Choose three.)
- A. AssertException
- B. DMLException
- C. LimitException
- D. License exceptions
- E. SObjectExceptions
- F. ListException
Answer: A,C,D
Explanation:
Explanation
Explanation/Reference:
Explanation:
SObjectException occurs when accessing a field not queried, or you try to change a field during the wrong dml statement (i.e. an edit-only field being set on insert) Custom exceptions must extend the "Exception" class
NEW QUESTION 55
The Contact object has a custom field called "Zone." Its data type is "Text" and field length is 3.
What is the outcome after executing the following code snippet in the org?
List<Contact> contactsToBeInserted=new List<Contact>(); Contact
contactInstance= new Contact(LastName='Smith', Department='Tech',
Zone_c='IAD'); contactsToBeInserted.add(contactInstance); contactInstance= new Contact(LastName='Sm1th', Department='Tech', Zone_c='PITT'); contactsToBeInserted.add(contactInstance); Database.insert (contactsToBeInserted,true);
- A. Both inserts succeed and the contact record that has the Zone value of 'PITT' is truncated
- B. A partial insert succeeds and the contact record that has the Zone value 'IAD' is inserted
- C. Both inserts succeed and the contact record that has the Zone value of 'PI'I'I' is set to NULL
- D. An unhandled DML exception is thrown and no contact records are inserted
Answer: D
NEW QUESTION 56
A Lightning Component functions in preview mode and needs to be used inside a Lightning App Builder page, but it is not available. What change should be applied to the component?
- A. Refresh the sandbox and upgrade it to the latest API version.
- B. Look for errors in the logic in the JavaScript controller.
- C. Delete the component, metadata, and Apex controller and recreate them.
- D. Expose it in the markup using the implements and access attributes.
Answer: D
NEW QUESTION 57
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. Use the getSObjectTypeQ method in an Apex class.
- B. Create a design attribute and configure via App builder.
- C. Add force:hasSobjectName to the implements.
- D. Set the sObject type as a component attribute.
Answer: C
NEW QUESTION 58
When developing a Visualforce page that will be used by a global organization that does business in many languages and many currencies, which feature should be used? Choose 3 answers
- A. Translation Workbench
- B. Custom Labels
- C. GetLocalCurrency()
- D. ConvertCurrency()
- E. Global Labels
Answer: A,B,D
NEW QUESTION 59
A developer needs test data for Apex test classes.
What can the developer use to provide test data to the test methods? (Choose two.)
- A. myDataFactory.createTestRecords (10)
- B. List<sObject> Is = Test.loadData (Lead.sObjectType, 'myTestLeads');
- C. List<sObject> Is = Test.loadDat (Lead.sObjectType, $Resource + 'myTestLeads');
- D. Database.createTestRecords (10)
Answer: A,B
NEW QUESTION 60
A company recently deployed a Visualforce page with a custom controller that has a data grid of information about Opportunities in the org.
Users report that they receive a ''Maximum view state size limit'' error message under certain conditions.
According to Visualforce best practice, which three actions should the developer take to reduce the view state?
Choose 3 answers
- A. Refine any SQQL queries to return only data relevant to the page.
- B. Use the final keyword In the controller for variables that will not change.
- C. Use filters and pagination to reduce the amount of data.
- D. Use the private keyword in the controller for variables
- E. Use the transient keyword in the Apex controller for variables that do not maintain state.
Answer: A,C,E
NEW QUESTION 61
A customer has a single Visualforce page that allows each user to input up to 1500 sales forecasts and instantly view pivoted forecast calculations. Users are complaining that the page is loading slowly, and they are seeing error messages regarding heap and view state limits.
What are three recommendations to optimize page performance? (Choose three.)
- A. Specify the list of sales forecasts as transient
- B. Use JavaScript Remoting instead of controller actions
- C. Create formula fields to compute pivoted forecast calculations
- D. Segregate calculation functionality from input functionality
- E. Implement pagination and reduce records per page
Answer: B,D,E
NEW QUESTION 62
......
Prepare for your Salesforce certification with the updated Real4dumps PDII exam questions: https://drive.google.com/open?id=1S7oDRS6_81CQLZ7sN-vefUbeA1cgj9us
Get Latest PDII Dumps Exam Questions in here: https://www.real4dumps.com/PDII_examcollection.html

