Practice Free Plat-Dev-201 Exam Online Questions
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 inSalesforce 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
- 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.
A,B
Explanation:
A: Using the order number as an external ID ensures Salesforce can identify and update existing records instead of creating duplicates during updates.
B: Ensuring the order number is unique in the OMS guarantees that there will not be multiple records in Salesforce corresponding to a single order.
Reference: External IDs in Salesforce
Incorrect Options:
C: Email on the contact is unrelated to the uniqueness of order records.
D: Deleting duplicates with triggers is reactive and not a best practice.
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?
- 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
D
Explanation:
To override the Edit button in both Salesforce Classic and Lightning Experience:
Use aVisualforce pagefor Salesforce Classic.
Use aLightning componentfor Lightning Experience by configuring the Lightning override.
Reference: Overriding Standard Buttons
Incorrect Options:
A, B, C: Lightning components and pages cannot be used in Classic.
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
- 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.
A,C
Explanation:
A: Declarative development does not require Apex test classes since it leverages built-in Salesforce features such as flows, process builders, and validation rules.
C: Declarative development can be done using the Setup menu, which includes point-and-click tools like page layouts, workflows, and Lightning App Builder.
Why not other options?
B: Declarative development has strict limits (e.g., process builders and flows have governor limits that are lower than programmatic approaches like Apex).
D: Declarative logic still requires maintenance, especially as business needs evolve.
Declarative vs Programmatic Development
A developer writes a trigger on the Account object on the before update event that increments a count field. A record triggered flow also increments the count field every time that an Account is created or updated.
What is the value of the count field if an Account is inserted with an initial value of zero, assuming no other automation logic is implemented on the Account?
- A . 4
- B . 2
- C . 1
- D . 3
A
Explanation:
When an Account record is created, the following happens:
Before insert triggerincrements the count field once.
After insert record-triggered flowexecutes and increments the count again.
When the record is subsequently updated:
Before update triggerincrements the count again.
After update record-triggered flowincrements it once more.
Thus, the final value of thecountfield =4.
: Order of Execution in Salesforce
What can be easily developed using the Lightning Component framework?
- A . Salesforce Classic user interface pages
- B . Lightning Pages
- C . Customized JavaScript buttons
- D . Salesforce integrations
B
Explanation:
Why Lightning Pages?
The Lightning Component framework is designed for building responsive Lightning Pages.
Allows for dynamic and modular development.
Why Not Other Options?
A: Salesforce Classic does not support Lightning Components.
C: JavaScript buttons are replaced by Quick Actions in Lightning Experience.
D: While integrations are possible, the framework is not primarily used for integrations.
Reference: Lightning Components Overview: https: //developer.salesforce.com/docs/component-library/documentation/en/lwc
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 . html CopyEdit
<lightning-input type="number" value="Salary__c" formatter="currency"></lightning-input> - B . html
CopyEdit
<lightning-formatted-number value="Salary__c" format-style="currency"></lightning-formatted-number> - C . html CopyEdit
<lightning-input-field field-name="Salary__c"></lightning-input-field> - D . html
CopyEdit
<lightning-input-currency value="Salary__c"></lightning-input-currency>
C
Explanation:
Comprehensive and Detailed Explanation From Exact Extract:
The lightning-input-field component automatically respects field-level security and permissions. When used within a lightning-record-edit-form, it ensures that the field is displayed as a currency input and follows user permissions (viewable/editable) for the Salary__c field.
Reference: lightning-input-field documentation
Enforce Field-Level Security in Lightning
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?
- A . Schedule a report.
- B . Use the Data Loader command line.
- C . Define a Data Export scheduled job.
- D . Create a Schedulable Apex class.
C
Explanation:
Why Data Export Scheduled Job?
Salesforce provides an out-of-the-boxData Exportfeature that allows organizations to back up their data, including attachments.
This feature can be scheduled to run automatically on a monthly basis, fulfilling the requirement.
Why Not Other Options?
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?
- A . throw new ParityException () ;
- B . throw new parityException (‘parity does not match’) ;
- C . new ParityException () ;
- D . new ParityException (‘parity does not match’) ;
A,B
Explanation:
Throwing Exceptions in Apex:
throw new ExceptionType () ;creates a new instance and throws it.
A: No argument constructor.
B: Constructor with a custom error message.
Why Not Other Options?
C and D: These create exception instances but do not throw them, which is not valid syntax for firing an exception.
Reference: Apex Exception Handling: https: //developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_exception_methods.htm
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
- 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.
A,B
Explanation:
SOSL:
Designed for full-text searches, making it faster for unstructured or broad text searches across multiple objects.
Ideal for searching multiple fields simultaneously.
SOQL:
Optimized for structured queries where you need more control over filtering and relationships.
Can return up to 50,000 records in a single query, while SOSL returns only 2,000.
CandDare incorrect because SOSL is faster for text searches, not SOQL.
Reference: SOQL vs. SOSL: https: //developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_sosl_intro.htm
Which two settings must be defined In order to update a record of a junction object? Choose 2 answers
- 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
B,C
Explanation:
Option B: To update a junction object, the user needsRead/Writeaccess to the primary relationship object.
Option C: The user must also haveRead/Writeaccess on the junction object itself.
: Junction Objects Documentation
