Salesforce Certified Platform Developer 온라인 연습
최종 업데이트 시간: 2026년03월09일
당신은 온라인 연습 문제를 통해 Salesforce Plat-Dev-201 시험지식에 대해 자신이 어떻게 알고 있는지 파악한 후 시험 참가 신청 여부를 결정할 수 있다.
시험을 100% 합격하고 시험 준비 시간을 35% 절약하기를 바라며 Plat-Dev-201 덤프 (최신 실제 시험 문제)를 사용 선택하여 현재 최신 204개의 시험 문제와 답을 포함하십시오.
정답:
Explanation:
Why Developer Console?
The Developer Console provides tools to troubleshoot query performance, including the Query Plan tool.
The Query Plan tool evaluates SOQL query performance and provides insight into query costs and optimization.
Why Not Other Options?
A. Setup Menu: Used for administrative tasks, not performance troubleshooting.
B. Visual Studio Code IDE: Useful for development, but does not offer query performance tools.
C. AppExchange: Provides apps but does not directly help with query troubleshooting.
Reference: Query Plan Tool: https: //developer.salesforce.com/docs/atlas.en-us.220.0.salesforce_console.meta/salesforce_console/salesforce_console_query_plan.htm
정답:
Explanation:
Why@TestSetup?
The@TestSetupannotation creates a baseline set of test data once per test class.
Test methods reuse this data, avoiding the need to recreate it repeatedly, which improves efficiency.
Why Not Other Options?
A: HttpCalloutMock is used for mocking callouts, not for creating test data.
C: UsingseeAllData=trueis discouraged because it relies on org data, violating test isolation principles.
D: While creating data inTest.startTest () works, it is less efficient than@TestSetupfor shared data.
Reference: Test Setup Methods: https: //developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_testsetup.htm
정답:
Explanation:
Salesforce requires that every trigger must have at least 1% test coverage to be deployed. Since the trigger in question has 0% test coverage, the deployment will fail even if the helper method and related classes meet the coverage requirement.
Reference: Apex Testing Requirements
정답:
Explanation:
To override the Account's standard Edit button in Lightning Experience, a Lightning action can be created and associated with the object. This action can include custom logic or a Lightning component.
Reference: Lightning Action Overrides
정답:
Explanation:
The Lightning Out library allows a Lightning Web Component to be embedded in a Visualforce page.
This approach is the most suitable to make the LWC accessible in Salesforce Classic.
Reference: Lightning Out Documentation
정답:
Explanation:
In Visualforce, data-binding requires getter and setter methods to access the attributes of a controller. Adding a getter method foractTypeensures that its value is retrieved properly.
정답:
Explanation:
Comprehensive and Detailed Explanation From Exact Extract:
To determine the correct declaration of the class and methods for a custom SOAP Web Service in
Apex, we need to evaluate the syntax and access modifiers required for SOAP Web Services, as well as the handling of helper methods that are not exposed to the external Web Application. Let’s analyze the problem and each option systematically, referencing Salesforce’s official Apex Developer Guide.
Understanding SOAP Web Services in Apex:
SOAP Web Service: Salesforce allows developers to create SOAP Web Services using Apex by defining methods that can be called externally via SOAP. The Apex Developer Guide states: “Apex SOAP Web Services allow external applications to invoke Apex methods over SOAP by exposing them with the webservice keyword” (Salesforce Apex Developer Guide, SOAP Web Services).
Class Declaration: For an Apex class to be a SOAP Web Service, it must be declared as global to allow external access. The Apex Developer Guide specifies: “The class containing SOAP Web Service methods must be declared as global to be accessible externally” (Salesforce Apex Developer Guide, SOAP Web Services).
Method Declaration:
Methods exposed as Web Service operations must be static and annotated with the webservice keyword. The Apex Developer Guide notes: “Methods defined as SOAP Web Service operations must be static and use the webservice keyword” (Salesforce Apex Developer Guide, SOAP Web Services).
The return type and parameters of webservice methods must be compatible with SOAP (e.g \String, Integer, sObjects, etc.).
Helper Methods: The question specifies that helper methods are included but not used by the Web Application, meaning they should not be exposed as part of the Web Service. Helper methods can be private or public and should not have the webservice keyword, ensuring they are not part of the WSDL (Web Service Definition Language) exposed to the external application.
Requirement Analysis:
Class: Must be global to expose the Web Service to external applications.
Web Service Method (updateRecords): Must be static, use the webservice keyword, and be part of the global class to be callable via SOAP.
Helper Method (helperMethod): Should be private (or not webservice) to ensure it’s not exposed in the WSDL and is only used internally within the class.
Evaluating the Options:
A. apex Copy
webservice class WebServiceClass {
private Boolean helperMethod () { /* implementation ... */ }
global static String updateRecords () { /* implementation ... */ }
}
Class Declaration: Uses webservice class instead of global class. The webservice keyword is not a valid modifier for a class in Apex. The Apex Developer Guide clarifies: “The webservice keyword is used for methods, not classes. The class itself must be global” (Salesforce Apex Developer Guide, SOAP Web Services). This results in a compilation error.
Helper Method: private Boolean helperMethod () is correct, as it’s not exposed to the Web Service (no webservice keyword).
Web Service Method: global static String updateRecords () uses global, which is incorrect for a method. Methods in a global class should use webservice to be exposed as Web Service operations, not global. The Apex Developer Guide states: “Methods in a Web Service class use the webservice keyword, not global” (Salesforce Apex Developer Guide, SOAP Web Services).
Conclusion: Incorrect due to invalid class declaration (webservice class) and incorrect method modifier (global instead of webservice).
B. apex Copy
global class WebServiceClass {
private Boolean helperMethod () { /* implementation ... */ } webservice static String updateRecords () { /* implementation ... */ }
}
Class Declaration: Uses global class, which is correct. A SOAP Web Service class must be global to be accessible externally.
Helper Method: private Boolean helperMethod () is correct, as it’s not exposed to the Web Service (no webservice keyword), fulfilling the requirement that it’s not used by the Web Application.
Web Service Method: webservice static String updateRecords () is correct. It uses the webservice keyword to expose the method as a Web Service operation, is static as required, and returns a SOAP-compatible type (String).
Conclusion: Correct, as it meets all requirements for a SOAP Web Service class, exposes the
updateRecords method properly, and keeps the helper method internal.
C. apex Copy
webservice class WebServiceClass {
private Boolean helperMethod () { /* implementation ... */ } webservice static String updateRecords () { /* implementation ... */ }
}
Class Declaration: Uses webservice class, which, as noted in option A, is invalid. The class must be global, not webservice.
Helper Method: private Boolean helperMethod () is correct (not exposed).
Web Service Method: webservice static String updateRecords () is correct in syntax, but the class declaration error makes the entire code segment invalid.
Conclusion: Incorrect due to the invalid class declaration (webservice class).
D. apex Copy
global class WebServiceClass {
private Boolean helperMethod () { /* implementation ... */ } global String updateRecords () { /* implementation ... */ }
}
Class Declaration: Uses global class, which is correct.
Helper Method: private Boolean helperMethod () is correct (not exposed).
Web Service Method: global String updateRecords () is incorrect. The method uses global instead of webservice, and it’s not static. For a method to be exposed as a SOAP Web Service operation, it must be webservice and static. Additionally, global is not a valid modifier for methods in this context; it’s used for the class. The Apex Developer Guide warns: “Non-static methods or methods without the webservice keyword are not exposed in the WSDL” (Salesforce Apex Developer Guide, SOAP Web Services).
Conclusion: Incorrect, as the updateRecords method is not properly exposed as a Web Service operation (missing webservice and static).
Why Option B is Correct:
Option B is correct because:
The class is declared as global class WebServiceClass, making it accessible to external applications as required for a SOAP Web Service.
The updateRecords method is declared as webservice static String updateRecords (), correctly exposing it as a Web Service operation that can be called via SOAP.
The helper method helperMethod is private and lacks the webservice keyword, ensuring it’s not exposed in the WSDL and is only used internally, meeting the requirement that it’s not used by the Web Application.
This aligns with Salesforce best practices for SOAP Web Services as outlined in the Apex Developer Guide.
Example for Clarity:
Here’s how option B would be implemented in a complete Apex class:
apex
Copy
global class WebServiceClass {
// Helper method, not exposed in the WSDL private Boolean helperMethod () {
return true; // Example implementation
}
// Web Service method, exposed in the WSDL webservice static String updateRecords () {
if (helperMethod () ) {
return 'Records updated successfully';
}
return 'Update failed';
}
}
When this class is deployed, Salesforce generates a WSDL that includes the updateRecords method but excludes helperMethod, allowing the external Web Application to call updateRecords via SOAP while keeping helperMethod internal.
Handling Typos:
The options are syntactically correct in the provided image, with no typos to address. The placeholders (/* implementation ... */) are standard for indicating omitted code and do not affect the analysis.
The question’s phrasing is clear, and the options align with typical Apex syntax patterns for Web Services.
Reference: Salesforce Apex Developer Guide:
“SOAP Web Services” section: Details the requirements for SOAP Web Service classes (global) and methods (webservice, static).
“Access Modifiers” section: Explains global, private, and webservice keywords.
(Available at: https: //developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/)
Platform Developer I Study Guide:
Section on “Salesforce Platform and Declarative Features”: Covers creating and exposing SOAP Web Services in Apex.
(Available at: https: //trailhead.salesforce.com/en/content/learn/modules/platform-developer-i-certification-study-guide)
정답:
Explanation:
Why Re-Parentable Master-Detail Field?
A master-detail relationship allows Line Items to roll up totals (e.g., calculate total amount) to the Order.
Setting the relationship asre-parentablesupports moving Line Items between different Orders.
Why Not Other Options?
B. Lookup field: Does not support roll-up summary fields for calculations.
C and D: Relationships in the opposite direction (Order to Line Item) do not support the required logic.
Reference: Master-Detail Relationships: https: //developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/relationships_master_detail.htm
Below is the formatted response for the provided question, adhering to the specified format and requirements. The question falls under the Salesforce Platform and Declarative Features topic, as it involves implementing a SOAP Web Service in Apex, which is a key concept in the Salesforce Platform Developer I certification. The answer is based on official Salesforce Platform Developer I documentation, with a comprehensive explanation and references to relevant Salesforce documentation.
정답:
Explanation:
Lightning Web Components (LWC):
Fully responsive and designed to handle touch events.
Executes on stateful clients with high performance.
Aura Components:
Supports responsive designs and touch events but is slightly less efficient than LWC.
Why Not Other Options?
B. Visualforce Components: Not designed for responsiveness or touch event handling.
C. Visualforce Pages: Primarily server-rendered and not stateful for touch interactions.
Reference: LWC Overview: https: //developer.salesforce.com/docs/component-library/documentation/en/lwc
정답:
Explanation:
Account Trigger:
Apex triggers allow for complex logic to retrieve and update theTimezonefield based onPostalCodeToTimezone__c.
Fast Field Updates Record-Triggered Flow:
A record-triggered flow in Fast Field Updates mode can fetch the necessary data fromPostalCodeToTimezone__cand update the Account.
Why Not Other Options?
A. Quick actions: Used for user interface updates, not for automation based on edits.
B. Approval process: Not relevant to dynamic field updates.
Reference: Record-Triggered
Flow: https: //help.salesforce.com/s/articleView?id=sf.flow_build_trigger.htm
정답:
Explanation:
Why Queueable Class?
Queueable Apex supports callouts and allows chaining to process one record at a time efficiently.
The trigger detects when theOrder__cstatus changes to "Placed" and enqueues the Queueable class to perform the callout.
Why Not Other Options?
B. Batchable class: Batch jobs are ideal for bulk processing but not suited for single REST callouts.
C. Flow with invocable method: Flows are less efficient and limited in handling callouts for large-scale operations.
D. @future method: While it supports asynchronous callouts, it does not allow chaining, making Queueable more suitable.
Reference: Queueable Apex: https: //developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_queueing_jobs.htm
정답:
Explanation:
Comprehensive and Detailed Explanation From Exact Extract:
To determine the correct component code to meet the requirements for desktops and tablets, we need to analyze the behavior of the <lightning: layout> and <lightning: layoutItem> components in Salesforce Lightning, focusing on their responsive design attributes. Let’s break11: 51 PM BST on Friday, May 30, 2025, break down the problem and evaluate each option systematically, referencing Salesforce’s official documentation.
Understanding the Requirements and Components:
Components: The code uses <lightning: layout> and <lightning: layoutItem>, which are part of the Salesforce Lightning Design System (SLDS) grid system for building responsive layouts in Aura components.
Requirements Breakdown:
Mobile Devices: The information (Name, AccountNumber, Industry) should display in three rows.
Desktops and Tablets: The information should display in a single row.
Current Issue: The provided code has multipleRows="true", which forces each <lightning: layoutItem> to start on a new row, regardless of device size. This satisfies the mobile requirement (three rows), but fails the desktop/tablet requirement (single row).
Responsive Grid: The SLDS grid system uses a 12-column layout. The <lightning: layoutItem> component supports attributes like size (for small devices, e.g., mobile), mediumDeviceSize (for tablets), and largeDeviceSize (for desktops) to control column widths across device sizes. The Lightning Design System documentation states: “The grid system allows you to specify the width of a layoutItem for different device sizes using size, mediumDeviceSize, and largeDeviceSize attributes” (Salesforce Lightning Design System, Grid System).
Key Attributes and Device Breakpoints:
Device Sizes:
size: Applies to small devices (mobile, < 768px). mediumDeviceSize: Applies to medium devices (tablets, ≥ 768px). largeDeviceSize: Applies to large devices (desktops, ≥ 1024px). Grid Behavior:
Each <lightning: layoutItem> occupies a number of columns based on the specified size attribute.
If the total columns in a row exceed 12, the next <lightning: layoutItem> wraps to a new row, unless multipleRows="true" forces each item to a new row.
If multipleRows="true", each <lightning: layoutItem> starts on a new row, ignoring column sizes.
Requirement Analysis:
Mobile (size): Each <lightning: layoutItem> should use the full row (size="12") to create three rows (one per field).
Tablets (mediumDeviceSize): Should ideally be in one row, but the requirement specifies desktops and tablets together, so we’ll interpret this as both needing a single row.
Desktops (largeDeviceSize): All three fields should fit in one row, meaning the total columns must be ≤ 12.
Fixing the Issue:
Remove multipleRows="true": Setting multipleRows="true" forces each <lightning: layoutItem> to a new row, which prevents the desktop/tablet requirement (single row) from being met. The Lightning Component Reference states: “When multipleRows is true, each layoutItem starts a new row” (Salesforce Lightning Component Reference, lightning: layout). To allow items to stay in the same row on larger devices, multipleRows should be omitted or set to false (default).
Set Column Sizes:
For mobile (size="12"), each item takes the full row (12 columns), resulting in three rows.
For tablets and desktops, we need all three fields in one row. Since there are three fields, each should take 4 columns (12 total columns ÷ 3 fields = 4 columns per field) to fit in one row.
Both mediumDeviceSize (tablets) and largeDeviceSize (desktops) should be set to 4 to ensure a single row on both device types.
Evaluating the Options:
A. <lightning: layout multipleRows="true">
<lightning: layoutItem size="12" mediumDeviceSize="4">{!v.account.Name}</lightning: layoutItem>
<lightning: layoutItem size="12"
mediumDeviceSize="4">{!v.account.AccountNumber}</lightning: layoutItem>
<lightning: layoutItem size="12"
mediumDeviceSize="4">{!v.account.Industry}</lightning: layoutItem>
</lightning: layout>
Mobile: size="12" → Each item takes 12 columns, creating three rows (meets requirement).
Tablets: mediumDeviceSize="4" → Each item takes 4 columns, but multipleRows="true" forces each item to a new row, resulting in three rows (fails desktop/tablet requirement).
Desktops: No largeDeviceSize specified, so it inherits mediumDeviceSize="4", but multipleRows="true" still forces three rows (fails).
Conclusion: Incorrect, as multipleRows="true" prevents a single row on tablets and desktops.
B. <lightning: layout multipleRows="true">
<lightning: layoutItem size="12" mediumDeviceSize="4">{!v.account.Name}</lightning: layoutItem>
<lightning: layoutItem size="12"
largeDeviceSize="4">{!v.account.AccountNumber}</lightning: layoutItem>
<lightning: layoutItem size="12" largeDeviceSize="4">{!v.account.Industry}</lightning: layoutItem>
</lightning: layout>
Mobile: size="12" → Three rows (meets requirement).
Tablets: First item has mediumDeviceSize="4", but the other two have no mediumDeviceSize, so they inherit size="12". With multipleRows="true", it’s still three rows (fails).
Desktops: largeDeviceSize="4" for the last two items, but the first item has no largeDeviceSize, so it uses mediumDeviceSize="4". However, multipleRows="true" forces three rows (fails).
Conclusion: Incorrect, as multipleRows="true" prevents a single row, and the first item lacks largeDeviceSize.
C. <lightning: layout multipleRows="true">
<lightning: layoutItem size="12" mediumDeviceSize="6">{!v.account.Name}</lightning: layoutItem>
<lightning: layoutItem size="12"
mediumDeviceSize="6">{!v.account.AccountNumber}</lightning: layoutItem>
<lightning: layoutItem size="12"
mediumDeviceSize="6">{!v.account.Industry}</lightning: layoutItem>
</lightning: layout>
Mobile: size="12" → Three rows (meets requirement).
Tablets: mediumDeviceSize="6" → Total columns = 6 + 6 + 6 = 18. Without multipleRows="true", this would wrap into two rows (6 + 6, then 6), but with multipleRows="true", it forces three rows (fails).
Desktops: No largeDeviceSize, so it uses mediumDeviceSize="6", still three rows due to multipleRows="true" (fails).
Conclusion: Incorrect, as multipleRows="true" prevents a single row, and even without it, the total columns (18) exceed 12, creating multiple rows.
D. <lightning: layout multipleRows="true">
<lightning: layoutItem size="12" mediumDeviceSize="6" largeDeviceSize="4">{!v.account.Name}</lightning: layoutItem>
<lightning: layoutItem size="12" mediumDeviceSize="6" largeDeviceSize="4">{!v.account.AccountNumber}</lightning: layoutItem>
<lightning: layoutItem size="12" mediumDeviceSize="6" largeDeviceSize="4">{!v.account.Industry}</lightning: layoutItem>
</lightning: layout>
Mobile: size="12" → Three rows (meets requirement).
Tablets: mediumDeviceSize="6" → Total columns = 6 + 6 + 6 = 18. With multipleRows="true", this forces three rows (fails tablet requirement).
Desktops: largeDeviceSize="4" → Total columns = 4 + 4 + 4 = 12, which fits in one row. However, multipleRows="true" forces three rows (fails desktop requirement).
Conclusion: Appears incorrect due to multipleRows="true", but let’s reconsider the interpretation of the requirement.
Reinterpreting the Requirement:
The question states: “Requirement 2 is not displaying as desired,” and Requirement 2 is “For desktops and tablets, the information should display in a single row.” However, the options all include multipleRows="true", which inherently conflicts with the desktop/tablet requirement.
Assumption: The inclusion of multipleRows="true" in all options might be a mistake in the question, as it directly contradicts the requirement for desktops and tablets. Let’s evaluate option D without multipleRows="true" (assuming it’s a typo in the question):
<lightning: layout>
<lightning: layoutItem size="12" mediumDeviceSize="6" largeDeviceSize="4">{!v.account.Name}</lightning: layoutItem>
<lightning: layoutItem size="12" mediumDeviceSize="6"
largeDeviceSize="4">{!v.account.AccountNumber}</lightning: layoutItem>
<lightning: layoutItem size="12" mediumDeviceSize="6" largeDeviceSize="4">{!v.account.Industry}</lightning: layoutItem>
</lightning: layout>
Mobile: size="12" → Each item takes 12 columns, creating three rows (meets requirement).
Tablets: mediumDeviceSize="6" → Total columns = 6 + 6 + 6 = 18. First two items fit in one row (6 + 6
= 12), third item wraps to a second row (6), resulting in two rows (fails tablet single-row requirement).
Desktops: largeDeviceSize="4" → Total columns = 4 + 4 + 4 = 12, all fit in one row (meets desktop requirement).
Interpretation Adjustment: The requirement specifies “desktops and tablets” together, but the SLDS grid treats them separately (mediumDeviceSize for tablets, largeDeviceSize for desktops). Option D is the only one that sets largeDeviceSize="4", ensuring a single row on desktops. For tablets, it results in two rows, which contradicts the requirement if tablets must also be in a single row. However, if we prioritize desktops (as the most specific match for largeDeviceSize), option D is the closest fit.
“
Why Option D is Correct (with Assumption):
Option D is the best match if we assume multipleRows="true" is a typo in the
question:
Without multipleRows="true", option D becomes:
<lightning: layout>
<lightning: layoutItem size="12" mediumDeviceSize="6" largeDeviceSize="4">{!v.account.Name}</lightning: layoutItem>
<lightning: layoutItem size="12" mediumDeviceSize="6" largeDeviceSize="4">{!v.account.AccountNumber}</lightning: layoutItem>
<lightning: layoutItem size="12" mediumDeviceSize="6" largeDeviceSize="4">{!v.account.Industry}</lightning: layoutItem>
</lightning: layout>
It meets the mobile requirement (size="12", three rows).
It meets the desktop requirement (largeDeviceSize="4", total 12 columns, one row).
For tablets, it results in two rows (mediumDeviceSize="6", total 18 columns), which may not strictly meet the requirement, but the question’s focus on “desktops and tablets” might prioritize desktops, where it succeeds.
The other options either fail to set largeDeviceSize correctly (A, C) or have inconsistent attributes (B).
Handling Typos:
The provided code has typos:
<flighting: layoutitem> → <lightning: layoutItem>.
<lighting: layoutitem> → <lightning: layoutItem>.
Extra space in 3ize → size.
These are corrected in the analysis to match the intended component names.
The presence of multipleRows="true" in all options contradicts the desktop/tablet requirement. We assume this is a mistake in the question, as no option would meet the requirement otherwise. Removing multipleRows="true" makes option D the closest match.
Reference: Salesforce Lightning Component
Reference: “lightning: layout” section: Explains multipleRows and its impact on row wrapping.
“lightning: layoutItem” section: Details size, mediumDeviceSize, and largeDeviceSize attributes for responsive design.
(Available at: https: //developer.salesforce.com/docs/component-library/bundle/lightning: layout)
Salesforce Lightning Design System:
“Grid System” section: Describes the 12-column grid and responsive breakpoints.
(Available at: https: //www.lightningdesignsystem.com/utilities/grid/)
Platform Developer I Study Guide:
Section on “User Interface”: Covers building responsive layouts with Lightning components. (Available at: https: //trailhead.salesforce.com/en/content/learn/modules/platform-developer-i-certification-study-guide)
정답:
Explanation:
Comprehensive and Detailed Explanation From Exact Extract:
By default, Apex tests run in a system context that does not respect sharing rules. However, the getAllAccounts method is defined in a with sharing class, so it does respect sharing rules. Therefore, to correctly simulate how a Standard User would see the data, the test must be run in the context of that user.
To do this, the developer should use System.runAs () to switch the test context to the Standard User, ensuring that sharing rules are enforced for the user running the test. This allows the test to correctly verify the data the user can access.
Example of Corrected Test Method:
apex
CopyEdit
@isTest
private static void getAllAccounts_StandardUser_Test () {
User standardUser = [SELECT Id FROM User WHERE Profile.Name = 'Standard User' AND UserName = '[email protected]' AND isActive = true LIMIT 1];
System.runAs (standardUser) {
List<Account> result = AccountsController.getAllAccounts () ;
System.assertEquals (20, result.size () ) ;
}
}
Reference: Apex Testing Best Practices - Using runAs ()
정답:
Explanation:
The deployment fails because the Apex trigger has 0% test coverage. Even though the helper class is covered, Salesforce requires at least 1% test coverage for the trigger itself. To resolve this, a test class and methods must specifically invoke the trigger by performing DML operations on the related object.
Reference: Apex Testing Framework
정답:
Explanation:
Since theCaseandDefect__cobjects have aPrivateorganization-wide default (OWD), their records must be explicitly shared for a user to gain access to the relatedCase_Defect__crecord. Sharing both parent records ensures that the user can access the junction object and the associated parent objects.
Reference: Salesforce Sharing and Visibility