Salesforce-Platform-Developer Practice Test
Updated On 1-Jan-2026
237 Questions
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. What should be built to implement this feature?
A. Account custom trigger
B. Account approval process
C. Account assignment rule
D. Account workflow rule
Explanation:
Since the requirement is to update the Timezone field dynamically whenever the Postal Code changes, the best solution is an Apex trigger on the Account object.
Why a Custom Trigger?
✅ Executes automatically on field updates → Ensures that Timezone is updated when Postal Code changes.
✅ Allows complex logic → Can query the postalCodeToTimezone__c object to retrieve the corresponding Timezone value.
✅ Efficient and scalable → Can process updates in bulk, preventing excessive automation overhead.
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
A. Roll-Up Summaries
B. Triggers
C. Relationships
D. Flow
E. Custom Objects and Fields
C. Relationships
E. Custom Objects and Fields
Explanation:
1️⃣ Roll-Up Summaries (A)
Used in Master-Detail relationships to aggregate child record data at the parent level.
Allows SUM, COUNT, MIN, and MAX calculations without requiring code.
2️⃣ Relationships (C)
Defines how data is structured in the database via Lookup or Master-Detail relationships.
Controls record ownership, cascading deletion, and roll-up capabilities.
3️⃣ Custom Objects & Fields (E)
Forms the foundation of the database layer in Salesforce.
Allows storage and tracking of unique business data.
Why Not B or D?
B. Triggers → Triggers require Apex code, making them non-declarative.
D. Flow → While Flow is declarative, it focuses on automation rather than database structure.
Which three resources in an Azure Component can contain JavaScript functions?
A. Controllers
B. helper
C. Design
D. Style
E. Renderer
B. helper
E. Renderer
Explanation:
Controllers (A)
Controllers handle user interactions and business logic.
JavaScript functions here are used for event handling and calling server-side methods.
Helper (B)
Helpers provide shared utility functions that multiple components can use.
They help organize logic separately from the controller, making code modular.
Renderer (E)
Renderers handle how components are drawn on the UI.
JavaScript in the renderer modifies component rendering behavior before displaying it.
Why Not C or D?
C. Design → Used for defining component properties, not for executing JavaScript.
D. Style → Contains CSS styling, not JavaScript functions.
Which code in a Visualforce page and/or controller might present a security vulnerability?
A. Option A
B. Option B
C. Option C
D. Option D
Explanation:
Why Option B is a Security Vulnerability:
This code outputs user-supplied input ($CurrentPage.parameters.userInput) without escaping it (escape="false").
Disabling escaping exposes the page to Cross-Site Scripting (XSS), where malicious scripts can be injected and executed in the user’s browser.
User input should always be escaped or validated to avoid code injection attacks.
Why Not the Other Options:
A.
This uses controller-bound data (ctrl.userinput) and doesn’t display raw URL input.
apex:outputField automatically escapes HTML, so it’s safe.
C.
Similar to A, this uses safe output escaping via outputField.
D.
Though this uses raw user input from the URL, it does escape HTML by default, mitigating XSS.
Universal Container wants Opportunities to no longer be editable when itreaches the Closed/Won stage. Which two strategies can a developer use to accomplish this? Choose2 answer
A. Use a validation
B. Use a trigger
C. Use an after-save flow.
D. Use the Process Automation settings.
B. Use a trigger
Explanation:
A. Use a validation rule
A validation rule is the simplest and most maintainable way to prevent users from editing a record based on certain criteria, like a specific stage value.
It’s declarative (no code needed).
You can write a formula like:
AND(ISCHANGED(StageName), ISPICKVAL(StageName, "Closed Won"))
Can also include NOT(ISNEW()) to block updates after creation if needed.
B. Use a trigger
An Apex trigger offers fine-grained control over record updates and is useful if:
Complex business logic or conditions are required.
You need to enforce this logic beyond UI changes (like API or integrations).
A simple before update trigger can throw an error if the Opportunity is in "Closed Won".
| Salesforce-Platform-Developer Exam Questions - Home | Previous |
| Page 8 out of 48 Pages |