New Year Special Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: scxmas70

PDII Exam Dumps - Salesforce Certified Platform Developer II (SU24)

Go to page:
Question # 33

Business rules require a Contact ta 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.

Use setSaverpoint (1) and rollback() with a try-catch block.

B.

Use the Database. Insect method with a11orNone SEL LO alee,

C.

Use the Database. Delete method if the Contact insertion fails.

D.

Disable validation rules on Contacts and set default values with a trigger.

Full Access
Question # 34

An environment has two Apex triggers: an after-update trigger on Account and an after-update trigger on Contact.

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 the Accounts and 10,000 Campaign Member records across the contacts.

What will happen when the mass update occurs?

A.

There will be no error and all updates will succeed, since the limit on the number of records processed by DML statements was not exceeded.

B.

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

C.

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

D.

The mass update will fail, since the two triggers fire in the same context, thus exceeding the number of records processed by DML statements.

Full Access
Question # 35

What is the correct way to fix this?

A.

Add Test.startTest() before and add Test. stopTest() after both Line 7 and Line 20 of the code.

B.

Add Test_startTest() before and add Test. stopTest() after Line 18 of the code.

C.

Use Limits.getlimitQueries() to find the total number of queries that can be issued.

D.

Change the DataFactory class to create fewer Accounts so that the number of queries in the trigger is reduced.

Full Access
Question # 36

Universal Containers wants to use a Customer Community with Customer Community Plus licenses to allow their customers access to track how many containers they have rented and when they are due back. Universal Containers uses a Private sharing model for External users, Many of their customers are multi-national corporations with complex Account hierarchies. Each account on the hierarchy represents a department within the same business,

One of the requirements is to allow certain community users within the same

Account hierarchy to see several departments’ containers, based on a custom

junction object that relates the Contact to the various Account records that

represent the departments.

Which solution solves these requirements?

A.

A Visualforce page that uses a custom controller that specifies without sharing [0 expose the records

B.

An Apex trigger that creates Apex managed sharing records based on the junction object's relationships

C.

A Lightning web component on the Community Home Page that uses Lightning Data Services.

D.

A custom list view on the junction object with filters that will show the proper records based on owner

Full Access
Question # 37

Refer to the test method below:

The test method calls an @future method that increments the

Number_of_Times_Viewed__c value. The assertion is failing because the

Number of Times Viewed_c equals 0.

What is the optimal way to fix this?

A.

Change the assertion to system.asserciquals (0, acctAfter Number _Cf_Timea_Viewed__c).

B.

Add Test.atartTeat() before and Teat.stopTest() after inser= acct.

C.

Add rest.staztTest() before and Test.stopTess() after AuditUcil.incrementViewed.

D.

Change the initialization to acct. Number_Of_Times_Viewed_c = 1.

Full Access
Question # 38

A developer needs to store variables to control the style and behavior of a Lightning Web Component.

Which feature can be used to ensure that the variables are testable in both Production and all Sandboxes?

A.

Custom setting

B.

Custom object

C.

Custom variable

D.

Custom metadata

Full Access
Question # 39

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)

A.

Option A

B.

Option B

C.

Option C

Full Access
Question # 40

Consider the queries in the options below and the following Information:

* For these queries, assume that there are more than 200,000 Account records.

* These records Include soft-deleted records; that is, deleted records that are still in the Recycle Bin.

* There are two fields that are marked as External Id on the

Account. These fields are customer_Number_c and ERR_Key_ s.

Which two queries are optimized for large data volumes?

Choose 2 answers

A.

SELECT I4 FROM Account WHERE Name !— NULL

B.

SELECT 1d FROM Accounts WHERE Name != '°

AND Customer_Number_c- "ValueA’

C.

SELECT ID FROM Account WHRE id IN :aListVariable

D.

SELECT Id FROM Account WHERE Name != ‘ ‘AND IsDeleted = false

Full Access
Go to page: