Winter Special Sale - Limited Time 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 575363r9

Welcome To DumpsPedia

PDII Sample Questions Answers

Questions 4

A developer is responsible for formulating the deployment process for a Salesforce project. The project follows a source-driven development approach, and the developer wants to ensure efficient deployment and version control of the metadata changes. Which tool or mechanism should be utilized for managing the source-driven deployment process?78

Options:

A.

Data Loader910

B.

Change Sets1112

C.

Salesforce CLI with Salesforce DX1314

D.

Unmanaged Packages1516

Buy Now
Questions 5

A company notices that their unit tests in a test class with many methods to create many records for prerequisite reference data are slow. What can a developer do to address the issue?

Options:

A.

Turn off triggers, flows, and validations when running tests.

B.

Move the prerequisite reference data setup to the constructor for the test class.

C.

Move the prerequisite reference data setup to a @testSetup method in the test class.

D.

Move the prerequisite reference data setup to a TestDataFactory and call that from each test method.

Buy Now
Questions 6

A company needs to automatically delete sensitive information after seven years. This could delete almost a million records every day. How can this be achieved?

Options:

A.

Schedule an @future process to query records older than seven years, and then recursively invoke itself in 1,000 record batches to delete them.

B.

Use aggregate functions to query for records older than seven years, and then delete the AggregateResult objects.

C.

Perform a SOSL statement to find records older than 7 years, and then delete the entire result set.

D.

Schedule a batch Apex process to run every day that queries and deletes records older than seven years.

Buy Now
Questions 7

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

Buy Now
Questions 8

A company wants to track revenue through a related object. They need to perform a one-time seeding of data for roughly 100,000 Opportunities, creating Revenue records based on complex logic. What is the optimal way to automate this?

Options:

A.

Use Database.executeBatch() to invoke a Database.Batchable class.

B.

Use System.enqueueJob() to invoke a Queueable class.

C.

Use Database.executeBatch() to invoke a Queueable class.

D.

Use System.scheduleJob() to schedule a Database.Scheduleable class.

Buy Now
Questions 9

The test method calls an @future method that increments a value. The assertion is failing because the value equals 0. What is the optimal way to fix this?

Java

@isTest

static void testIncrement() {

Account acct = new Account(Name = 'Test', Number_Of_Times_Viewed__c = 0);

insert acct;

AuditUtil.incrementViewed(acct.Id); // This is the @future method

Account acctAfter = [SELECT Number_Of_Times_Viewed__c FROM Account WHERE Id = :acct.Id][0];

System.assertEquals(1, acctAfter.Number_Of_Times_Viewed__c);

}

Options:

A.

Change the assertion to System.assertEquals(0, acctAfter.Number_Of_Times_Viewed__c).

B.

Add Test.startTest() before and Test.stopTest() after insert acct.

C.

Change the initialization to acct.Number_Of_Times_Viewed__c = 1.

D.

Add Test.startTest() before and Test.stopTest() after AuditUtil.incrementViewed.

Buy Now
Questions 10

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

Buy Now
Questions 11

A developer created a class that implements the Queueable Interface, as follows:

Java

public class without sharing OrderQueueableJob implements Queueable {

public void execute(QueueableContext context) {

// implementation logic

System.enqueueJob(new FollowUpJob());

}

}

As part of the deployment process, the developer is asked to create a corresponding test class. Which two actions should the developer take to successfully execute the test class?1

Options:

A.

Implement seeAllData=true to ensure the Queueable job is able to run in bulk mode.2

B.

Implement Te3st.isRunningTest() to prevent chaining jobs during test execution.

C.

Ensure the running user of the test class has, at least, the View All permission on the Order object.

D.

Enclose System.enqueueJob(new OrderQueueableJob()) within Test.startTest and Test.stopTest().

Buy Now
Questions 12

A developer is trying to decide between creating a Visualforce component or a Lightning component. Which scenario necessitates the use of Visualforce?

Options:

A.

Does the screen need to be rendered as a PDF without using a third-party application?

B.

(Option Not Provided in Context)

C.

Will the screen make use of a JavaScript framework?

D.

(Matches Option A in context of question logic)

Buy Now
Questions 13

Consider the following code snippet:

HTML

How should the component communicate to the component that an order has been selected by the user?

Options:

A.

Create and dispatch a custom event.

B.

Create and fire a component event.

C.

Create and fire an application event.

D.

Create and fire a standard DOM event.

Buy Now
Questions 14

Refer to the code snippet below:

Java

public static void updateCreditMemo(String customerId, Decimal newAmount){

List toUpdate = new List();

for(Credit_Memo__c creditMemo : [Select Id, Name, Amount__c FROM Credit_Memo__c WHERE Customer_Id__c = :customerId LIMIT 50]) {

creditMemo.Amount__c = newAmount;

toUpdate.add(creditMemo);

}

Database.update(toUpdate,false);

}

A custom object called Credit_Memo__c exists in a Salesforce environment. As part of a new feature development, the developer needs to ensure race conditions are prevented when a set of records are mod1ified within an Apex transaction. In the preceding Apex code, how can the developer alter the que2ry statement to use SOQL features to prevent race conditions within a tr3ansaction?4

Options:

A.

[Select Id, Name, Amount__c FROM Credit_Memo__c WHERE Customer_Id__c = :customerId LIMIT 50 FOR UPDATE]

B.

[Select Id, Name, Amount__c FROM Credit_Memo__c WHERE Customer_Id__c = :customerId USING SCOPE LIMIT 50]

C.

[Select Id, Name, Amount__c FROM Credit_Memo__c WHERE Customer_Id__c = :customerId LIMIT 50 FOR REFERENCE]

D.

[Select Id, Name, Amount__c FROM Credit_Memo__c WHERE Customer_Id__c = :customerId LIMIT 50 FOR VIEW]

Buy Now
Questions 15

A developer is asked to find a way to store secret data with an ability to specify which profiles and users can access which secrets. What should be used to store this data?

Options:

A.

Static resources

B.

Custom metadata

C.

Custom settings

D.

System.Cookie class

Buy Now
Questions 16

A company wants to incorporate a third-party web service to set the Address fields when an Account is inserted, if they have not already been set. What is the optimal way to achieve this?

Options:

A.

Create a Before Save Flow, execute a Queueable job from it, and make a callout from the Queueable job.

B.

Create an Apex class, execute a Batch Apex job from it, and make a callout from the Batch Apex job.

C.

Create an Apex trigger, execute a Queueable job from it, and make a callout from the Queueable job.

D.

Create an Apex class, execute a Future method from it, and make a callout from the Future method.

Buy Now
Questions 17

Refer to the component code and requirements below:

HTML

{!v.account.Name}

{!v.account.AccountNumber}

{!v.account.Industry}

Requirements:

    For mobile devices, the information should display in three rows.

    For desktops and tablets, the information should display in a single row.

Requirement 2 is not displaying as desired. Which option has the correct component code to meet the requirements for desktops an7d tablets?

Options:

A.

HTML

{!v.account.Name}

{!v.account.AccountNumber}

{!v.account.Industry}

B.

1213

C.

1415

HTML

{!v.account.Name}

{!v.account.AccountNumber}

{!v.account.Industry}

D.

HTML

{!v.account.Name}

{!v.account.AccountNumber}

{!v.account.Industry}

Buy Now
Questions 18

A developer is asked to develop a new AppExchange application. A feature creates Survey records when a Case reaches a certain stage. This needs to be configurable, as different Salesforce instances require Surveys at different times. Additionally, the app needs to come with a set of best practice settings. What should the developer use to store and package the custom configuration settings for the app?

Options:

A.

Custom settings

B.

Custom objects

C.

Custom metadata

D.

Custom labels

Buy Now
Questions 19

A Salesforce developer is hired by a multi-national company to build a custom Lightning application that shows employees their employment benefits and earned commissions over time. The application must acknowledge and respect the user's locale context for dates, times, numbers, currency, and currency symbols. When using Aura components, which approach should the developer implement to ensure the Lightning application complies with the user's locale?3

Options:

A.

Use the $User global variable to retrieve the user preferences.4

B.

Create a Hierarchical custom setting to store user preferences.5

C.

Use the $Locale value provider to retrieve the user preferences.67

D.

Use the $Label global value provider.89

Buy Now
Questions 20

Refer to the code below:

Lightning Web Component JS file

JavaScript

import {LightningElement} from 'lwc';

import serverEcho from '@salesforce/apex/SimpleServerSideController.serverEcho';

export default class Helloworld extends LightningElement {

firstName = 'world';

handleClick() {

serverEcho({

firstName: this.firstName

})

.then((result) => {

alert('From server: ' + result);

})

.catch((error) => {

console.error(error);

});

}

}

Apex Controller

Java

public with sharing class SimpleServerSideController {

@AuraEnabled

public static String serverEcho(sObject firstName) {

String firstNameStr = (String)firstName.get('firstName');

return ('Hello from the server, ' + firstNameStr);

}

}

Given the code above, which two changes need to be made in the Apex Controller for the code to work?

Options:

A.

Annotate the entire class as @AuraEnabled instead of just the single method.

B.

Change the argument in the Apex Controller line 05 from sObject to String.

C.

Remove line 06 from the Apex Controller and instead use firstName in the return on line 07.

D.

Change the method signature to be global static, not public static.

Buy Now
Questions 21

Consider the following code snippet:

HTML

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 tag.1718

B.

Implement the tag with immediate = true.

C.

Ensure the action method search returns null.19

D.

Implement the reRender attribute on the tag.

Buy Now
Questions 22

Universal Containers decided to use Salesforce to manage a new hire interview process. A custom object called Candidate was created with organization-wide defaults set to Private. A lookup on the Candidate object sets an employee as an Interviewer. What should be used to automatically give Read access to the record when the lookup field is set to the Interviewer user?12345

Options:

A.

The record can be shared using an Apex class.678910

B.

The record can be shared using a permission set.1112131415

C.

The record can be shared using a sharing rule.1617181920

D.

The record cannot be shared with the current setup.2122232425

Buy Now
Questions 23

Business rules require a Contact to 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?

Options:

A.

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

B.

Use a Database Savepoint method with a try-catch block.

C.

Use the Database.Insert method with allOrNone set to false.

D.

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

Buy Now
Questions 24

Which code snippet processes records in the most memory efficient manner, avoiding governor limits such as "Apex heap size too large"?

Options:

A.

Java

Map opportunities = new Map([SELECT Id, Amount from Opportunity]);

for(Id oppId: opportunities.keySet()){

// perform operation here

}

B.

Java

for(Opportunity opp: [SELECT Id, Amount from Opportunity]){

// perform operation here

}

C.

Java

List opportunities = Database.query('SELECT Id, Amount from Opportunity');

for(Opportunity opp: opportunities){

// perform operation here

}

D.

Java

List opportunities = [SELECT Id, Amount from Opportunity];

for(Opportunity opp: opportunities){

// perform operation here

}

Buy Now
Questions 25

An org records customer order information in a custom object, Order__c, that has fields for the shipping address. A developer is tasked with adding code to calculate shipping charges on an order, based on a flat percentage rate associated with the region of the shipping address. What should the developer use to store the rates by region, so that when the changes are deployed to production no additional steps are needed for the calculation to work?3132

Options:

A.

Custom metadata type3334

B.

Custom list setting3536

C.

Custom object3738

D.

Custom hierarchy setting3940

Buy Now
Questions 26

A developer created and tested a Visualforce page in their developer sandbox, but now receives reports that users encounter "View State" errors when using it in production. What should the developer ensure to correct these errors?

Options:

A.

Ensure profiles have access to the Visualforce page.

B.

Ensure properties are marked as private.

C.

Ensure variables are marked as transient.12

D.

Ensure queries do not exceed governor limits.34

Buy Now
Questions 27

A developer needs a Lightning web component to display in one column on phones and two columns on tablets/desktops. Which should the developer add to the code?

Options:

A.

Add size="12" medium-device-size="6" to the elements

B.

Add size="6" small-device-size="12" to the elements

C.

Add small-device-size="12" to the elements

D.

Add medium-device-size="6" to the elements

Buy Now
Questions 28

Universal Containers needs to integrate with their own, existing, internal custom web application. The web application accepts JSON payloads, resizes product images, and sends the resized images back to Salesforce. What should the developer use to implement this integration?

Options:

A.

An Apex trigger that calls an @future method that allows callouts910

B.

A flow that calls an @future method that allows callouts1112

C.

A flow with an outbound message that contains a session ID1314

D.

A platform event that makes a callout to the web application1516

Buy Now
Questions 29

When developing a Lightning web component, which setting displays lightning-layout items in one column on small devices, such as mobile phones, and in two columns on tablet-size and desktop-size screens?

Options:

A.

Set size="12" tablet-device-size="6"

B.

Set size="6" small-device-size="12"

C.

Set size="12" medium-device-size="6"

D.

Set size="12" mobile-device-size="12"

Buy Now
Questions 30

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?

Options:

A.

Custom metadata

B.

Custom object

C.

Custom setting

D.

Custom variable

Buy Now
Questions 31

Universal Containers wants to develop a recruiting app for iOS and Android via the standard Salesforce mobile app. It has a custom user interface design and offline access is not required. What is the recommended approach to develop the app?

Options:

A.

Salesforce SDK

B.

Lightning Web Components

C.

Lightning Experience Builder

D.

Visualforce

Buy Now
Questions 32

Which statement is considered a best practice for writing bulk safe Apex triggers?

Options:

A.

Add LIMIT 50000 to every SOQL statement.

B.

Add records to collections and perform DML operations against these collections.

C.

Use the Database methods with allOrNone set to false instead of DML statements.

D.

Perform all DML operations from within a future method.

Buy Now
Questions 33

A developer is working with existing functionality that tracks how many times a stage has changed for an Opportunity. When the Opportunity's stage is changed, a workflow rule is fired to increase the value of a field by one. The developer wrote an after trigger to create a child record when the field changes from 4 to 5. A user changes the stage of an Opportunity and manually sets the count field to 4. The count field updates to 5, but the child record is not created. What is the reason this is happening?

Options:

A.

After triggers fire before workflow rules.

B.

Trigger.new does not change after a field update.

C.

Trigger.old does not contain the updated value of the count field.

D.

After triggers are not fired after field updates.

Buy Now
Questions 34

As part of a custom interface, a developer team creates various new Lightning web components. Each of the components handles errors using toast messages. During acceptance testing, users complain about the long chain of toast messages that display when errors occur loading the components. Which two techniques should the developer implement to improve the user experience?

Options:

A.

Use a Lightning web component to aggregate and display all errors.

B.

Use the window.alert() method to display the error messages.23

C.

Use a