10/169 questions · Unlock full access
Q1

A developer is tasked with creating a Visualforce page that displays a list of `OpportunityLineItem` records for a given `Opportunity`. The page must allow users to edit the `Quantity` and `UnitPrice` fields inline and save all changes with a single button click. The number of line items can exceed 100. Which controller approach is most suitable and efficient for this requirement?

Q2

A company has a business rule that when an Opportunity's `StageName` is updated to 'Closed Won', a corresponding `Contract` record must be created and linked to the Opportunity's `Account`. This process involves complex logic, including calling a web service to get a contract number. To ensure the system remains maintainable and scalable, which automation tool is the best fit for this requirement?

Q3

A developer needs to write an Apex test class for a trigger on the `Case` object. The trigger logic depends on the `RecordType` of the Case. To ensure the test is reliable and does not depend on existing data in the org, what is the recommended way to get the `RecordTypeId` within the test method?

Q4

A financial services company is modeling its data in Salesforce. They have a custom object `Financial_Advisor__c` and another custom object `Client__c`. An advisor can manage many clients, but each client must be assigned to exactly one advisor. If an advisor leaves the company and their user record is deleted, all associated client records must also be deleted automatically. Which type of relationship should be created on the `Client__c` object to link it to the `Financial_Advisor__c` object?

Q5Multiple answers

A developer needs to deploy a new Apex class, a new Lightning Web Component, and a modification to an existing Profile from a Developer Sandbox to a Full Sandbox for UAT. Which deployment tools can be used to accomplish this? (Select TWO)

Q6

What is a primary characteristic of Salesforce's multi-tenant architecture that directly influences a developer's approach to writing Apex code?

Q7

A developer writes an Apex trigger that updates a field on a related parent record whenever a child record is inserted. This update on the parent record, in turn, causes another trigger on the parent object to fire. What must the developer implement to prevent an infinite loop or exceeding governor limits?

Q8

True or False: A Lightning Web Component's JavaScript file can directly import methods from multiple Apex classes.

Q9

A developer needs to write a SOQL query that retrieves `Account` records and, for each Account, all of its related `Contact` records. Which SOQL query structure should be used?

Q10

A developer is debugging an issue where a batch Apex job is failing intermittently with a `System.LimitException: Apex CPU time limit exceeded`. The job processes thousands of `Lead` records. Which of the following is the MOST likely cause of this error?