Spring Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code = simple70

Pass the Salesforce Developers PDII Questions and answers with Dumpstech

Exam PDII Premium Access

View all detail and faqs for the PDII exam

Practice at least 50% of the questions to maximize your chances of passing.
Viewing page 2 out of 5 pages
Viewing questions 11-20 out of questions
Questions # 11:

A developer built an Aura component for guests to self-register upon arrival at a front desk kiosk. Now the developer needs to create a component for the utility tray to alert users whenever a guest arrives at the front desk. What should be used?

Options:

A.

DML Operation

B.

ChangeLog

C.

Application Event

D.

Component Event16

Questions # 12:

A developer created a Lightning web component that allows users to input a text value that is used to search for Accounts by calling an Apex method. The Apex method returns a list of AccountWrappers and is called imperatively from a JavaScript event handler.

Java

01: public class AccountSearcher {

02:

03: public static List search(String term) {

04: List wrappers = getMatchingAccountWrappers(term);

05: return wrappers;

06: }

07:

08:

09: public class AccountWrapper {

10: public Account account { get; set; }

11: public Decimal matchProbability { get; set; }

12: }

13: // ...other methods, including getMatchingAccountWrappers implementation...

14: }

Which two changes should the developer make so the Apex method functions correctly?

Options:

A.

Add @AuraEnabled to line 01.

B.

Add @AuraEnabled to line 09.

C.

Add @AuraEnabled to lines 10 and 11.

D.

Add @AuraEnabled to line 03.

Questions # 13:

The Account after-update trigger fires whenever an Account's address is updated, and it updates every associated Contact with that address. The Contact after-update trigger fires on every edit, and it updates every Campaign Member record related to the Contact with the Contact's state. Consider the following: A mass update of 200 Account records' addresses, where each Account has 50 Contacts. Each Contact has one Campaign Member. This means there are 10,000 Contact records across th23e Accounts and 10,000 Campaign Member records across the contacts. What will happen when the mass update occurs?24252627

Options:

A.

The mass update of Account address 28will succeed, but the Contact address updates wil29l fail due to exceeding number of records processed by DML statements.3031

B.

There will be no32 error, since each trigger fires 33within its own context and each trigger does not exceed the limit of the number of records processed by DML statements.34

C.

The mass update will fail, since the two triggers fire in the same35 context, thus exceeding the number of records.36

Questions # 14:

A company has reference data stored in multiple custom metadata records that represent default information and delete behavior for certain geographic regions. When a contact is inserted, the default information should be set. Additionally, if a user attempts to delete a contact that belongs to a flagged region, the user must get an error message. Depending on company personnel resources, what are two ways to automate this?19

Options:

A.

Apex trigger

B.

Remote action

C.

Flow Builder

D.

Apex invocable method

Questions # 15:

Which select statement should be inserted to retrieve Tasks ranging from 12 to 24 months old, including archived tasks, and excluding deleted ones?

Java

Date initialDate = System.Today().addMonths(-24);

Date endDate = System.Today().addMonths(-12);

Options:

A.

[SELECT ... FROM Task WHERE What.Type = 'Account' AND isArchived=true AND CreatedDate => :initialDate ...]

B.

[SELECT ... FROM Task WHERE What.Type = 'Account' AND CreatedDate => :initialDate ... ALL ROWS]

C.

[SELECT ... FROM Task WHERE What.Type = 'Account' AND isDeleted=false AND CreatedDate => :initialDate ... ALL ROWS]

D.

[SELECT ... FROM Task WHERE What.Type = 'Account' AND isArchived=true AND CreatedDate => :initialDate ... ALL ROWS]

Questions # 16:

Consider the Apex controller below, that is called from an Aura component:

Line 5 @AuraEnabled

Line 6 public List getStringArray() {

Line 7 String[] arrayltems = new String[]{ 'red', 'green', 'blue' };

Line 8 return arrayltems;

Line 9 }

Line 10}

What is wrong with this code?

Options:

A.

Lines 1 and 6: class and method must be global

B.

Line 1: class must be global

C.

Line 6: method must be static

D.

Line 8: method must first serialize the list to JSON before returning

Questions # 17:

A company's support process dictates that any time a case is closed with a status of 'Could not fix,' an Engineering Review custom object record should be created and populated with information from the case, the contact, and any of the products associated with the case. What is the correct way to automate this using an Apex trigger?12

Options:

A.

A before update trigger on Case that creates the Engineering Review record and inserts it3456

B.

An after upset trigger on Case that creates the Engineering Review record and ins7erts it8910

C.

11 A before upset trigger on Case that creates the Engineering Review record and inserts it1213

D.

An after update trigger14 on Ca15se that creates the Engineering Review record and inserts it

Questions # 18:

A developer created an Apex class that updates an Account based on input from a Lightning web component. The update to the Account should only be made if it has not already been registered.

Java

account = [SELECT Id, Is_Registered__c FROM Account WHERE Id = :accountId];

if (!account.Is_Registered__c) {

account.Is_Registered__c = true;

// ...set other account fields...

update account;

}

What should the developer do to ensure that users do not overwrite each other’s updates to the same Account if they make updates at the same time?

Options:

A.

Add a try/catch block around the update.

B.

Use upsert instead of update.

C.

Use FOR UPDATE in the SOQL query.

D.

Include LastModifiedDate in the query to make sure it wasn’t recently updated.

Questions # 19:

Consider the following code snippet:

HTML

<apex:page docType="html-5.0" controller="FindOpportunities">

<apex:form >

<apex:pageBlock >

<apex:pageBlockSection title="find opportunity">

<apex:input label="opportunity name"/>

<apex:commandButton value="search" action="{!search}"/>

</apex:pageBlockSection>

<apex:pageBlockSection title="Opportunity List" id="opportunityList">

</apex:pageBlockSection>

</apex:pageBlock>

</apex:form>

</apex:page>

Users of this Visualforce page complain that the page does a full refresh every time the Search button is pressed. What should the developer do to ensure that a partial refresh is made so that only t13he section identified with opportunityList is re-drawn on the screen?1415

Options:

A.

Enclose the DAT16A table within the <apex:actionRegion> tag.1718

B.

Implement the <apex:actionFunction> tag with immediate = true.

C.

Ensure the action method search returns null.19

D.

Implement the reRender attribute on the <apex:commandButton> tag.

Questions # 20:

Universal Containers develops a Visualforce page that requires the inclusion of external JavaScript and CSS files. They want to ensure efficient loading and caching of the page. Which feature should be utilized to achieve this goal?

Options:

A.

Static resources

B.

@RemoteAction

C.

<apex:pageBlockTable>

D.

<apex:actionFunction>

Viewing page 2 out of 5 pages
Viewing questions 11-20 out of questions