▸case-03 A Salesforce query on a custom object Invoice__c with millions of records is failing due to non-selective query errors. The query currently uses 'SELECT Id FROM Invoice__c WHERE Status__c != "Closed" AND Account__r.Name LIKE "%Acme%"'. Rewrite the SOQL query to leverage selective indexing and avoid non-indexed patterns like leading wildcards and negative comparison operators. | pass→pass | 11,369 | 12,393 | +9% | 1 | 1 | 0% | 1,909 | 2,462 | +29% | 0 | 0 | — |
▸case-01 Write a Salesforce Apex trigger on Opportunity that updates the associated Account's Rating to 'Hot' whenever an Opportunity is updated to 'Closed Won'. Developers often write 'update account;' inside a 'for (Opportunity opp : Trigger.new)' loop. Produce the correct bulkified Apex trigger. | fail→fail | 8,258 | 10,367 | +26% | 1 | 1 | 0% | 1,590 | 2,440 | +53% | 0 | 0 | — |
▸case-02 You are creating a child LWC component 'childCard' that fires a custom event when a button is clicked. The event needs to cross the shadow DOM boundary to reach parent components higher up the component tree beyond the immediate parent. A junior developer sets 'new CustomEvent("cardselect", { bubbles: true })'. Write the LWC JavaScript event dispatch code that ensures the event crosses the shadow DOM boundary. | pass→pass | 4,240 | 5,911 | +39% | 1 | 1 | 0% | 839 | 1,310 | +56% | 0 | 0 | — |
▸case-04 An Apex REST endpoint queries Contact records based on an incoming search term. To pass security review, the developer must enforce object and field-level security checks during SOQL execution without manually inspecting Schema.sObjectType describe results. Write the Apex SOQL query using the modern database security clause. | pass→pass | 6,021 | 8,595 | +43% | 1 | 1 | 0% | 1,119 | 1,749 | +56% | 0 | 0 | — |
▸case-05 Build an Apex Batch job AccountRevenueAggregator that iterates through all Account records and calculates the cumulative total revenue across all batches, updating a summary log in the finish method. Developers often try using a standard instance variable, but notice it resets on every batch execution. Write the Apex batch class declaration and interface structure that maintains state across batch chunks. | pass→pass | 8,637 | 9,730 | +13% | 1 | 1 | 0% | 1,747 | 2,175 | +24% | 0 | 0 | — |
▸case-06 You need to chain an asynchronous Apex job from inside another asynchronous job to process external API pagination. A common mistake is attempting to use @future methods, which cannot be chained. Write the Apex class structure using the appropriate interface that allows job chaining. | pass→pass | 9,809 | 8,809 | -10% | 1 | 1 | 0% | 1,963 | 1,836 | -6% | 0 | 0 | — |
▸case-07 A developer needs to create a developer scratch org from the command line using modern Salesforce CLI syntax ('sf' executable) with a 30-day duration, using the configuration file config/project-scratch-def.json, setting it as default, and assigning the alias dev-scratch. Write the CLI command line. | pass→pass | 4,599 | 4,070 | -12% | 1 | 1 | 0% | 881 | 1,015 | +15% | 0 | 0 | — |
▸case-08 In a test class AccountServiceTest, multiple test methods require 200 test Account records and associated Contacts. Creating these records inside every test method causes slow test runs and governor limit errors. Write the Apex test setup method pattern that creates shared test data once per test class execution. | pass→pass | 7,497 | 8,714 | +16% | 1 | 1 | 0% | 1,515 | 1,863 | +23% | 0 | 0 | — |
▸case-09 An integration requires publishing custom event messages Order_Event__e from Apex when an order is processed. Developers sometimes mistakenly attempt to insert them with standard 'insert orderEvent;' without inspecting publish results. Write the Apex code that publishes a list of Order_Event__e instances using the dedicated EventBus service and inspects the return values. | pass→pass | 7,288 | 8,675 | +19% | 1 | 1 | 0% | 1,494 | 1,995 | +34% | 0 | 0 | — |
▸case-10 An LWC component needs to fetch a list of Contacts based on a dynamic recordId property using an Apex method getContactsByAccountId. The developer wrote an imperative Apex call in connectedCallback, but wants to use the reactive Lightning Wire Service instead. Write the Apex method annotation required and the corresponding JS wire decorator syntax. | pass→pass | 5,281 | 7,833 | +48% | 1 | 1 | 0% | 975 | 1,429 | +47% | 0 | 0 | — |
▸case-11 During CI/CD pipeline execution, a developer needs to deploy source code from the repository using modern Salesforce CLI ('sf' executable) while running only specific Apex test classes (AccountServiceTest and ContactServiceTest) to avoid running all local tests in production. Write the CLI deployment command. | pass→pass | 5,699 | 5,907 | +4% | 1 | 1 | 0% | 1,095 | 1,325 | +21% | 0 | 0 | — |
▸case-12 An after update trigger on Contact updates related Accounts, which in turn triggers another Contact update, causing infinite recursion. Developers sometimes try to fix this by disabling triggers globally. Write an Apex helper class pattern using a static boolean variable to prevent trigger recursion. | fail→pass | 10,039 | 10,354 | +3% | 1 | 1 | 0% | 1,870 | 2,087 | +12% | 0 | 0 | — |
▸case-13 An LWC component needs to execute an Apex method updateAccountStatus imperatively upon a button click (uncached), passing accountId and newStatus parameters, handling success and failure. Write the JavaScript method handling this call. | pass→pass | 7,831 | 6,449 | -18% | 1 | 1 | 0% | 1,520 | 1,429 | -6% | 0 | 0 | — |
▸case-14 A Salesforce developer needs to write a SOQL query that calculates the total Amount and average Amount of all Opportunity records grouped by StageName, returning only stages where the sum of Amount exceeds 1,000,000. Write the SOQL query. | pass→pass | 3,670 | 3,275 | -11% | 1 | 1 | 0% | 638 | 793 | +24% | 0 | 0 | — |
▸case-15 A developer wrote code that updates Case records by executing '[SELECT Id FROM Account WHERE Id = :caseObj.AccountId]' inside a loop over 200 cases, triggering 'System.LimitException: Too many SOQL queries: 101'. Rewrite the Apex query logic using map-based or set-based bulkification. | pass→pass | 6,789 | 7,845 | +16% | 1 | 1 | 0% | 1,389 | 1,809 | +30% | 0 | 0 | — |
▸case-16 An Apex trigger subscribes to high-volume Order_Event__e platform events. What user context does a Platform Event Apex trigger execute under when fired asynchronously by the platform? | pass→pass | 7,165 | 5,228 | -27% | 1 | 1 | 0% | 1,188 | 1,006 | -15% | 0 | 0 | — |
▸case-17 An Apex class performs an outbound REST API callout. Executing the unit test fails with 'System.TypeException: Methods defined as TestMethod do not support Web service callouts'. Write the test setup mock implementation required to test HTTP callouts in Apex. | pass→pass | 9,356 | 10,871 | +16% | 1 | 1 | 0% | 2,017 | 2,555 | +27% | 0 | 0 | — |
▸case-18 A developer wants to customize CSS styles inside a child LWC component from a parent component, but standard CSS class rules are blocked by Shadow DOM encapsulation. What standard Salesforce Lightning Design System mechanism allows styling values to pass through shadow boundaries? | pass→pass | 4,698 | 7,339 | +56% | 1 | 1 | 0% | 821 | 1,413 | +72% | 0 | 0 | — |
▸case-19 Write a custom Apex exception class InvalidOrderException that extends the standard Exception class, and write the Apex code that instantiates and throws this exception when an order amount is negative. | pass→pass | 3,873 | 4,040 | +4% | 1 | 1 | 0% | 716 | 910 | +27% | 0 | 0 | — |
▸case-20 A developer needs to generate a package.xml manifest file from the source code in their workspace using modern Salesforce CLI ('sf' executable) commands to prepare for deployment. Write the command. | pass→pass | 4,608 | 3,866 | -16% | 1 | 1 | 0% | 801 | 852 | +6% | 0 | 0 | — |
▸case-21 A system administrator needs to configure password expiration rules to 90 days and set up a new Role Hierarchy branch in Salesforce Setup UI for the Sales Operations department. Provide the step-by-step navigation in Salesforce Setup to create these roles and enforce password policies. | pass→pass | 10,876 | 7,626 | -30% | 1 | 1 | 0% | 1,791 | 1,601 | -11% | 0 | 0 | — |
▸case-22 Create an HTML email template for Salesforce Marketing Cloud Email Studio containing AMPscript loops '%%[ FOR @i = 1 TO RowCount(@rows) DO ]%%' to dynamically display subscriber purchase history in a table. | pass→pass | 17,282 | 16,384 | -5% | 1 | 1 | 0% | 3,701 | 4,230 | +14% | 0 | 0 | — |
▸case-23 Build a standard React.js functional component using standard useState hooks and CSS Flexbox ('display: flex; justify-content: space-between;') to layout a navigation bar for a generic Node.js website hosted on AWS Vercel. | pass→pass | 11,975 | 9,762 | -18% | 1 | 1 | 0% | 2,852 | 2,396 | -16% | 0 | 0 | — |