Black Friday Biggest Discount Flat 70% Offer - Ends in 0d 00h 00m 00s - Coupon code: 70diswrap

Salesforce PDI Dumps

Page: 1 / 17
Total 174 questions

Salesforce Certified Platform Developer I (SU24) Questions and Answers

Question 1

A developer must implement a checkpaymentpbrocaessox class that provides check processing payment capabilities that adhere to what is defined for payments in the paymentProcsssor Interface.

as

Which implementation is correct to use the paymenterocesscr interface class?

A)

as

B)

as

C)

as

Options:

A.

Option A

B.

Option B

C.

Option C

Question 2

Universal Containers implemented a private sharing model for the Account object. A custom Account search tool was developed with Apex to help sales representatives find accounts that match multiple criteria they specify. Since its release, users of the tool report they can see Accounts they do not own.

What should the developer use to enforce sharing permissions for the currently logged in user while using the custom search tool?

Options:

A.

Use the schema describe calls to determine if the logged-in user has access to the Account object,

B.

Use the with sharing keyword on the class declaration.

C.

Use the without sharing keyword on the class declaration.

D.

Use the UserInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user.

Question 3

A developer needs to have records with specific field values in order to test a new Apex class.

What should the developer do to ensure the data is available to the test?

Options:

A.

Use test.loadData() and reference a JSON file in Documents.

B.

Use Test.loadData() and reference a CSV file in a static resource.

C.

Use Anonymous Apex to create the required data.

D.

Use SOQL to query the org for the required data.

Question 4

Which three statements are accurate about debug logs?

Choose 3 answers

Options:

A.

A System debug logs are retained for 24 hours.

B.

Only the 20 most recent debug logs for a user are kept.

C.

Debug log levels are cumulative, where FINE log level includes all events logged at the DEBUG, INFO, WARN, and ERROR levels.

D.

Debug logs can be set for specific users, classes, and triggers.

E.

The maximum size of 3 debug log is 5 MB.

Question 5

Universal Containers decides to use exclusively declarative development to build out a new Salesforce application.

Which three options should be used to build out the database layer for the application?

Choose 3 answers

Options:

A.

Roll-up summaries

B.

Flows

C.

Custom objects and fields

D.

Relationships

E.

Triggers

Question 6

How many Accounts will be inserted by the following block of code?

as

Options:

A.

100

B.

0

C.

500

D.

150

Question 7

An Opportunity needs to have an amount rolled up from a custom object that is not in a master-detail relationship.

How can this be achieved?

Options:

A.

Use the Streaming API to create real-time roll-up summaries.

B.

Write a trigger on the child object and use an agaregate function to sum the amount for all related child objects under the Opportunity.

C.

Use the Metadata API to create real-time roll-up summaries,

D.

Write a trigger on the Opportunity object and use tree sorting to sum the amount for all related child objects under the Opportunity.

Question 8

What are two benefits of using declarative customizations over code? Choose 2 answers

Choose 2 answers

Options:

A.

Declarative customization* automatically generate test classes.

B.

Declarative customizations cannot generate run time errors.

C.

Declarative customizations automatically update with each Salesforce release.

D.

Declarative customizations generally require less maintenance.

Question 9

How is a controller and extension specified for a custom object named "Notice" on a Visualforce page?

Options:

A.

apex:page controller="Notice_ c" extensions="myControllerExtension”

B.

apax:page=Notice extends="myControllerExtension’’

C.

apax:page controllers="Norice &£, myConrrollerExtansicon™

D.

apex:page standardController="Notice__c" extensions="myConctrollerExtension”

Question 10

A developer is tasked with building a custom Lightning web component to collect Contact information.

The form will be shared among many different types of users in the org. There are security requirements that only certain fields should be edited and viewed by certain groups of users.

What should the developer use in their Lightning Web Component to support the security requirements?

Options:

A.

force-input-field

B.

lightning-input-field

C.

ui-input-field

D.

aura-input-field

Question 11

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

Options:

A.

insert records

B.

Database.insert (records, false)

C.

Insert (records, false)

D.

Database.insert(records, true)

Question 12

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.

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

Options:

A.

Use Opportunity.SObjectType.gethescribe () .getRaecordlypaInsos () to get a list of record types, and iterate through them until 2sDefaultRecordTypeMapping () is true.

B.

Query the Profile where the ID equals uzexInfo.getProfilelD () and then use the profile.Cpportunity.gesDefaultRecordTyp= () method.

C.

Use the Schema.userInfo.Cpportunity.getlefaultRecordIype () method.

D.

Create the opportunity and check the opportunity. recordTyp=, which will have the record ID of the current user's default record type, before inserting.

Question 13

A developer identifies the following triggers on the Expense__c object:

as

The triggers process before delete, before insert, and before update events respectively.

Which two techniques should the developer implement to ensure trigger best practices are followed?

Choose 2 answers

Options:

A.

Unify all three triggers in a single trigger on the expense__c object that includes all events.

B.

Create helper classes to execute the appropriate logic when a record is saved.

C.

Maintain all three triggers on the expense__c object, but move the Apex logic out of the trigger definition.

D.

Unify the before insert and before update triggers and use Flow for the delete action.

Question 14

A developer created a Visualforce page and custom controller to display the account type field as shown below.

Custom controller code:

as

Visualforce page snippet:

as

what should the developer do to correct the problem?

Options:

A.

Add a getter method for the attribute.

B.

Convert theAccount.Type to a String.

C.

Change theAccount attribute to public.

D.

Add with sharing to the custom controller.

Question 15

Universal Containers has developed custom Apex code and Lightning Components in a Sandbox environment. They need to deploy the code and associated configurations to the Production environment.

What is the recommended process for deploying the code and configurations to Production?

Options:

A.

Use the Force.com IDE to deploy the Apex code and Lightning Components.

B.

Use the Ant Migration Tool to deploy the Apex code and Lightning Components.

C.

Use a change set to deploy the Apex code and Lightning Components.

D.

Use Salesforce CLI to deploy the Apex code and Lightning Components.

Question 16

What are two use cases for executing Anonymous Apex code?

Choose 2 answers

Options:

A.

To run a batch Apex class to update all Contacts

B.

To delete 15,000 inactive Accounts in a single transaction after a deployment

C.

To add unit test code coverage to an org

D.

To schedule an Apex class to run periodically

Question 17

What should a developer use to script the deployment and unit test execution as part of continuous integration?

Options:

A.

VS Code

B.

Developer Console

C.

Execute Anonymous

D.

Salesforce CLI

Question 18

Which statement describes the execution order when triggers are associated to the same object and event?

Options:

A.

Triggers are executed in the order they are modified.

B.

Triggers are executed alphabetically by trigger name.

C.

Triggers are executed in the order they are created.

D.

Trigger execution order cannot be guaranteed.

Question 19

A developer must create a Lightning component that allows users to input Contact record information to create a Contact record, including a Salary__c custom field.

What should the developer use, along with a lightning-record-edit-form, so that salarv < field functions as a currency Input and is only viewable and editable by users that have the correct field level permissions on salary _c?

A)

as

B)

as

C)

as

D)

as

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 20

A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violations to the user.

How can the developer make sure that validation rule violations are displayed?

Options:

A.

Include on the Visualforce page.

B.

Use a try/catch with a custom exception class.

C.

Add custom controller attributes to display the message.

D.

Perform the DML using the patabase.upsert () method.

Question 21

What should a developer use to obtain the Id and Name of all the Leads, Accounts, and Contacts that have the company name "Universal Containers"?

A)

as

B)

as

C)

as

D)

as

Options:

A.

Option

B.

Option

C.

Option

D.

Option

Question 22

Universal Containers hires a developer to build a custom search page to help users find the Accounts they want. Users will be able to search on Name, Description,

and a custom comments field.

Which consideration should the developer be aware of when deciding between SOQL and SOSL?

Choose 2 answers

Options:

A.

SOSL is faster for text searches.

B.

SOQL is faster for text searches.

C.

SOSL is able to return more records.

D.

SOQL is able to return more records.

Question 23

Which two settings must be defined in order to update a record of a junction object? Choose 2 answers

Options:

A.

Read/Write access on the primary relationship

B.

Read/Write access on the secondary relationship

C.

Read/Write access on the junction object

D.

Read access on the primary relationship

Question 24

A developer created a Lightning web component called statusComponent to be inserted into the Account record page.

Which two things should the developer do to make this component available?

Choose 2 answers

A)

as

B)

as

C)

as

D)

as

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 25

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

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

Options:

A.

Master-detail field from Applicant to Job

B.

Junction object between Applicant and Job

C.

Formula field on Applicant that references Job

D.

Lookup field from Applicant to Job

Question 26

The following Apex method is part of the Contactservice class that is called from a trigger:

as

How should the developer modify the code to ensure best practices are met?

A)

as

B)

as

C)

as

D)

as

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 27

Which code statement includes an Apex method named updateaccounts in the class accountcontreoller for use in a Lightning web component?

Options:

A.

import updatelccounts from '@aalesforce/apeax/AccountController':

B.

import updateiccounta from 'AccountConctroller':

C.

import updatelccounta from ‘RAccountContraller,updateiccounta’;

D.

import updase’Accounts from

'@=salesforce/apex/AccountController ., updateaccounts’;

Question 28

Which three Salesforce resources can be accessed from a Lightning web component?

Choose 3 answers

Options:

A.

All external libraries

B.

SVG resources

C.

Third-party web components

D.

Content asset files

E.

Static resources

Question 29

An Apex method, getAccounts, that returns a list of Accounts given a searchTerm, is available for Lightning Web Components to use.

What is the correct definition of a Lightning Web Component property that uses the getAccounts method?

A)

as

B)

as

C)

as

D)

as

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 30

A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of tests allowing them to test independent requirements for various types of Salesforce Cases.

Which approach can efficiently generate the required data for each unit test?

Options:

A.

Use @TestSetup with a void method.

B.

Create test data before Test.startTest {} in the unit test,

C.

Add @TsTest (seeAllData=true) at the start of the unit test class.

D.

Create a mock using the Stub API.

Question 31

Since Aura application events follow the traditional publish- subscribe model, which method is used to fire an event?

Options:

A.

registerEvent

B.

fireEvent ()

C.

emit{)

D.

fire()

Question 32

Which code displays the contents of a Visualforce page as a PDF?

A)

as

B)

as

C)

as

D)

as

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 33

For which three items can a trace flag be configured? Choose 3 answers

Options:

A.

Visualforce

B.

Apex Trigger

C.

Apex Class

D.

Flow

E.

User

Question 34

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

Options:

A.

Declarative code logic does not require maintenance or review.

B.

Declarative development has higher design limits and query limits.

C.

Declarative development does not require Apex test classes.

D.

Declarative development can be done using the Setup menu.

Question 35

A lead developer creates an Apex interface called Laptop.

Consider the following code snippet:

as

How can a developer use the Laptop Interface within the silverzaptop class?

Options:

A.

public class Silverlaptop extends Lapctop

B.

public class Silverlaprop implementa Laptop

C.

Extends (class="Laptop”) publiic claas Silverlaptcp

D.

Interface (class="Laptop") public class Silverlaptop

Question 36

When using Salesforce DX, what does a developer need to enable to create and manage scratch orgs?

Options:

A.

Dev Hub

B.

Production

C.

Environment Hub

D.

Sandbox

Question 37

A software company uses the following objects and relationships:

* Case: to handle customer support issues

* Defect__c: a custom object to represent known issues with the company's software

* Case_Defect__c: a junction object between Case and Defect__c to represent that a defect is a cause of a customer issue

Case and Defect__c have Private organization-wide defaults.

What should be done to share a specific Case_Defect__c record with a user?

Options:

A.

share the parent Defect__c record.

B.

Share the parent Case record.

C.

Share the parent Case and Defect_c records.

D.

Share the Case_Defect_c record.

Question 38

Which annotation should a developer use on an Apex method to make it available to be wired to a property in a Lightning web component?

A)

as

B)

as

C)

as

D)

as

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 39

When a user edits the Postal Code on an Account, a custom Account text field named "Timezone™ must be updated based on the values in a PoataliCodeToTimezcone o custom object.

Which two automation tools can be used to implement this feature?

Choose 2 answers

Options:

A.

Quick actions

B.

Account trigger

C.

Approval process

D.

Fast Field Updates record-triggered flow

Question 40

What Is the result of the following code?

as

Options:

A.

The record will not be created and an exception will be thrown.

B.

The record will be created and no error will be reported,

C.

The record will not be created and no error will be reported.

D.

The record will be created and a message will be in the debug log.

Question 41

What does the Lightning Component framework provide to developers?

Options:

A.

Prebuilt components that can be reused

B.

Support for Classic and Lightning Uls

C.

Extended governor limits for applications

D.

Templates to create custom components

Question 42

Universal Containers recently transitioned from Classic to Lightning Experience.

One of its business processes requires certain values from the Opportunity cbject to be sent via an HTTP REST callout to its external order management system when the user presses a custom button

on the Opportunity detail page. Example values are as follows:

* Name

* Amount

* Account

Which two methods should the developer implement to fulfill the business requirement?

Choose 2 answers

Options:

A.

Create a Remote Action on the Opportunity object that executes an Apex immediate action to perform the HTTP REST callout whenever the Opportunity Is updated.

B.

Create a custom Visualforce quick action that performs the HTTP REST callout, and use a Visualforce quick action to expose the component on the Opportunity detail page.

C.

Create a Lightning component quick action that performs the HTTP REST callout, and use a Lightning Action to expose the component on the Opportunity detail page.

D.

Create an after update trigger on the Opportunity object that calls a helper method using @Future (Callour=true) to perform the HTTP REST callout.

Question 43

A developer needs to allow users to complete a form on an Account record that will create record for a custom object.

The form needs to display different fields depending on the user’s job role. The functionality should only be available to a small group of users.

Which three things should the developer do to satisfy these requirements?

Choose 3 answers

Options:

A.

Create a Custom Permission for the users.

B.

Create a Lightning web component,

C.

Add a Dynamic Action to the Account Record Page.

D.

Add a Dynamic Action to the Users' assigned Page Layouts,

E.

Create a Dynamic Form.

Question 44

A development team wants to use a deployment script to automatically deploy to a sandbox during their development cycles.

Which two tools can they use to run a script that deploys to a sandbox?

Choose 2 answers

Options:

A.

VSCode

B.

Developer Console

C.

Change Sets

D.

SFOX CLI

Question 45

Universal Containers has an order system that uses an Order Number to identify an order for customers and service agents. Order records will be imported into Salesforce.

How should the Order Number field be defined in Salesforce?

Options:

A.

Direct Lookup

B.

Lookup

C.

External ID and Unique

D.

Indirect Lookup

Question 46

A developer must perform a complex SOQL query that joins two objects in a Lightning component.

How can the Lightning component execute the query?

Options:

A.

Create a flow to execute the query and invoke from the Lightning component.

B.

Write the query in a custom Lightning web component wrapper and invoke from the Lightning component.

C.

Invoke an Apex class with the method annotated as @AuraEnabled to perform the query.

D.

Use the Salesforce Streaming API to perform the SOQL query.

Question 47

A custom picklist field, Food _Preference_ c, exists on a custom object. The picklist contains the following options: 'Vegan', 'Kosher', 'No Preference'. The developer must ensure a value is populated every time a record is created or updated.

What is the optimal way to ensure a value is selected every time a record is saved?

Options:

A.

Mark the field as Required on the object's page layout.

B.

Set "Use the first value in the list as the default value” to True.

C.

Mark the field as Required on the field definition.

D.

Write an Apex trigger to ensure a value is selected.

Question 48

A developer created a trigger on a custom object. This custom object also has some dependent pick lists.

According to the order of execution rules, which step happens first?

Options:

A.

Old values are overwritten with the new record values.

B.

JavaScript validation is run in the browser,

C.

System validation is run for maximum field lengths,

D.

The original record Is loaded from the database.

Question 49

A developer is alerted to an Issue with a custom Apex trigger that is causing records to be duplicated.

What is the most appropriate debugging approach to troubleshoot the issue?

Options:

A.

Add system.debug statements to the code to track the execution flow and identify the issue.

B.

Use the Apex Interactive Debugger to step through the code and identify the issue.

C.

Disable the trigger in production and test to see if the issue still occurs.

D.

Review the Historical Event legs to identify the source of the issue.

Question 50

Universal Containers wants to ensure that all new leads created in the system have a valid email address. They have already created a validation rule to enforce this requirement, but want to add an additional

layer of validation using automation.

What would be the best solution for this requirement?

Options:

A.

Use an Approval Process to enforce the completion of a valid email address using an outbound message action,

B.

Submit a REST API Callout with a JSON payload and validate the fields on a third party system

C.

Use a custom Lightning Web component to make a callout to validate the fields on a third party system.

D.

Use a before-save Apex trigger on the Lead object to validate the email address and display an error message if it is invalid

Question 51

Consider the following code snippet for a Visualforce page that is launched using a Custom Button on the Account detail page layout.

as

When the Save button is pressed the developer must perform a complex validation that involves multiple objects and, upon success, redirect the user to another Visualforce

page.

What can the developer use to meet this business requirement?

Options:

A.

Controller extension

B.

Custom controller

C.

Apex trigger

D.

Validation rule

Question 52

Universal Containers wants to back up all of the data and attachments in its Salesforce org once a month.

Which approach should a developer use to meet this requirement?

Options:

A.

Schedule a report.

B.

Define a Data Export scheduled

C.

Use the Data Loader command line.

D.

Create a Schedulable Apex class.

Page: 1 / 17
Total 174 questions