Month End Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

Pass the Salesforce Developers PDII Questions and answers with CertsForce

Viewing page 4 out of 5 pages
Viewing questions 31-40 out of questions
Questions # 31:

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


Expert Solution
Questions # 32:

Refer to the markup below:

HTML

<template>

record-id={recordId}

object-api-name="Account"

layout-type="Full">

</template>

A Lightning web component displays the Account name and two custom fields out of 275 that exist on the object. The custom fields are correctly declared and populated. However, the developer receives complain2223ts that the component performs slowly. What can the developer d2425o to improve the performance?

Options:

A.

Replace layout-type="Full" with fields={fields}.


B.

Add density="compact" to the component.


C.

Replace layout-type="Full" with layout-type="Partial".


D.

Add cache="true" to the component.


Expert Solution
Questions # 33:

Which three actions must be completed in a Lightning web component for a JavaScript file in a static resource to be loaded?

Options:

A.

Call loadScript.


B.

Import the static resource.


C.

Import a method from the platformResourceLoader.


D.

Reference the static resource in a <script> tag.


E.

Append the static resource to the DOM.


Expert Solution
Questions # 34:

A developer is writing a Jest test for a Lightning web component that conditionally displays child components based on a user’s checkbox selections. What should the developer do to properly test that the correct components display and hide for each scenario?

Options:

A.

Add a teardown block to reset the DOM after each test.9


B.

Create a new describe block for each test.10


C.

Create a new j.sdom instance for each test.11


D.

Reset the DOM after each test with the afterEach() method.12


Expert Solution
Questions # 35:

A developer is asked to build a solution that will automatically send an email to the customer when an Opportunity stage changes. The solution must scale to allow for 10,000 emails per day. The criteria to send the email should be evaluated after certain conditions are met. What is the optimal way to accomplish this?

Options:

A.

Use an Apex trigger with Batch Apex.


B.

Use an Email Alert with Flow Builder.


C.

Use MassEmailMessage() with an Apex trigger.


D.

Use SingleEmailMessage() with an Apex trigger.


Expert Solution
Questions # 36:

Consider the following code snippet:78

Java

trigger OpportunityTrigger on Opportunity (before insert, before update) {

for(Opportunity opp : Trigger.new){

OpportunityHandler.setPricingStructure(Opp);

}

}

public class OpportunityHandler{

public static void setPricingStructure(Opportunity thisOpp){

Pricing_Structure_c ps = [Select Type_c FROM Pricing_Structure_c WHERE industry_c = :thisOpp.Account_Industry_c];

thisOpp.Pricing_Structure_c = ps.Type_c;

update thisOpp;

}

}

Which two best practices should the developer implement to optimize this code?

Options:

A.

Remove the DML statement.


B.

Change the trigger context to after update, after insert.


C.

Query the Pricing_Structure_c records outside of the loop.


D.

Use a collection for the DML statement.


Expert Solution
Questions # 37:

A developer needs to implement a system audit feature that allows users, assigned to a custom profile named "Auditors", to perform searches against the historical records in the Account object. The developer must ensure the search is able to return history records that are between 6 and 12 months old. Given the code below, which select statement should be inserted as a valid way to retrieve the Account History records?4445

Java

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

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

// Insert SELECT statement here

Options:

A.

[SELECT AccountId, CreatedDate, Field, NewValue, OldValue FROM Account_History WHERE CreatedDate <= :initialDate AND CreatedDate <= :endDate];


B.

[SELECT AccountId, CreatedDate, Field, NewValue, OldValue FROM Account_History WHERE CreatedDate >= :endDate AND CreatedDate <= :initialDate];


C.

[SELECT AccountId, CreatedDate, Field, NewValue, OldValue FROM AccountHistory WHERE CreatedDate BETWEEN :initialDate AND :endDate];


D.

[SELECT AccountId, CreatedDate, Field, NewValue, OldValue FROM AccountHistory WHERE CreatedDate => :initialDate AND CreatedDate <= :endDate];


Expert Solution
Questions # 38:

A business currently has a labor-intensive process to manually upload orders from an external OMS. Accounts must be exported to get IDs to link the orders. Which two recommendations should make this process more efficient?

Options:

A.

Use the insert wizard in the Data Loader to import the data.


B.

Ensure the data in the file is sorted by the order ID.


C.

Use the upsert wizard in the Data Loader to import the data.


D.

Identify unique fields on Order and Account and set them as External IDs.


Expert Solution
Questions # 39:

A query using OR between a Date and a RecordType is performing poorly in a Large Data Volume environment. How can the developer optimize this?

Options:

A.

Break down the query into two individual queries and join the two result sets.


B.

Annotate the method with the @Future annotation.


C.

Use the Database.querySelector method to retrieve the accounts.


D.

Create a formula field to combine the CreatedDate and RecordType value, then filter based on the formula.


Expert Solution
Questions # 40:

After a platform event is defined in a Salesforce org, events can be published via which mechanism?

Options:

A.

External Apps require the standard Streaming API.


B.

Internal Apps can use outbound messages.


C.

External Apps use an API to publish event messages.


D.

Internal Apps can use entitlement processes.


Expert Solution
Viewing page 4 out of 5 pages
Viewing questions 31-40 out of questions