Updated Oct-2023 Test Engine or PDF for the Salesforce PDII test to help you quickly prepare for the Salesforce exam!
Full PDII Practice Test and 177 unique questions with explanations waiting just for you, get it now!
NEW QUESTION # 14
A developer created a Lightning web component that uses a lightning-record-edit-form t collect information about Leads. Users complain that they only see one error message at a time about their input when trying to save a Lead record.
complain that they only see one error message at a time about their input when trying to save a Lead record.
What is the recommended approach to perform validations on more than one field, and display multiple error messages simultaneously?
with minimal JavaScript intervention?
- A. Validation rules
- B. External JavaScript library
- C. Apex trigger
- D. Try/catch/finally block
Answer: B
NEW QUESTION # 15
Universal Containers needs to integrate with a Heroku service that resizes product images submitted by users.
What are two alternatives to implement the integration and protect against malicious calls to Heroku app's endpoint? Choose 2 answers
- A. Create a trigger that uses an @future Apex HTTP callout passing JSON serialized data; therefore the Heroku app can automatically reply back to the callout with the resized images in Salesforce.
- B. Create a Workflow Rule with an Outbound Message allowing the Heroku app to automatically store the resized images in Salesforce.
- C. Create a Workflow Rule with an Outbound Message and select Send Session ID so that the Heroku app can use it to send the resized images back to Salesforce.
- D. Create a trigger that uses an @future Apex HTTP callout passing JSON serialized data and some form of pre-shared secret key. so that the Heroku app can authenticate requests and store the resized images in Salesforce.
Answer: B,C
NEW QUESTION # 16
Which type of controller is best suited when you want all of the basic DML functions from an object's normal new/edit page and want to include multiple records?
- A. Controller Extensions
- B. Standard Controller
- C. Standard List/Set Controller
- D. Custom Controller
Answer: C
Explanation:
Explanation/Reference:
NEW QUESTION # 17
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 wrii return a unique list of all the Contact records that have no Fulfilled Orders?
- A. SELECT iD FROM Contact WHERE id NOT IN (SELECT id From order_c WHERE_c = Fulfilled')
- B. SELECT Contact_c From order_c Where id NOT IN (SELECT id FROM_c Where States_c + Fulfilled')
- C. SELECT Contact_c FROM Order_c Where Status_c <> ;Fulfilled'
- D. SELECT id FROM Contact WHERE id NOT IN (SELECT Contact _c FROM order_c Where Status_c = fulfilled')
Answer: D
NEW QUESTION # 18
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. In Salesforce setup, look at the last modified date for every object to determine which should be added to the Change Set.
- B. Set up Continuous Integration and a Git repository to automatically merge all changes from the sandbox metadata with the production metadata.
- C. 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.
- D. 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.
Answer: D
NEW QUESTION # 19
Universal Containers wants to be able to bring up an Account detail page and view a table of containers currently being rented. The user wants to be able to dick on a container In the table and quickly edit and save the location of the container.
In addition to this, the page should have a section that shows the location of each container on a map. Universal Containers wants the map to re-render whenever the location of a container is changed.
What can a developer use to accomplish this task?
- A. Two Lightning Components leveraging Application Events
- B. A single visualforce Page leveraging Platform Events
- C. Two Visualforce Page Components leveraging Application Events
- D. Two Lightning Components leveraging Platform Events
Answer: A
NEW QUESTION # 20
Consider the following code snippet:
A developer needs to built an interactive Aura component that responds to the user's input by hiding or showing sections according the user preferences.
What are two best practices the developer can implement to hide or show the powerVserView and s-rar.daraVserView inner components, based on the value of the attribute isPowexUser?
Choose 2 answers
A)
B)
C)

- A. Option A
- B. Option D
- C. Option C
- D. Option B
Answer: D
NEW QUESTION # 21
Refer to the code snippet below:
When a Lightning web component is rendered, a list of opportunity that match certain criteria should be retrieved from the database and displayed to the end-user.
Which three considerations must the developer implement to make the fetchOpps method available within the Lightning web component?
- A. The fetchOpps method must specify the (cacheable =true) attribute
- B. The fetchOpps method cannot mutate the result set retrieved from the database.
- C. The fetchOpps method must be annotated with the @InvocableMethod annotation.
- D. The fecthOpps method must be annotated with the @ AuraEnabled annotation.
- E. The fetchOpps method must specify the (continustion-true) attribute
Answer: A,B,D
NEW QUESTION # 22
Which of the follow be used together in DML operations (transaction)? (Choose two.)
- A. Account - AccountShare
- B. Case - CaseComment
- C. Opportunity - User
- D. Account - Order
Answer: B,D
NEW QUESTION # 23
Which statement is true about scheduled Apex? Choose 3 answers
- A. Scheduled Apex only supports asynchronous callouts through the use of @future methods and Apex Batches.
- B. There is no limit on Scheduled Apex jobs because they are executed asynchronously
- C. Scheduled Apex classes can only be defined by extending the Schedule base class.
- D. The schedule of an Active scheduled Apex class cannot be updated through the Salesforce User Interface.
- E. Scheduled Apex is executed only when system resources are available.
Answer: A,D,E
NEW QUESTION # 24
Consider the following code snippet:
When the component is deployed, an error is reported.
Which two changes should the developer implement in the code to ensure the component deploys successfully?
Choose 2 answers
- A.

- B.

- C.

- D.

Answer: A,D
NEW QUESTION # 25
Refer to re code segment above.
When following best practices for writing Apex taggers, which two lots are wrong or cause for concern?
Choose 2 answers
- A. Line 11
- B. Line 16
- C. Line 20
- D. Line 6
Answer: C,D
NEW QUESTION # 26
The head of recruiting at Universal Containers wants to provide all internal users the ability to search for open positions by role, department, and location via a new recruiting app, In addition to search, users of the app should be able to refer a fried, apply for a position, and review the status of their current submissions. The app should be made available in Salesforce Mobile, but offline access is not required.
Given these requirements, what is the recommended approach to developer the app?
- A. Lightning Experience Builder
- B. Lightning Web Components
- C. Visualforce
- D. Salesforce SDK
Answer: D
NEW QUESTION # 27 
A developer receives complaints that the component loads slowly.
Which change can the developer implement to make the component perform faster?
- A. Move the contents of <c: concacclnfo into the component.
- B. Change the default for showContacrlnfo to
- C. Add a change event handler for showContactinfo
- D. Change the type of contactlnfo to "Map".
Answer: B
NEW QUESTION # 28
Assuming the CreateOneAccount class creates one account and implements the Queuetable interface, which syntax tests the Apex code?
- A.

- B.

- C.

- D.

Answer: D
NEW QUESTION # 29
A custom field Exec_Count_c of type Number is created on an Account object. An account record with value of "1" for a: Exec_Count_c is saved. A workflow field update is defined on the Exec_Count_c field, to increment its value every time an account record is created or updated. The following trigger is defined on the account: trigger ExecOrderTrigger on Account (before insert, before update, after insert, after update) { for (Account accountInstance: Trigger.New) { if (Trigger . isBefore) { accountInstance . Exec_Count_c +=l; System. debug (accountInstance . Exec_Count_c); } } } What is printed from the System.debug statement?
Output from System.debug in every iteration is separated with a delimiter.
- A. 2,2,3,3
- B. 1,2,3,3
- C. 2,2,4,4
- D. 1,2,3,4
Answer: C
NEW QUESTION # 30
An org has a requirement that an Account must always have one and only one Contact listed as Primary. So selecting one Contact will de-select any others. The client wants a checkbox on the Contact called 'Is Primary' to control this feature. The client also wants to ensure that the last name of every Contact is stored entirely in uppercase characters. What is the optimal way to implement these requirements?
- A. write a Validation Rule on the Contact for the Is Primary logic and a before update trigger on Contact for the last name logic.
- B. Write an after update trigger on Contact for the Is Primary logic and a separate before update trigger on Contact for the last name logic.
- C. write an after update trigger on Account for the Is Primary logic and a before update trigger on Contact for the last name logic.
- D. write a single trigger on Contact for both after update and before update and callout to helper classes to handle each set of logic.
Answer: D
NEW QUESTION # 31
Which of the following about Dynamic Apex is incorrect?
- A. You can retrieve the sObject type from an Id by calling .getSObjectTypeQ
- B. In dynamic SOQL, you can use bind variables and bind variable fields
- C. Schema.getGlobalDescribeQ gives you a map of all sObject
- D. getDescribe() can get you a variety of info on a particular object/field
Answer: B
Explanation:
Explanation
Explanation/Reference:
While you can use simple bind variables in dynamic SOQL, you cann|ot use bind variable fields
(e.g. :myVariable.field1_c)
Use escapeSingleQuotes to prevent SOQL injection
NEW QUESTION # 32
A developer has requirement to query three fields (id, name, Type) from an Account and first and last names for all Contacts associated with the Account.
Which option is the preferred optimized method to achieve this for the Account named 'Ozene Electronics'?
- A. List 1Contacts = new list ( );
for(Contact c ; 1Select firstname, lastname Account, Name Account,ID Account, Type from Contact where Account: Name=' electronics')) ( iContacts.add(c);) - B. List 1Accounts = (Select ID, Name, Type from Account Join (Select ID, firstname, lastname form Contact where contact account , name 'ozone electronics));
- C. Account a = (SELECT ID, Name, Type, (select contat,firstName, Contact,LastName from Account, Contacts) from Account where name; Ozone Electronic' Limit 1 );
- D. Account a = (SELECT ID, Name, Type from Account where name= Ozone Electronics;) list 1contacts = (SELECT firstname, lastname from Contacts where accountid=: a -ID0;
Answer: C
NEW QUESTION # 33
Given a list of Opportunity records named opportunityList, which code snippet is best for querying all Contacts of the Opportunity's Account?
List <Contact> contactList = new List <Contact>();
- A. for(Opportunity o : opportunityList){
Account a = [SELECT Id, (SELECT Id FROM Contacts) FROM Account WHERE Id
:o.AccountId]
contactList.addAll(a.Contacts);
)
List <Contact> contactList = new List <Contact>(); - B. Set <Id> accountIds = new Set <Id> ();
for (Opportunity o : opportunityList){
contactIds.add(o.ContactId);
}
for(Contact c : [SELECT Id FROM Contact WHERE Id IN :contactIds]){
contactList.add(c);
}
List <Contact> contactList = new List <Contact>(); - C. for ( Contact c : [SELECT Id FROM Contact WHERE AccountId IN
:opportunityList.AccountId] ){
contactList.add(c);
} - D. Set <Id> accountIds = new Set <Id> ();
for(Opportunity o : opportunityList){
accountIds.add(o.AccountId);
}
for(Account a : [SELECT Id, (SELECT Id FROM Contacts) FROM Account WHERE Id IN
:accountIds]){
contactList.addAll(a.Contacts);
}
List <Contact> contactList = new List <Contact>();
Answer: D
NEW QUESTION # 34
......
Get Latest PDII Dumps Exam Questions: https://drive.google.com/open?id=1Gzbx9y9rewkk61bNETDUK8R-aDPeMoYD
Full PDII Practice Test and 177 unique questions with explanations waiting just for you, get it now: https://www.pass4training.com/PDII-pass-exam-training.html

