Salesforce Certified Platform Developer Plat-Dev-201 Exam Questions

Page: 1 / 14
Total 204 questions
Question 1

Where are two locations a developer can look to find information about the status of batch or future methods?

Choose 2 answers



Answer : A, B

Option A (Developer Console):The Developer Console provides a detailed view of the execution logs and the status of Apex batch or future methods.

Option B (Apex Jobs):The Apex Jobs page in Salesforce Setup shows the status of queued, in-progress, or completed batch and scheduled jobs.


Incorrect Options:

C (Paused Flow Interviews):Only used for paused flows, not batch or future jobs.

D (Apex Flex Queue):Used for managing batch job execution order, not monitoring job status.

Question 2

What is a considerations for running a flow in debug mode?



Answer : C

When running a flow in debug mode, Salesforce rolls back any DML operations performed during the debugging process to ensure no data changes affect the org. This helps test and verify flow logic without impacting live data.


Question 3

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



Answer : A, B

A: A Flow can guide sales reps through a set of scripted steps and call an Apex action to interact with an external REST endpoint.

B: An Invocable method is used to make an Apex method callable from a Flow. This method can call the REST endpoint and return the data for display.

Why not other options?

C: Future methods are asynchronous and cannot return data to the user in real time.

D: Triggers are used for database events, not for guiding users through scripted processes or making REST calls.

:

Invocable Methods in Flows


Question 4

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?



Answer : A

When writing test classes, accessing the Standard Price Book is essential for creatingOpportunityLineItemrecords.

The methodTest.getStandardPricebookId()is specifically designed to retrieve the Standard Price Book ID in a test class context. This ensures you can work with the price book without requiring@isTest(SeeAllData=true).

Why not other options?

B:@isTest(SeeAllData=true)is not recommended because it violates Salesforce best practices by accessing actual org data.

C:@TestVisibleis used for visibility between classes but does not relate to retrieving Standard Price Book.

D:Test.loadData()loads test data from static resources but is unnecessary for accessing the Standard Price Book.

:

Salesforce Testing Framework

Apex Testing Best Practices


Question 5

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

Choose 3 answers



Answer : A, C, E

Lightning Web Components (LWCs) have access to a variety of resources in Salesforce. Below are the supported resources:

Static Resources (A):You can use static resources to reference JavaScript libraries, images, and other files needed in an LWC.


SVG Resources (C):LWCs can use custom SVG files for icons or other visual elements.

Content Asset Files (E):Content asset files, like images or videos, stored in Salesforce can be accessed and used in LWC.

Incorrect Options:

B . All external libraries:Only libraries uploaded as static resources are supported, not directly external libraries.

D . Third-party web components:While supported, additional configuration is needed to use them effectively.

Question 6

A developer created a new after insert trigger on the Lead object that creates Task records for each Lead.

After deploying to production, an existing outside integration that inserts Lead records in batches to Salesforce is occasionally reporting total batch failures being caused by the Task insert statement. This causes the integration process in the outside system to stop, requiring a manual restart.

Which change should the developer make to allow the integration to continue when some records in a batch cause failures due to the Task

insert statement, so that manual restarts are not needed?



Answer : D

A try-catch block allows the batch to continue processing even if some records cause errors. Errors can be logged for review, ensuring the integration process does not stop entirely.


Incorrect Options:

A:Database.insertwithallowPartialwould be required for partial processing but is not mentioned.

B:Deactivating the trigger disrupts other processes.

C:Removing Apex classes is unrelated.

Question 7

A lead developer creates an Apex interface called Laptop.

Consider the following code snippet:

apex

CopyEdit

public class SilverLaptop {

// code implementation

}

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



Answer : B

Comprehensive and Detailed Explanation From Exact Extract:

To implement an interface in Apex, the implements keyword is used in the class definition. This ensures that the class provides concrete implementations of the interface's methods.


Apex Developer Guide: Interfaces

Page:    1 / 14   
Total 204 questions