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

PDI Salesforce Certified Platform Developer 1 (WI25) Questions and Answers

Questions 4

Developers at Universal Containers (UC) use version control to share their code changes, but they notice that when they deploy their code to different environments they often have failures. They decide to set up Continuous Integration (CI).

What should the UC development team use to automatically run tests as part of their CI process?

Options:

A.

Salesforce CLI

B.

Visual Studio Code

C.

Force.com Toolkit

D.

Developer Console

Buy Now
Questions 5

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

Buy Now
Questions 6

A Primaryld_c custom field exists on the Candidate _c¢ custom object. The field is used to store each candidate's id number and is marked as Unique in the schema definition.

As part of a data enrichment process, Universal Containers has a CSV file that contains updated data for all candidates in the system. The file contains each Candidate's primary .. as a data point. Universal Containers wants to upload this information into Salesforce, while ensuring all data rows are correctly mapped to a candidate in the system.

Which technique should the developer implement to streamline the data upload?

Options:

A.

Upload the CSV into-a custom object related to candidate__c.

B.

Create a before insert trigger to correctly map the records,

C.

Update the Primarytd_c field definition to mark it. as.an External Id.

D.

Create a before save flow to correctly map the records.

Buy Now
Questions 7

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

Buy Now
Questions 8

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.

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

B.

Query the Profile where the ID equals userinfo.getprofileID () and then use the profile opportunity. getdefaultresoratype (} method,

C.

Use the schema. Userinfo. Opportunity. getDefaultRecordType {) method.

D.

Use opportunity. sobjectTyps. getDeacribse().getRecordTypeInfos {) to get a list of record types, and iterate through them until isDefaultRecordtypeMapping {) is true.

Buy Now
Questions 9

Which two events need to happen when deploying to a production org?

Choose 2 answers

Options:

A.

All custom objects must have visibility set to a value other than in Development.

B.

All Apex code must have at least 75% test coverage.

C.

All triggers must have some test coverage

D.

All Visual flows must have at least 1% test coverage.

Buy Now
Questions 10

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) ;

Buy Now
Questions 11

Which code in a Visualforce page and/or controller might present a security vulnerability?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 12

While writing an Apex class, a developer wants to make sure that all functionality being developed is handled as specified by the requirements.

Which approach should the developer use to be sure that the Apex class is working according to specifications?

Options:

A.

Include a savepoint and pacabase.rollback().

B.

Include a try/catch block to the Apex class.

C.

Run the code in an Execute Anonymous block in the Developer Console.

D.

Create a test class to execute the business logic and run the test in the Developer Console.

Buy Now
Questions 13

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.

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

B.

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

C.

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

D.

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

Buy Now
Questions 14

For which three items can a trace flag be configured?

Choose 3 answers

Options:

A.

Apex Class

B.

Flow

C.

User

D.

Visualforce

E.

Apex Trigger

Buy Now
Questions 15

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

Buy Now
Questions 16

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,

Buy Now
Questions 17

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

Buy Now
Questions 18

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

Options:

A.

VS Code

B.

Execute Anonymous

C.

Salesforce CLI

D.

Developer Console

Buy Now
Questions 19

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.

Custom objects and fields

B.

Triggers

C.

Roll-up summaries

D.

Relationships

E.

Flows

Buy Now
Questions 20

A developer wants to import 500 Opportunity records into a sandbox.

Why should the developer choose to use Data Loader instead of Data Import Wizard?

Options:

A.

Data Loader automatically relates Opportunities to Accounts.

B.

Data Loader runs from the developer's browser.

C.

Data Import Wizard does not support Opportunities.

D.

Data Import Wizard can not import all 500 records,

Buy Now
Questions 21

A developer wants to mark each Account in a List as either Active or Inactive, based on the value in the LastModified each Account being greater than 90 days in the past.

Which Apex technique should the developer use?

Options:

A.

An if-else statement, with a for loop inside

B.

A witch statement, with a for loop inside

C.

A for loop, with an if or if/else statement inside

D.

A for loop, with a switch statement inside

Buy Now
Questions 22

Given the following Apex statement:

Account myAccount = [SELECT Id, Name FROM Account);

What occurs when more than one Account is returned by the SOQL query?

Options:

A.

The variable, myaccount, is automatically cast to the List data type.

B.

An unhandled exception is thrown and the code terminates.

C.

The query fails and an error is written to the debug log.

D.

The first Account returned is assigned to myAccount.

Buy Now
Questions 23

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

Choose 3 answers

Options:

A.

Static resources

B.

All external libraries

C.

SVG resources

D.

Third-party web components

E.

Content asset files

Buy Now
Questions 24

Which two actions may cause triggers to fire?

Choose 2 answers

Options:

A.

Changing a user's default division when the transfer division option is checked

B.

Updates to FeedItem

C.

Cascading delete operations

D.

Renaming or replacing a picklist entry

Buy Now
Questions 25

Universal Containers is developing a new Lightning web component for their marketing department. They want to ensure that the component is fine-tuned and provides a seamless user experience.

What are some benefits of using the Lightning Component framework?

Options:

A.

Better performance due to client-side rendering

B.

Automatic support for accessibility standards

C.

Compatibility with all web browsers

D.

Easy integration with third-party libraries

Buy Now
Questions 26

Universal Containers (UC) wants to lower its shipping cost while making the shipping process more efficient. The Distribution Officer advises UC to implement global addresses to allow multiple Accounts to share a default pickup address. The developer is tasked to create the supporting object and relationship for this business requirement and uses the Setup Menu to create a custom object called "Global Address".

Which field should the developer add to create the most efficient model that supports the business need?

Options:

A.

Add a master-detail field on the Global Address object to the Account object.

B.

Add a lookup field on the Global Address object to the Account object.

C.

Add a lookup field on the Account object to the Global Address object.

D.

Add a master-detail field on the Account object to the Global Address object.

Buy Now
Questions 27

A developer completed modifications feature that is comprised of two elements:

* Apex trigger

* Trigger handler Apex class

What are two factors that the developer must take into account to properly deploy them to the production environment?

Choose 2 answers

Options:

A.

Apex classes must have at least 75% code coverage org-wide.

B.

All methods in the test classes must use @istest.

C.

At least one line of code must be executed for the Apex trigger.

D.

Test methods must be declared with the testMethod keyword.

Buy Now
Questions 28

Which statement generates a list of Leads and Contacts that have a field with the phrase 'ACME'?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 29

A developer is asked to write helper methods that create test data for unit tests.

What should be changed in the TestUtils class so that its methods are only usable by unit test methods?

Options:

A.

@isTest above line 03.

B.

Add @istest above line 01.

C.

Change public to private on line 01.

D.

Remove static from line 03.

Buy Now
Questions 30

How should a developer write unit tests for a private method in an Apex class?

Options:

A.

Use the SeeAllData annotation.

B.

Add a test method in the Apex class.

C.

Mark the Apex class as global.

D.

Use the @TestVisible annotation.

Buy Now
Questions 31

What are two use cases for executing Anonymous Apex code?

Choose 2 answers

Options:

A.

schedule an Apex class to run periodically

B.

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

C.

To run a batch Apex class to update all Contacts

D.

To add unit test code coverage to an org

Buy Now
Questions 32

A developer created a trigger on the Account object. While testing the trigger, the developer sees the error message ‘Maximum trigger depth exceeded’.

What could be the possible causes?

Options:

A.

The developer does not have the correct user permission.

B.

The trigger is too long and should be refactored into a helper class.

C.

The trigger does not have sufficient code coverage.

D.

The trigger is getting executed multiple times.

Buy Now
Questions 33

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.

Buy Now
Questions 34

What are two characteristics related to formulas?

Choose 2 answers

Options:

A.

Formulas are calculated at runtime and are not stored in the database.

B.

Formulas can reference themselves.

C.

Formulas can reference values in related objects.

D.

Fields that are used in a formula field can be deleted or edited without editing the formula.

Buy Now
Questions 35

Which two statements are true about using the @testSetup annotation in an Apex test class?

Choose 2 answers

Options:

A.

Records created in the test setup method cannot be updated in individual test methods.

B.

In a test setup method, test data is inserted once and made available for all test methods In the test class.

C.

A method defined with the @testSetup annotation executes once for each test method in the test class and counts towards system limits.

D.

The @testSetup annotation is not supported when the @isTest(SeeAllData=True) annotation is used .

Buy Now
Questions 36

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

Buy Now
Questions 37

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.

Buy Now
Questions 38

Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package application. One of the application modules allows the user to calculate body fat using the Apex class, Bodyfat, and its method, calculateBodyFat (). The product owner wants to ensure this method is accessible by the consumer of the application when developing customizations outside the ISV's package namespace.

Which approach should a developer take to ensure calculateBodyFat () is accessible outside the package namespace?

Options:

A.

Declare the class and method using the global access modifier.

B.

Declare the class and method using the public access modifier.

C.

Declare the class as public and use the global access modifier on the method.

D.

Declare the class as global and use the public access modifier on the method.

Buy Now
Questions 39

A custom Visualforce controller calls the ApexPages.addMessage() method, but no messages are rendering on the page.

Which component should be added to the Visualforce page to display the message?

Options:

A.

B.

C.

D.

Buy Now
Questions 40

A developer needs to implement a custom SOAP Web Service that is used by an external Web Application. The developer chooses to include helper methods that are not used by the Web Application in the implementation of the Web Service Class.

Which code segment shows the correct declaration of the class and methods?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 41

A Salesforce administrator used Flow Builder to create a flow named "accountOnboarding". The flow must be used inside an Aura component.

Which tag should a developer use to display the flow in the component?

Options:

A.

lightning: flow

B.

lightning-low

C.

sure-flow

D.

aura: flow

Buy Now
Questions 42

Universal Containers has implemented an order management application. Each Order can have one or more Order Line items. The Order Line object is related to the Order via a master-detail relationship. For each Order Line item, the total price is calculated by multiplying the Order Line item price with the quantity ordered.

What is the best practice to get the sum of all Order Line item totals on the Order record?

Options:

A.

Roll-up summary field

B.

Formula field

C.

Apex trigger

D.

Quick action

Buy Now
Questions 43

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

Buy Now
Questions 44

Consider the following code snippet:

As part of the deployment cycle, a developer creates the following test class:

When the test class runs, the assertion fails.

Which change should the developer implement in the Apex test method to ensure the test method executes successfully?

Options:

A.

Query the Administrator use into memory and enclose lines 15 and 16 within the system,runAs (use); method.

B.

Query the Standard User into memory and enclose lines 15 and 16 within the system ,runAs; method.

C.

Add @Istest% seeAllDataTrue; to line 12 and enclose lines 15 and 16 within Test .set(Test); and test ste-ptest();.

D.

Add System, runAs (Use; to line 14 and enclose line 15 within Test, startTest); and Test ().

Buy Now
Questions 45

A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an

OrderlItem object that has a master-detail relationship to Order. During order processing, an order may be split into multiple orders.

What should a developer do to allow their code to move some existing OrderItem records to a new Order record?

Options:

A.

Add without sharing to the Apex class declaration.

B.

Change the master-detail relationship to an external lookup relationship.

C.

Create a junction object between OrderItem and Order.

D.

Select the Allow reprinting option on the master-detail relationship.

Buy Now
Questions 46

What is the result of the following code snippet?

public word doWork(Account acct) {

for (Integer i = 0; i <= 2007 i++) {

insert acct;

}

Options:

A.

Accounts are inserted.

B.

Account is inserted.

C.

200 Accounts are inserted.

D.

201 Accounts are inserted.

Buy Now
Questions 47

Universal Containers (UC) uses out-of-the-box order management, that has a Master-Detail relationship between Order and Order Line Item.

UC stores the availability date on each Order Line Item and Orders are only shipped when all of the Order Line Items are available.

Which method should be used to calculate the estimated ship date for an Order?

Options:

A.

Use a LATEST formula on each of the latest availability date fields.

B.

Use a CEILING formula on each of the latest availability date fields.

C.

Use a DAYS formula on each of the availability date fields and a COUNT Roll-Up Summary field on the Order.

D.

Use a MAX Roll-Up Summary field on the latest availability date fields.

Buy Now
Questions 48

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

Buy Now
Questions 49

Which three resources in an Aura component can contain JavaScript functions?

Choose 3 answers

Options:

A.

Style

B.

Renderer

C.

Controller

D.

Design

E.

Helper

Buy Now
Questions 50

A developer must write an Apex method that will be called from a Lightning component. The method may delete an Account stored in the accountRec variable.

Which method should a developer use to ensure only users that should be able to delete Accounts can successfully perform deletions?

Options:

A.

accountRec, isDeletable()

B.

Schema,sObjectType,Account, isDeletable ()

C.

accuntRec, sObjectType,isDeletable()

D.

Account,isDeleteable

Buy Now
Questions 51

A developer creates a Lightning web component that imports a method within an Apex class. When a Validate button is pressed, the method runs to execute complex validations.

In this implementation scenario, which two options are.. of the Controller according to the MVC architecture?

Choose 2 answers

Options:

A.

HTML file

B.

Apex class

C.

JavaScript file

D.

XML file

Buy Now
Questions 52

Universal Containers (UC) is developing a process for their sales teams that requires all sales reps to go through a set of scripted steps with each new customer they create.

In the first step of collecting information, UC's ERP system must be checked via a REST endpoint to see if the customer exists. If the customer exists, the data must be presented to the sales rep in Salesforce.

Which two should a developer implement to satisfy the requirements?

Choose 2 answers

Options:

A.

Flow

B.

Invocable method

C.

Future method

D.

Trigger

Buy Now
Questions 53

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.

Buy Now
Questions 54

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.

Buy Now
Questions 55

A developer created a trigger on the Account object and wants to test if the trigger is properly bulkified. 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

Options:

A.

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

B.

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

C.

Create a static resource containing test data.

D.

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

Buy Now
Questions 56

When the code executes, a DML exception is thrown.

How should a developer modify the code to ensure exceptions are handled gracefully?

Options:

A.

Implement the upset DML statement.

B.

Implement Change Data Capture.

C.

Implement a try/catch block for the DML.

D.

Remove null items from the list of Accounts.

Buy Now
Questions 57

Universal Containers (UC) processes orders in Salesforce in a custom object, Order__c. They also allow sales reps to upload CSV files with thousands of orders at a time.

A developer is tasked with integrating orders placed in Salesforce with UC's enterprise resource planning (ERP) system.

After the status for an Order__c is first set to 'Placed', the order information must be sent to a REST endpoint in the ERP system that can

process one order at a time.

What should the developer implement to accomplish this?

Options:

A.

Callout from a Queueable class called from a trigger

B.

Callout from a Batchable class called from a scheduled job

C.

Flow with a callout from an invocable method

D.

Callout from an @future method called from a trigger

Buy Now
Questions 58

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 cade 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.

Buy Now
Questions 59

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

Buy Now
Questions 60

A Developer Edition org has five existing accounts. A developer wants to add 10 more accounts for testing purposes.

The following code is executed in the Developer Console using the Execute Anonymous window:

How many total accounts will be in the org after this code is executed?

Options:

A.

5

B.

6

C.

10

D.

15

Buy Now
Questions 61

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

Buy Now
Questions 62

A developer created a child Lightning web component nested inside a parent Lightning web component. The parent component needs to pass a string value to the child component.

In which two ways can this be accomplished?

Choose 2 answers

Options:

A.

The parent component can invoke a public method in the child component.

B.

The parent component can use a public property to pass the data to the child component,

C.

The parent can use the Apex controller class to send data to the child component.

D.

The parent component can use a custom event to pass the data to the child component.

Buy Now
Questions 63

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.

Add custom controller attributes to display the message.

B.

Use a try/catch with a custom exception class.

C.

Include on the Visualforce page.

D.

Perform the DML using the database.unsert() method,

Buy Now
Questions 64

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

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.

Apex

B.

trigger

C.

Controller

D.

extension

Buy Now
Questions 65

Universal Containers (UC) uses out-of-the-box order management, that has a Master-Detail relationship between Order and Order Line Item.

UC stores the availability date on each Order Line Item and Orders are only shipped when all of the Order Line Items are available.

Which method should be used to calculate the estimated ship date for an Order?

Options:

A.

Use 2 LATEST formula on each of the latest availability date fields.

B.

Use a CEILING formula on each of the latest availability date fields.

C.

Use @ DAYS formula on each of the availability date fields and a COUNT Roll-Up Summary field on the Order.

D.

Use a MAX Roll-Up Summary field on the latest availability date fields.

Buy Now
Questions 66

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.

Use the Data Loader command line.

C.

Define a Data Export scheduled job.

D.

Create a Schedulable Apex class.

Buy Now
Questions 67

A developer has identified a method in an 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 DML 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

Options:

A.

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

B.

Use partial DML statements to ensure only valid data is committed.

C.

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

D.

Use the Database.Savepoint method to enforce database integrity.

Buy Now
Questions 68

Which three code lines are required to create a Lightning component on a Visualforce page?

Choose 2 answers

Options:

A.

B.

$LightningcreateComponent

C.

$Lightning,use

D.

E.

#Lightning,useComponent

Buy Now
Questions 69

A lead developer creates an Apex interface called Laptop. Consider the following code snippet:

public class SilverLaptop{

//code implementation

How can a developer use the Laptop interface within the silverLaptop class?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 70

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 PostalCodeToTimezone__c custom object.

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

Options:

A.

Quick actions

B.

Approval process

C.

Account trigger

D.

Fast Field Updates record-triggered flow

Buy Now
Questions 71

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 Cast record Defect_c records.

B.

Share the parent Case and record_c record.

C.

Share the parent Defect__c record.

D.

Share the case_Defect_c record.

Buy Now
Questions 72

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

Options:

A.

100

B.

0

C.

150

D.

500

Buy Now
Questions 73

What are two use cases for executing Anonymous Apex code?

Choose 2 answers

Options:

A.

schedule an Apex class to run periodically

B.

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

C.

To run a batch Apex class to update all Contacts

D.

To add unit test code coverage to an org

Buy Now
Questions 74

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

Buy Now
Questions 75

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

Buy Now
Questions 76

A developer creates a Lightning web component that imports a method within an Apex class. When a Validate button is pressed, the method runs to execute complex validations.

In this implementation scenario, which two options are.. of the Controller according to the MVC architecture?

Choose 2 answers

Options:

A.

HTML file

B.

Apex class

C.

JavaScript file

D.

XML file

Buy Now
Questions 77

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.

Buy Now
Questions 78

Developers at Universal Containers (UC) use version control to share their code changes, but they notice that when they deploy their code to different environments they often have failures. They decide to set up Continuous Integration (CI).

What should the UC development team use to automatically run tests as part of their CI process?

Options:

A.

Salesforce CLI

B.

Visual Studio Code

C.

Force.com Toolkit

D.

Developer Console

Buy Now
Questions 79

What is the result of the following code snippet?

public word doWork(Account acct) {

for (Integer i = 0; i <= 2007 i++) {

insert acct;

}

Options:

A.

Accounts are inserted.

B.

Account is inserted.

C.

200 Accounts are inserted.

D.

201 Accounts are inserted.

Buy Now
Questions 80

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
Questions 81

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.

Buy Now
Questions 82

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 secondary relationship

B.

Read/Write access on the primary relationship

C.

Read/Write access on the junction object

D.

Read access on the primary relationship

Buy Now
Questions 83

A developer needs to make a custom Lightning Web Component available in the Salesforce Classic user interface Which approach can be used to accomplish this?

Options:

A.

Embed the Lightning Web Component is a Visualforce Component and add directly to the page layout.

B.

Use the Lightning Out JavaScript library to embed the Lightning Web Component in a Visualforce page and add to the page layout.

C.

Use a Visualforce page with a custom controller to invoke the Lightning Web Component using a call to an Apex method.

D.

Wrap the Lightning Web Component in an Aura Component and surface the Aura Component as a Visualforce tab.

Buy Now
Questions 84

Universal Containers is developing a new Lightning web component for their marketing department. They want to ensure that the component is fine-tuned and provides a seamless user experience.

What are some benefits of using the Lightning Component framework?

Options:

A.

Better performance due to client-side rendering

B.

Automatic support for accessibility standards

C.

Compatibility with all web browsers

D.

Easy integration with third-party libraries

Buy Now
Questions 85

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 with sharing keyword on the class declaration.

B.

Use the without sharing keyword on the class declaration.

C.

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

D.

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

Buy Now
Questions 86

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

Buy Now
Questions 87

A developer is asked to write helper methods that create test data for unit tests.

What should be changed in the TestUtils class so that its methods are only usable by unit test methods?

Options:

A.

@isTest above line 03.

B.

Add @istest above line 01.

C.

Change public to private on line 01.

D.

Remove static from line 03.

Buy Now
Questions 88

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

Options:

A.

VS Code

B.

Execute Anonymous

C.

Salesforce CLI

D.

Developer Console

Buy Now
Questions 89

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 cade 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.

Buy Now
Questions 90

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 development does not require Apex test classes.

B.

Declarative development has higher design limits and query limits,

C.

Declarative development can be done using the Setup menu.

D.

Declarative code logic does not require maintenance or review.

Buy Now
Questions 91

Which action causes a before trigger to fire by default for Accounts?

Options:

A.

Renaming or replacing picklists

B.

updating addresses using Mass Address updated tool

C.

Importing data using the Data Loader and the Bulk API

D.

Converting Leads to Contacts

Buy Now
Questions 92

Which code in a Visualforce page and/or controller might present a security vulnerability?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 93

A team of developers is working on a source-driven project that allows them to work independently, with many different org configurations.

Which type of Salesforce orgs should they use for their development?

Options:

A.

Developer sandboxes.

B.

Full Copy sandboxes

C.

Developer orgs

D.

Scratch orgs

Buy Now
Questions 94

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

Buy Now
Questions 95

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;

Buy Now
Questions 96

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.

Buy Now
Questions 97

A developer is implementing an Apex class for a financial system. Within the class, the variables 'creditAmount' and 'debitAmount' 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

Options:

A.

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

B.

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

C.

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

D.

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

Buy Now
Questions 98

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

Options:

A.

Sandbox

B.

Environment Hub

C.

Production

D.

Dev Hub

Buy Now
Questions 99

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.

Buy Now
Questions 100

A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an

OrderlItem object that has a master-detail relationship to Order. During order processing, an order may be split into multiple orders.

What should a developer do to allow their code to move some existing OrderItem records to a new Order record?

Options:

A.

Add without sharing to the Apex class declaration.

B.

Change the master-detail relationship to an external lookup relationship.

C.

Create a junction object between OrderItem and Order.

D.

Select the Allow reprinting option on the master-detail relationship.

Buy Now
Questions 101

A business has a proprietary Order Management System (OMS) that creates orders from its website and fulfills the orders. When the order is created in the OMS, an integration also creates an order record in Salesforce and relates it to the contact as identified by the email on the order. As the order goes through different stages in the OMS, the integration also updates it in Salesforce.

The business notices that each update from the OMS creates a new order record in Salesforce.

Which two actions should prevent the duplicate order records from being created in Salesforce?

Choose 2 answers

Options:

A.

Use the order number from the OMS as an external ID.

B.

Ensure that the order number in the OMS is unique.

C.

O Use the email on the contact record as an external ID.

D.

O Write a trigger on the Order object to delete the duplicates.

Buy Now
Questions 102

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.

Buy Now
Questions 103

Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a master-detail relationship with the standard Account object.

Based on some internal discussions, the UC administrator tried to change the master-detail relationship to a lookup relationship, but was not able to do so.

What is a possible reason that this change was not permitted?

Options:

A.

Some of the Vendor records have null for the Account field.

B.

The Account object has a roll up summary field on the Vendor object.

C.

The Account object does not allow changing a field type for a custom field.

D.

The organization wide default for the Vendor object is Public Read/Write.

Buy Now
Questions 104

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

Buy Now
Questions 105

What are three characteristics of change set deployments?

Choose 3 answers Sending a change set between two orgs requires a deployment connection.

Options:

A.

Change sets can deploy custom settings data.

B.

Change sets can only be used between related organizations.

C.

Deployment is done in a one-way, single transaction.

D.

Sending a change set between two orgs requires a deployment connection.

E.

Change sets can be used to transfer records.

Buy Now
Questions 106

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"

Buy Now
Questions 107

Universal Containers (UC) uses out-of-the-box order management, that has a Master-Detail relationship between Order and Order Line Item.

UC stores the availability date on each Order Line Item and Orders are only shipped when all of the Order Line Items are available.

Which method should be used to calculate the estimated ship date for an Order?

Options:

A.

Use a LATEST formula on each of the latest availability date fields.

B.

Use a CEILING formula on each of the latest availability date fields.

C.

Use a DAYS formula on each of the availability date fields and a COUNT Roll-Up Summary field on the Order.

D.

Use a MAX Roll-Up Summary field on the latest availability date fields.

Buy Now
Questions 108

While writing an Apex class, a developer wants to make sure that all functionality being developed is handled as specified by the requirements.

Which approach should the developer use to be sure that the Apex class is working according to specifications?

Options:

A.

Include a savepoint and pacabase.rollback().

B.

Include a try/catch block to the Apex class.

C.

Run the code in an Execute Anonymous block in the Developer Console.

D.

Create a test class to execute the business logic and run the test in the Developer Console.

Buy Now
Questions 109

Consider the following code snippet:

As part of the deployment cycle, a developer creates the following test class:

When the test class runs, the assertion fails.

Which change should the developer implement in the Apex test method to ensure the test method executes successfully?

Options:

A.

Query the Administrator use into memory and enclose lines 15 and 16 within the system,runAs (use); method.

B.

Query the Standard User into memory and enclose lines 15 and 16 within the system ,runAs; method.

C.

Add @Istest% seeAllDataTrue; to line 12 and enclose lines 15 and 16 within Test .set(Test); and test ste-ptest();.

D.

Add System, runAs (Use; to line 14 and enclose line 15 within Test, startTest); and Test ().

Buy Now
Questions 110

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;

Buy Now
Questions 111

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 Salary__c 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)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 112

A developer must troubleshoot to pinpoint the causes of performance issues when a custom page loads in their org.

Which tool should the developer use to troubleshoot query performance?

Options:

A.

Setup Menu

B.

Visual Studio Code IDE

C.

AppExchange

D.

Developer Console

Buy Now
Questions 113

What are two benefits of using declarative customizations over code?

Choose 2 answer

Options:

A.

Declarative customizations automatically update with each Salesforce release.

B.

Declarative customizations automatically generate test classes.

C.

Declarative customizations cannot generate run time errors

D.

Declarative customizations generally require less maintenance

Buy Now
Questions 114

A developer must provide custom user interfaces when users edit a Contact in either Salesforce Classic or Lightning Experience.

What should the developer use to override the Contact's Edit button and provide this functionality?

Options:

A.

A Lightning component in Salesforce Classic and a Lightning component in Lightning Experience

B.

A Lightning page in Salesforce Classic and a Visualforce page in Lightning Experience

C.

A Visualforce page in Salesforce Classic and a Lightning page in Lightning Experience

D.

A Visualforce page in Salesforce Classic and a Lightning component in Lightning Experience

Buy Now
Questions 115

Managers at Universal Containers want to ensure that only decommissioned containers are able to be deleted in the system. To meet the business requirement a Salesforce developer adds "Decommissioned" as a picklist value for the Status _c custom field within the Container _c object.

Which two approaches could a developer use to enforce only Container records with a status of "Decommissioned" can be deleted?

Choose 2 answers

Options:

A.

Before record-triggered flaw

B.

Apex trigger

C.

After record-triggered flow

D.

Validation rule

Buy Now
Questions 116

Which annotation exposes an Apex class as a RESTful web service?

Options:

A.

@RemoteAction

B.

@RestResource (urlMapping='/myService/*"')

C.

@HttpInvocable

D.

@Aurabnabled(cacheable=true)

Buy Now
Questions 117

When the code executes, a DML exception is thrown.

How should a developer modify the code to ensure exceptions are handled gracefully?

Options:

A.

Implement the upset DML statement.

B.

Implement Change Data Capture.

C.

Implement a try/catch block for the DML.

D.

Remove null items from the list of Accounts.

Buy Now
Questions 118

A developer created a trigger on the Account object. While testing the trigger, the developer sees the error message ‘Maximum trigger depth exceeded’.

What could be the possible causes?

Options:

A.

The developer does not have the correct user permission.

B.

The trigger is too long and should be refactored into a helper class.

C.

The trigger does not have sufficient code coverage.

D.

The trigger is getting executed multiple times.

Buy Now
Questions 119

Which two operations affect the number of times a trigger can fire?

Choose 2 answers

Options:

A.

Criteria-based sharing calculations

B.

Email messages

C.

Roll-up summary fields

D.

After-save record-triggered flow

Buy Now
Exam Code: PDI
Exam Name: Salesforce Certified Platform Developer 1 (WI25)
Last Update: Jan 30, 2025
Questions: 200
PDI pdf

PDI PDF

$25.5  $84.99
PDI Engine

PDI Testing Engine

$30  $99.99
PDI PDF + Engine

PDI PDF + Testing Engine

$40.5  $134.99