Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: dpm65

PDI Questions and Answers

Question # 4

A developer has an integer variable called maxAttempts. The developer meeds to ensure that once maxAttempts is initialized, it preserves its value for the lenght of the Apex transaction; while being able to share the variable's state between trigger executions. How should the developer declare maxAttempts to meet these requirements?

A.

Declare maxattempts as a member variable on the trigger definition.

B.

Declare maxattempts as a private static variable on a helper class

C.

Declare maxattempts as a constant using the static and final keywords

D.

Declare maxattempts as a variable on a helper class

Full Access
Question # 5

Which standard field is required when creating a new contact record?

A.

LastName

B.

Name

C.

AccountId

D.

FirstName

Full Access
Question # 6

Universal Containers wants Opportunities to no longer be editable when reaching the Closed/Won stage.

How should a developer accomplish this?

A.

Use a validation rule.

B.

Use the Process Automation settings.

C.

Use Flow Builder.

D.

Mark fields as read-only on the page layout.

Full Access
Question # 7

What can used to delete components from production?

A.

A change set deployment with the delete option checked

B.

An ant migration tool deployment with destructivechanges xml file and the components to delete in the package .xml file

C.

A change set deployment with a destructivechanges XML file

D.

An ant migration tool deployment with a destructivechanges XML file and an empty package .xml file

Full Access
Question # 8

A developer created a trigger on the Account object and wants to test if the trigger is properly bulklfield. The developer team decided that the trigger should be tested with 200 account records with unique names.

What two things should be done to create the test data within the unit test with the least amount of code? Choose 2 answers

A developer created a trigger on the Account object and wants to test if the trigger is properly bulklfield. The developer team decided that the trigger should be tested with 200 account records with unique names.

What two things should be done to create the test data within the unit test with the least amount of code?

Choose 2 answers

A.

Use the @isTest(isParallel=true) annotation in the test class.

B.

Use Test.loadData to populate data in your test methods.

C.

Use the @isTest(seeAllData=true) annotation in the test class.

D.

Create a static resource containing test data.

Full Access
Question # 9

Application Events follow the traditional publish-subscribe model. Which method is used to fire an event?

A.

Fire()

B.

Emit()

C.

RegisterEvent()

D.

FireEvent()

Full Access
Question # 10

An org has an existing Visual Flow that creates an Opportunity with an Update records element. A developer must update the Visual Flow also created a Contact and store the created Contact's ID on the Opportunity.

A.

Add a new Get Records element.

B.

Add a new Create records element.

C.

Add a new Quick Action (of type create) element.

D.

Add a new Update records element

Full Access
Question # 11

Which exception type cannot be caught?

A Custom Exception

B. CalloutException

C. LimitException

D. NoAccessException

Full Access
Question # 12

How can a developer check the test coverage of active Process Builder and Flows deploying them in a Changing Set?

A.

Use the Flow properties page.

B.

Use the code Coverage Setup page

C.

Use the Apex testresult class

D.

Use SOQL and the Tooling API

Full Access
Question # 13

A developer is creating a page that allows users to create multiple Opportunities. The developer is asked to verify the current user's default } |

Opportunity record type, and set certain default values based on the record type before inserting the record. i, J

Calculator

How can the developer find the current user's default record type? ns

A.

Query the Profile where the ID equals userInfo.getProfileID() and then use the profile.Opportunity.getDefaultRecordType() | |

method. ] |

B.

Use Opportunity. SObjectType.getDescribe().getRecordTypelnfos() to get a list of record types, and iterate through them until [ J

isDefaultRecordTypeMapping() is true. Pencil & Paper |

C.

Use the Schema.userlnfo.Opportunity.getDefaultRecordType() method. <

Create the opportunity and check the opportunity.recordType before inserting, which will have the record ID of the current Dal

user's default record type.

Full Access
Question # 14

A credit card company needs to Implement the functionality for a service agent to process damaged credit cards. When the customers call In, the service agent must gather many pieces of information Is tasked to Implement this functionality.

What should the developer use to satisfy this requirement In the most efficient manner?

A.

Flow Builder

B.

Lightning Component

C.

Approval Process

D.

Apex Trigger

Full Access
Question # 15

A Salesforce developer wants to review their code changes immediately and does not want to install anything on their computer or on the org.

Which tool is best suited?

A.

Developer Console

B.

Salesforce Extension for VSCode

C.

Setup Menu

D.

Third-party apps from App Exchange

Full Access
Question # 16

What is a benefit of developing applications in a multi-tenant environment?

A.

Enforced best practices for development

B.

Access to predefined computing resources

C.

Unlimited processing power and memory

D.

Default out-of-the-box configuration

Full Access
Question # 17

Universal container wants a list button to display a visualforce page that allows users to edit multiple records which visualforce feature supports this requirement.

A.

Recordsetvar page attribute

Full Access
Question # 18

What will be the output in the debug log in the event of a QueryExeption during a call to the @query method in the following Example?

A.

Querying Accounts. Query Exception.

B.

Querying Accounts. Custom Exception.

C.

Querying Accounts. Query Exception. Done

D.

Querying Accounts. Custom Exception Done.

Full Access
Question # 19

Universal Container is building a recruiting app with an Applicant object that stores information about an individual person that represents a job. Each application may apply for more than one job.

What should a developer implement to represent that an applicant has applied for a job?

A.

Master-detail field from Applicant to Job

B.

Formula field on Applicant that references Job

C.

Junction object between Applicant and Job

D.

Lookup field from Applicant to Job

Full Access
Question # 20

developer created this Apex trigger that calls MyClass .myStaticMethod:

trigger myTrigger on Contact(before insert) ( MyClass.myStaticMethod(trigger.new, trigger.oldMap); }

The developer creates a test class with a test method that calls MyClass.mystaticMethod, resulting in 81% overall code coverage. What happens when the developer tries to deploy the trigger and two classes to production, assuming no other code exist?

A.

The deployment fails because the Apex trigger has no code coverage.

B.

The deployment fails because no assertions were made in the test method.

C.

The deployment passes because the Apex code has required (>75%) code coverage.

D.

The deployment passes because both classes and the trigger were included in the deployment.

Full Access
Question # 21

A developer has a VF page and custom controller to save Account records. The developer

wants to display any validation rule violation to the user. How can the developer make sure

that validation rule violations are displayed?

A.

Add custom controller attributes to display the message.

B.

Include on the Visualforce page.

C.

Use a try/catch with a custom exception class.

D.

Perform the DML using the Database.upsert() method

Full Access
Question # 22

When a user edits the Postal Code on an Account, a custom Account text field named "Timezone" must be update based on the values in a PostalCodeToTimezone__c custom object. How should a developer implement this feature?

A.

Build an Account Assignment Rule.

B.

Build an Account custom Trigger.

C.

Build an account Approval Process

D.

Build an Account Workflow Rule.

Full Access
Question # 23

A developer needs to join data received from an integration with an external system with parent records in Salesforce. The data set does not contain the Salesforce IDs of the parent records, but it does have a foreign key attribute that can be used to identify the parent.

Which action will allow the developer to relate records in the data model without knowing the Salesforce ID?

A.

Create a custom field on the child object of type Foreign Key

B.

Create and populate a custom field on the parent object marked as Unique

C.

Create and populate a custom field on the parent object marked as an External ID.

D.

Create a custom field on the child object of type External Relationship.

Full Access
Question # 24

Which two conditions cause workflow rules to fire? Choose 2 answers

A.

Changing the territory assignments of accounts and opportunities

B.

Updating records using the bulk API

C.

Converting leads to person accounts

D.

An Apex Batch process that changes field values

Full Access
Question # 25

The orderHelper class is a utility class that contains business logic for processing orders. Consider the following code snippet:

A developer needs to create a constant named DELIVERY_MULTIFILTER with a value of 4.15. The value of the constant should not change at any time in the code.

How should the developer declare the DELIVERY_MULTIFILTER constant to meet the business objectives?

A.

Decimal DELIVERY_MULTIFILTER = 4.15;

B.

Static final decimal DELIVERY_MULTIFILTER = 4.15;

C.

Static decimal DELIVERY_MULTIFILTER = 4.15;

D.

Constant decimal DELIVERY_MULTIFILTER = 4.15;

Full Access
Question # 26

Which three per-transaction limits have higher governor limits in asynchronous Apex transactions?

A.

Maximum CPU time

B.

Maximum heap size

C.

Total SOQL queries

D.

Maximum execution time

E.

Records returned by SOQL

Full Access
Question # 27

Which scenario is valid for execution by unit tests?

A.

Load data from a remote site with a callout.

B.

Set the created date of a record using a system method.

C.

Execute anonymous Apex as a different user.

D.

Generate a Visualforce PDF with geccontentAsPDF ().

Full Access
Question # 28

What are three capabilities of the tag when loading JavaScript resources in Aura components?

Choose 3 answers

A.

Loading files from Documents

B.

One-time loading for duplicate scripts

C.

Specifying loading order

D.

Loading scripts In parallel

E.

Loading externally hosted scripts

Full Access
Question # 29

The following Apex method is part of the ContactService class that is called from a trigger: public static void setBusinessUnitToEMEA(Contact thisContact){ thisContact.Business_Unit__c = "EMEA" ; update thisContact; } How should the developer modify the code to ensure best practice are met?

A.

Public static void setBusinessUnitToEMEA(List contacts){

for(Contact thisContact : contacts){

thisContact.Business_Unit__c = 'EMEA' ;

update contacts[0];

}

}

B.

Public static void setBusinessUnitToEMEA(List contacts){

for(Contact thisContact : contacts) {

thisContact.Business_Unit__c = 'EMEA' ;

}

update contacts;

}

C.

Public static void setBusinessUnitToEMEA(Contact thisContact){

List contacts = new List();

contacts.add(thisContact.Business_Unit__c = 'EMEA');

update contacts;

}

D.

Public void setBusinessUnitToEMEA(List contatcs){

contacts[0].Business_Unit__c = 'EMEA' ;

update contacts[0];

}

Full Access
Question # 30

In the Lightning UI, where should a developer look to find information about a Paused Flow Interview?

A.

On the Paused Row Interviews related List for a given record

B.

In the Paused Interviews section of the Apex Flex Queue

C.

In the system debug log by Altering on Paused Row Interview

D.

On the Paused Row Interviews component on the Home page

Full Access
Question # 31

A developer needs to prevent the creation of Request_c records when certain conditions exist in the system. A RequestLogic class exists to checks the conditions. What is the correct implementation?

A.

Trigger RequestTrigger on Request (after insert) {

RequestLogic.validateRecords {trigger.new};

}

B.

Trigger RequestTrigger on Request (before insert) {

RequestLogic.validateRecords {trigger.new};

}

C.

Trigger RequestTrigger on Request (before insert) {

if (RequestLogic.isvalid{Request})

Request.addError {'Your request cannot be created at this time.'};

}

D.

Trigger RequestTrigger on Request (after insert) {

if (RequestLogic.isValid{Request})

Request.addError {'Your request cannot be created at this time.'};

}

Full Access
Question # 32

A developer needs to confirm that a Contact trigger works correctly without changing the organization's data. what should the developer do to test the Contact trigger?

A.

Use the New button on the Salesforce Contacts Tab to create a new Contact record.

B.

Use the Open execute Anonymous feature on the Developer Console to run an 'insert Contact' DML statement

C.

Use Deploy from the VSCode IDE to display an 'insert Contact' Apex class.

D.

Use the Test menu on the Developer Console to run all test classes for the Contact trigger

Full Access
Question # 33

Which two characteristics are true for Aura component events?

A.

Calling event, stopPropagation ( ) may or may not stop the event propagation based of the current propagation phase.

B.

If a container component needs to handle a component event, add a handleFacets='' attribute to Its handler.

C.

Only parent components that create subcomponents (either in their markup or programmatically) can handle events.

D.

The event propagates to every owner In the containment hierarchy.

Full Access
Question # 34

A developer needs to create a custom Interface in Apex.

Which three considerations must the developer keep in mind while developing the Apex Interface?

Choose 3 answers

A.

The Apex class must be declared using the interface keyword.

B.

A method implementation can be defined within the Apex Interface.

C.

The Apex interface class access modifier can be set to Private, Public, or Global.

D.

A method defined In an Apex Interface cannot have an access modifier.

E.

New methods can be added to a public interface within a released package.

Full Access
Question # 35

A developer wrote Apex code that calls out to an external system. How should a developer write the test to provide test coverage?

A.

Write a class that extends HTTPCalloutMock.

B.

Write a class that implements the HTTPCalloutMock interface.

C.

Write a class that implements the WebserviceMock interface.

D.

Write a class that extends WebserviceMock

Full Access
Question # 36

A developer is implementing an Apex class for a financial system. Within the class, the

variables ‘creditAmount’ and ‘debtAmount’ should not be able to change once a value is

assigned. In which two ways can the developer declare the variables to ensure their value

can only be assigned one time? Choose 2 answers

A.

Use the static keyword and assign its value in the class constructor.

B.

Use the final keyword and assign its value in the class constructor.

C.

Use the static keyword and assign its value in a static initializer.

D.

Use the final keyword and assign its value when declaring the variable.

Full Access
Question # 37

A developer wrote the following two classes:

The StatusFetcher class successfully compiled and saved. However, the Calculator class has a compile time error.

How should the developer fix this code?

A.

Change the class declaration for the statusFetcher class to public with inherited sharing.

B.

Make the is Active method in the StatusFetcher class public.

C.

Make the doCalculations method in the Calculation class private.

D.

Change the class declaration for the Calculator class to public with inherited sharing.

Full Access
Question # 38

A developer must modify the following code snippet to prevent the number of SOQL queries issued from exceeding the platform governor limit. public class without sharing OpportunityService( public static List getOpportunityProducts(Set opportunityIds){ List oppLineItems = new List(); for(Id thisOppId : opportunityIds){ oppLineItems.addAll([Select Id FROM OpportunityLineItems WHERE OpportunityId = :thisOppId)]; } return oppLineItems; } }

The above method might be called during a trigger execution via a Lightning component. Which technique should be implemented to avoid reaching the governor limit?

A.

Use the System.Limits.getQueries() method to ensure the number of queries is less than 100.

B.

Use the System.Limits.getlimitQueries() method to ensure the number of queries is less than 100.

C.

Refector the code above to perform the SOQL query only if the Set of opportunityIds contains less 100 Ids.

D.

Refactor the code above to perform only one SOQL query, filtering by the Set of opportunityIds.

Full Access
Question # 39

Universal Containers wants to assess the advantages of declarative development versus programmatic customization for specific use cases in its Salesforce implementation.

What are two characteristics of declarative development over programmatic customization?

Choose 2 answers

A.

Declarative development has higher design limits and query limits.

B.

Declarative development can be done using the Setup UI.

C.

Declarative development does not require Apex test classes.

D.

Declarative code logic does not require maintenance or review.

Full Access
Question # 40

A developer must build application that tracks which Accounts have purchase specific pieces of equal products. Each Account could purchase many pieces of equipment.

How should the developer track that an Account has purchased a piece of equipment.

A.

Use the Asset object.

B.

Use a Custom object.

C.

Use a Master-Detail on Product to Account

D.

Use a Lookup on Account to product.

Full Access
Question # 41

A developer has to identify a method in en Apex class that performs resource intensive actions in memory by iterating over the result set of a SOQL statement on the account. The method also performs a SOQL statement to save the changes to the database.

Which two techniques should the developer implement as a best practice to ensure transaction control and avoid exceeding governor limits?

Choose 2 answers

A.

Use the @ReadOnly annotation to bypass the number of rows returned by a SOQL.

B.

Use Partial DHL statements to ensure only valid data is committed.

C.

Use the Database.Savepoint method to enforce database integrity.

D.

Use the System.Limit class to monitor the current CPU governor limit consumption.

Full Access
Question # 42

Which statement should be used to allow some of the records in a list of records to be inserted rf others fail to be inserted?

A.

insert records

B.

Database.insert(records, true)

C.

insert (records, false)

D.

Database.insert(records, false)

Full Access
Question # 43

What are two ways a developer can get the status of an enquered job for a class that queueable interface? Choose 2 answers

A.

View the apex status Page

B.

View the apex flex Queue

C.

View the apex Jobs page

D.

Query the AsyncApexJobe object

Full Access
Question # 44

Which statement is true about developing in a multi-tenant environment?

A.

Governor limits prevent apex from impactiong the performance of multiple tenants on the same instance

B.

Apex sharing controls access to records fomr multiple tenants on the same instance

C.

Global apex classes can be referenced from multiple tenants on the same instance

D.

Org-level data security controls which users can see data from multiple tenants on the same instance

Full Access
dumpsmate guaranteed to pass
24/7 Customer Support

DumpsMate's team of experts is always available to respond your queries on exam preparation. Get professional answers on any topic of the certification syllabus. Our experts will thoroughly satisfy you.

Site Secure

mcafee secure

TESTED 26 Sep 2022