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

Free and Premium Salesforce PDI Dumps Questions Answers

Page: 1 / 15
Total 200 questions

Salesforce Certified Platform Developer 1 (WI25) Questions and Answers

Question 1

A developer is integrating with a legacy on-premise SQL database.

What should the developer use to ensure the data being integrated is matched to the right records in Salesforce?

Options:

A.

External Object

B.

External ID field

C.

Formula field

D.

Lookup field

Buy Now
Question 2

What are two ways a developer can get the status of an enqueued job for a class that implements the queueable interface?

Choose 2 answers

Options:

A.

View the Apex Status page

B.

View the Apex Jobs page

C.

Query the AsyncApexJob object

D.

View the Apex Flex Queue

Question 3

What are two considerations for deploying from a sandbox to production?

Choose 2 answers

Options:

A.

At least 75% of Apex code must be covered by unit tests.

B.

Unit tests must have calls to the System.assert method.

C.

Should deploy during business hours to ensure feedback can be quickly addressed.

D.

All triggers must have at least one line of test coverage.

Question 4

A developer wants to send an outbound message when a record meets a specific criteria.

Which two features satisfy this use case?

Options:

A.

Flow Builder can be used to check the record criteria and send an outbound message.

B.

Approval Process can be used to check the record criteria and send an outbound message without Apex code.

C.

Entitlement Process can be used to check the record criteria and send an outbound message without Apex code.

D.

Next Best Action can be used to check the record criteria and send an outbound message.

Question 5

A team of many developers work in their own individual orgs that have the same configuration as the production org.

Which type of org is best suited for this scenario?

Options:

A.

Developer Sandbox

B.

Full Sandbox

C.

Developer Edition

D.

Partner Developer Edition

Question 6

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

Options:

A.

import updateAccounts from "AccountControlles';

B.

import updateAccounts from "Salesforce/apex/AccountController:';

C.

import updateAccounts from "Account@ontroller.updateAccounts';

D.

import updateAccounts from "@salesforce/apex/AccountController.updateAccounts";

Question 7

A developer creates a custom exception as shown below:

public class ParityException extends Exception { }

What are two ways the developer can fire the exception in Apex?

Options:

A.

throw new ParityException ();

B.

throw new parityException ('parity does not match');

C.

new ParityException ();

D.

new ParityException('parity does not match');

Question 8

What should a developer do to check the code coverage of a class after running all tests?

Options:

A.

View the code coverage percentage for the class using the Overall Code Coverage panel in the Developer Console Tests tab.

B.

View the Class Test Percentage tab on the Apex Class list view in Salesforce Setup.

C.

Select and run the class on the Apex Test Execution page in the Developer Console.

D.

View the Code Coverage column in the list view an the Apex Classes page.

Question 9

What is the result of the following code?

Options:

A.

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

B.

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

C.

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

D.

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

Question 10

In terms of the MVC paradigm, what are two advantages of implementing the view layer of a Salesforce application using Lightning Web Component-based development over Visualforce?

Choose 2 answers

Options:

A.

Rich component ecosystem

B.

Leg capturing via the Debug Logs Setup page

C.

Built-in standard and custom set controllers

D.

Self-contained and reusable units of an application

Question 11

Given the following Anonymous block:

What should a developer consider for an environment that has over 10,000 Case records?

What should a developer consider for an environment that has over 10,000 Case records?

Options:

A.

The transaction will succeed and changes will be committed.

B.

The try-catch block will handle exceptions thrown by governor limits.

C.

The transaction will fail due to exceeding the governor limit.

D.

The try-catch block will handle any DML exceptions thrown,

Question 12

A developer creates a new Apex trigger with a helper class, and writes a test class that only exercises 95% coverage of the new Apex helper class.

Change Set deployment to production fails with the test coverage warning:

"Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required."

What should the developer do to successfully deploy the new Apex trigger and helper class?

Options:

A.

Run the tests using the Run All Tests' method.

B.

Remove the failing test methods from the test class

C.

Create a test class and methods to cover the Apex trigger.

D.

Increase the test class coverage on the helper class.

Question 13

Universal Containers recently transitioned from Classic to Lightning Experience.

One of its business processes requires certain values from the Opportunity object 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 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.

B.

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.

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 (Callout=true) to perform the HTTP REST callout.

Question 14

The Account object in an organization has a master-detail relationship to a child object called Branch. The following automations exist:

* Roll-up summary fields

* Custom validation rules

* Duplicate rules

developer created a trigger on the Account object.

Which two things should the developer consider while testing the trigger code?

Choose 2 answers

Options:

A.

Rollup summary fields can cause the parent record to go through Save.

B.

Duplicate rules are executed once all DML operations commit to the database.

C.

The trigger may fire multiple times during a transaction.

D.

The validation rules will cause the trigger to fire again.

Question 15

A developer wrote Apex code that calls out to an external system using REST API.

How should a developer write the test to prove the code is working as intended?

Options:

A.

Write a class that implements HTTPcalloutMock.

B.

Write a class that extends webserviceloo.

C.

Write a class that implements webservicemock.

D.

Write a class that extends HTTPcalloutMock.

Question 16

In the following example, which sharing context will myMethod execute when it is invoked?

Options:

A.

Sharing rules will be enforced by the instantiating class.

B.

Sharing rules will be enforced for the running user.

C.

Sharing rules will not be enforced for the running user.

D.

Sharing rules will be inherited from the calling context.

Question 17

What are two benefits of using External IDs?

Choose 2 answers

Options:

A.

An External ID field can be used to reference an ID from another external system.

B.

An External ID can be a formula field ta help create a unique key from two fields in Salesforce.

C.

An External ID can be used with Salesforce Mobile to make external data visible.

D.

An External 1D is indexed and can improve the performance of SOOL queries.

Question 18

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 SOQL to query the org for the required data.

B.

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

C.

Use Anonymous Apex to create the required data.

D.

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

Question 19

Universal Containers has a support process that allows users to request support from its engineering team using a custom object,

Engineering Support c.

Users should be able to associate multiple Engineering Support __c records to a single Opportunity record. Additionally, aggregate information

about the Engineering Support _c records should be shown on the Opportunity record.

Which relationship field should be implemented to support these requirements?

Options:

A.

Lookup field from Opportunity to Engineering _support__c

B.

Master-detail field from Engineering Support__c to Opportunity

C.

Master-detail field from Opportunity to Engineering Support__c

D.

Lookup field from Engineering Support __c to Opportunity

Question 20

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?

Options:

A.

@AuraEnabled(cacneable=true)

B.

@RemoteAction (cacheable-true)

C.

@RemoteAction

D.

@AuraEnabled

Question 21

A developer has an integer variable called maxAttempts. The developer needs to ensure that once maxAttempts is initialized, it preserves its value for the length 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?

Options:

A.

Declare maxattempts as a constant using the static and final keywords.

B.

Declare maxattempts as a member variable on the trigger definition.

C.

Declare maxattempts as a variable on a helper class.

D.

Declare maxAttempts as a private static variable on a helper class.

Question 22

A developer needs to prevent the creation of Request _c records when certain conditions exist in the system. A BequestLogic class exists that checks the conditions.

What is the correct implementation?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 23

How does the Lightning Component framework help developers implement solutions faster?

Options:

A.

By providing device-awareness for mobile and desktops

B.

By providing an Agile process with default steps

C.

By providing change history and version control

D.

By providing code review standards and processes

Question 24

What can be easily developed using the Lightning Component framework?

Options:

A.

Salesforce Classic user interface pages

B.

Lightning Pages

C.

Customized JavaScript buttons

D.

Salesforce integrations

Question 25

A developer deployed a trigger to update the status__c of Assets related to an Account when the Account’s status changes and a nightly integration that updates Accounts in bulk has started to fail with limit failures.

What should the developer change about the code to address the failure while still having the code update all of the Assets correctly?

Options:

A.

Move all of the logic to a Queveable class that queries for and updates the Assets and call it from the trigger.

B.

Add List<asset> assets = [SELECT id, Status_¢ FROM WHERE AccountId = : acctId] to line 14 and iterate over the assets list in the for loop on line 15.;

C.

Add a LIMIT clause to the SOQL query on line 16 to limit the number of Assets queried for an Account.

D.

Change the getAssetsToUpdate method to process all Accounts in one call and call it outside of the for loop that starts on line 03.

Question 26

When importing and exporting data into Salesforce, which two statements are true?

Choose 2 answers

Options:

A.

Bulk API can be used to bypass the storage limits when importing large data volumes in development environments.

B.

Data import wizard is an application that is installed on your computer

C.

Bulk APL can be used to import large data volumes in development environments without bypassing the storage limits.

D.

Developer and Developer Pro sandboxes have different storage limits.

Question 27

A company decides to implement a new process where every time an Opportunity is created, a follow up Task should be created and assigned to the Opportunity Owner.

What is the most efficient way for a developer to implement this?

Options:

A.

Apex trigger on Task

B.

Task actions

C.

Auto-launched flow on Task

D.

Record-triggered flow on Opportunity

Question 28

Management asked for opportunities to be automatically created for accounts with annual revenue greater than $1, 000,000. A developer created the following trigger on the Account object to satisfy this requirement.

Users are able to update the account records via the UI and can see an opportunity created for high annual revenue accounts. However, when the administrator tries to upload a list of 179 accounts using Data Loader, it fails with system, Exception errors.

Which two actions should the developer take to fix the code segment shown above?

Choose 2. answers

Options:

A.

Query for existing opportunities outside the for loop.

B.

Check if all the required fields for Opportunity are being added on creation.

C.

Move the DML that saves opportunities outside the for loop.

D.

Use Database query to query the opportunities.

Question 29

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 able to return more records

C.

SOQL Is faster for text searches.

D.

SOSL is able to return more records.

Question 30

A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple sObjects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URL.

Which three statements are useful inside the unit test to effectively test the custom controller?

Choose 3 answers

Options:

A.

String nextPage = controller.save().getUrl ();

B.

ApexPages.currentPage ().getParametera(}.put{'input', "TeatValue');

C.

insert pageret;

D.

public Extendedcontroller (ApexPages.Standardcontraller entrl) { }

E.

Test. setCurrentPage (pageRef) ;

Question 31

Universal Containers has a large number of custom applications that were built using a third-party JavaScript framework and exposed using Visualforce pages. The company wants to update these applications to apply styling that resembles the look and feel of Lightning Experience.

What should the developer do to fulfill the business request in the quickest and most effective manner?

Options:

A.

Rewrite all Visualforce pages as Lightning components.

B.

Set the attribute enableLightning to true in the definition.

C.

Enable Available for Lightning Experience, Lightning Communities, and the mobile app on Visualforce pages used by the custom application.

D.

Incorporate the Salesforce Lightning Design System CSS stylesheet Into the JavaScript applications.

Question 32

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

Which two options can be used to build out the business logic layer for this application?

Choose 2 answers

Options:

A.

Record-Triggered Flow

B.

Batch Jobs

C.

Remote Actions

D.

Validation Rules

Question 33

A developer is asked to prevent anyone other than a user with Sales Manager profile from changing the Opportunity Status to Closed Lost if the lost reason is blank.

Which automation allows the developer to satisfy this requirement in the most efficient manner?

Options:

A.

An Apex trigger on the Opportunity object

B.

An error condition formula on a validation rule on Opportunity

C.

A record trigger flow on the Opportunity object

D.

An approval process on the Opportunity object

Question 34

Flow Builder uses an Apex action to provide additional information about multiple Contacts, stored in a custom class, ContactInfo. Which is the correct definition of the Apex method that gets the additional information?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 35

Universal Containers needs to create a custom user interface component that allows users to enter information about their accounts.

The component should be able to validate the user input before saving the information to the database.

What is the best technology to create this component?

Options:

A.

Flow

B.

Lightning Web Components

C.

Visualforce

D.

VUE JavaScript framework

Question 36

Which two are best practices when it comes to Aura component and application event handling?

Choose 2 answers

Options:

A.

Try to use application events as opposed to component events.

B.

Reuse the event logic in a component bundle, by putting the logic in the helper.

C.

Use component events to communicate actions that should be handled at the application level.

D.

Handle low-level events in the event handler and re-fire them as higher-level events.

Question 37

Universal Containers decided to transition from Classic to Lightning Experience. They asked a developer to replace a JavaScript button that was being used to create records with prepopulated values.

What can the developer use to accomplish this?

Options:

A.

Validation rules

B.

Apex triggers

C.

Record triggered flows

D.

Quick Actions

Question 38

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.

Database. insert (records, true)

B.

insert records

C.

insert (records, false)

D.

Database. insert (records, false)

Question 39

Consider the following code snippet:

Given the multi-tenant architecture of the Salesforce platform, what is a best practice a developer should implement and ensure successful execution of the method?

Options:

A.

Avoid using variables as query filters.

B.

Avoid returning an empty List of records.

C.

Avoid performing queries inside for loops.

D.

Avoid executing queries without a limit clause.

Question 40

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

Options:

A.

apex:page standardController="Notice_c" extensions="myControllerExtension"”

B.

apex:page controllers="Notice_c, myContcollerExtension"

C.

apex:pege=Notice extends="myControllerExtension”

D.

apex:page controller="Notice_c" extensions="myControllerExtension"

Question 41

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_multiplier 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 multiplier constant to meet the business objectives?

Options:

A.

static decimal DELIVERY_MULTIPLIER = 4.15;

B.

constant decimal DELIVERY_MULTIPLIER = 4.15;

C.

static final decimal DELIVERY_MULTIPLIER = 4.15;

D.

decimal DELIVERY_MULTIPLIER = 4.15;

Question 42

Universal Hiring uses Salesforce to capture job applications. A salesforce administrator created two custom objects; Job__c acting as the master object, to Application_c acting as the detail.

Within the Job__c object, a custom multi-select picklist, preferred _Locations__c, contains a list of approved states for the position. Each Job_Application__c record relates to a Contact within the system through a master-detail relationship.

Recruiters have requested the ability to view whether the Contact's Mailing State value matches a value selected on the Preferred Locations__c field, within the Job_Application__c record. Recruiters would like this value to be kept in sync if changes occur to the Contact's Mailing State.

What is the recommended tool a developer should use to meet the business requirement?

Options:

A.

Apex trigger

B.

Roll-up summary field

C.

Record-triggered flow

Question 43

A developer creates a batch Apex job to update a large number of records, and receives reports of the job timing out and not completing.

What is the first step towards troubleshooting the issue?

Options:

A.

Check the asynchronous job monitoring page to view the job status and logs.

B.

Check the debug logs for the batch job.

C.

Disable the batch job and recreate it with a smaller number of records.

D.

Decrease the batch size to reduce the load on the system.

Question 44

A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of Apex tests allowing

them to test isolated requirements for various types of Salesforce cases.

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

Options:

A.

Create a mock using the HttpcalloutMock interface.

B.

Use @TestSetup with a void method.

C.

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

D.

Create test data before Test .startTest() in the unit test.

Question 45

Which two characteristics are true for Lightning Web Component custom events?

Choose 2 answers

Options:

A.

Data may be passed in the payload of a custom event using @wire decorated properties.

B.

Data may be passed In the payload of a custom event using a property called detail.

C.

By default a custom event only propagates to its immediate container and to its immediate child component.

D.

By default a custom event only propagates to it’s immediate container.

Question 46

A developer is creating an app that contains multiple Lightning web components.

One of the child components is used for navigation purposes. When a user clicks a button called Next in the child component, the parent component must be alerted so it can navigate to the next page.

How should this be accomplished?

Options:

A.

Update a property on the parent.

B.

Call a method in the Apex controller.

C.

Fire a notification.

D.

Create a custom event.

Question 47

A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces.

Which is the correct implementation?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 48

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.

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

B.

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

C.

Use the Salesforce Streaming APL to perform the SOQL query.

D.

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

Question 49

Which three steps allow a custom Scalable Vector Graphic (SVG) to be included in a Lightning web component?

Choose 3 answers

Options:

A.

Import the static resource and provide a JavaScript property for it.

B.

Upload the SVG as a static resource.

C.

Reference the import in the HTML template.

D.

Import the SVG as a content asset file.

E.

Reference the property in the HTML template.

Question 50

Which three data types can a SOQL query return?

Choose 3 answers

Options:

A.

Double

B.

O Long

C.

sObject

D.

dg Integer

E.

List

Question 51

Assuming that name is a String obtained by an tag on a Visualforce page, which two SOQL queries performed are safe from SOQL injection? Choose 2 answers

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 52

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.

SFDX CLI

B.

Developer Console

C.

Change Sets

D.

Ant Migration Tool

Question 53

What should a developer use to fix a Lightning web component bug in a sandbox?

Options:

A.

Developer Console

B.

Force.com IDE

C.

Execute Anonymous

D.

VS Code

Question 54

A developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunityLineltem trigger.

Which method allows access to the price book?

Options:

A.

Use Test .getStandardPricebookid() to get the standard price book ID.

B.

Use @isTest [SeeAllData=true| and delete the existing standard price book.

C.

Use @Testvisible to allow the test method to see the standard price book.

D.

Use Test. loadData () and a static resource to load a standard price book.

Question 55

Universal Containers wants to automatically assign new cases to the appropriate support representative based on the case origin. They have created a custom field on the Case object to store the support representative name.

What is the best solution to assign the case to the appropriate support representative?

Options:

A.

Use a trigger on the Case object.

B.

Use a formula field on the Case object.

C.

Use a validation rule on the Case object.

D.

Use an Assignment Flow element.

Question 56

A developer is working on a project to import data from an external system into Salesforce. The data contains sensitive information that should not be visible to all users in Salesforce.

What should the developer do to ensure that the data is secure?

Options:

A.

Use a third-party tool to encrypt the sensitive data before importing it into Salesforce.

B.

Use the Apex Data Loader to import the into and write Apex code to handle security and access

control.

C.

Use the Data Import Wizard to import the data arid set up field-level security to restrict access to

sensitive fields.

D.

Use the Salesforce CLI to import the data and set up user permissions to restrict access to sensitive data.

Question 57

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)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 58

A company has a custom object, order __c, that has a required, unique external ID field called order Number__c.

Which statement should be used to perform the DML necessary to insert new records and update existing records in a list of Order __c records

using the external ID field?

Options:

A.

merge orders;

B.

merge orders Order Number_c;

C.

upsert orders Order Number c;

D.

upsert orders;

Question 59

A company's engineering department is conducting a month-long test on the scalability of an in-house-developed software that requires a cluster of 100 or more servers. Which of the following models is the best to use?

Options:

A.

PaaS

B.

SaaS

C.

BaaS

D.

laaS

Question 60

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?

Options:

A.

Use Deploy from the VSCode IDE co deploy an 'insert Contact' Apex class.

B.

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

C.

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

D.

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

Page: 1 / 15
Total 200 questions