Courseiva

Salesforce Certified Platform Developer I (SALESFORCE-PD1) (SALESFORCE-PD1) — Questions 76150

493 questions total · 7pages · All types, answers revealed

Page 1

Page 2 of 7

Page 3
76
MCQmedium

A developer needs to execute a batch job every Sunday at midnight. Which interface must the scheduling class implement?

A.Queueable
B.Database.Batchable<SObject>
C.Schedulable
D.Database.AllowsCallouts
AnswerC

The Schedulable interface allows classes to be run at scheduled times using cron expressions.

Why this answer

Scheduled Apex requires implementing the Schedulable interface.

77
Multi-Selecthard

A developer is utilizing the Lightning Message Service (LMS) to facilitate communication between an Aura component and a Lightning Web Component. Which THREE steps are required to implement LMS successfully? (Choose THREE)

Select 3 answers
A.Define a Message Channel in XML format under the /messageChannels/ directory.
B.Import the Message Channel reference into the LWC using '@salesforce/messageChannel/ChannelName__c'.
C.Create an Apex trigger to listen to the Message Channel on the server side.
D.Use publish() or subscribe() functions from the 'lightning/messageService' module.
E.Configure the component metadata file with <target>lightning__MessageChannel</target>.
AnswersA, B, D

Correct because Message Channels are defined as metadata files in the force-app directory.

Why this answer

LMS requires defining a Message Channel metadata file, importing the channel in the component, and calling publish or subscribe APIs.

78
Multi-Selecteasy

Which TWO methods are used to inspect sObject field metadata dynamically in Apex? Choose 2 options.

Select 2 answers
A.Schema.getGlobalDescribe()
B.System.describeFields()
C.Object.inspect()
D.Database.getMetadata()
E.SObjectType.getDescribe()
AnswersA, E

Returns a map of all sObject names to token types.

Why this answer

SObjectType.getDescribe() and Schema.getGlobalDescribe() are used for inspecting schema metadata.

79
MCQhard

A developer has written a Batch Apex class to process millions of records. During execution, some transactions fail due to temporary external web service timeouts. What is the standard behavior of Batch Apex when an unhandled exception occurs in a batch execution?

A.The specific batch scope fails, but the job continues processing subsequent scopes.
B.The entire job pauses indefinitely until an administrator manually resumes it via Setup.
C.The batch framework automatically retries the failed scope up to five times before moving on.
D.The entire batch job immediately aborts and rolls back all previously processed scopes.
AnswerA

Failed chunks do not halt the entire job by default; other scopes continue to execute.

Why this answer

By default, if an unhandled exception occurs in the execute method of a batch class, that specific batch of records fails, and the batch job continues processing the remaining batches, logging the failure.

80
MCQeasy

In the order of execution, when do record-triggered flows that are configured to run 'before' the record is saved execute?

A.After the before-save Apex triggers
B.After the after-save Apex triggers
C.Before the before-save Apex triggers
D.After the commit to the database
AnswerA

Before-save flows run after before-save Apex triggers.

Why this answer

Record-triggered flows configured to run before the record is saved execute after the before-save triggers.

81
MCQmedium

A developer is building an Aura component and needs to include a Lightning Web Component inside it. How does the Aura markup reference the LWC?

A.<c:myLwcComponent />
B.<apex:includeComponent name="myLwcComponent" />
C.<lightning:lwc name="myLwcComponent" />
D.<aura:component include="myLwcComponent" />
AnswerA

Correct because Aura references LWC using standard kebab-case or camelCase converted to namespace tag syntax.

Why this answer

Aura components reference LWC using the syntax c:lwnComponentName where 'c' is the namespace.

82
Multi-Selectmedium

Which TWO conditions must be met for an Apex method to be wired using the @wire service in an LWC? Choose 2 answers.

Select 2 answers
A.The Apex method must return a DML operation result.
B.The Apex method must be public or global and static.
C.The Apex method must return a PageReference.
D.The Apex method must be annotated with @AuraEnabled(cacheable=true).
E.The Apex method must be asynchronous using @future.
AnswersB, D

Wire methods must be static and accessible.

Why this answer

Wired Apex methods must be static, public or global, and annotated with @AuraEnabled(cacheable=true).

83
MCQeasy

Which governor limit is associated with the total number of SOQL queries issued in a single synchronous transaction?

A.10
B.50
C.100
D.200
AnswerC

100 is the standard synchronous SOQL limit.

Why this answer

The limit for synchronous SOQL queries is 100.

84
MCQhard

A developer creates a custom LWC that wraps child components. The developer needs to pass styling from the parent component into specific slots of the child component. Which CSS selector should be used inside the child component to style content passed into a slot?

A.:content
B.:scope
C.:host
D.::slotted()
AnswerD

Applies styles to elements that are distributed into a slot.

Why this answer

The ::slotted() pseudo-class selector is used in the child component's stylesheet to target nodes slotted into a <slot> element.

85
Multi-Selectmedium

A developer is implementing communication in Lightning Web Components. Which TWO mechanisms are valid for passing data or messages between components? (Choose TWO)

Select 2 answers
A.Directly assigning properties on child components from sibling components.
B.Dispatching and listening to CustomEvent instances in parent-child hierarchies.
C.Using application events via $A.get('e.force:event') in LWC.
D.Modifying global window variables shared across component scopes.
E.Using Lightning Message Service (LMS) to publish and subscribe across the DOM.
AnswersB, E

Correct because CustomEvent is standard for child-to-parent communication.

Why this answer

Custom events (child to parent) and Lightning Message Service (unrelated components) are standard mechanisms.

86
Multi-Selectmedium

A developer is choosing between Future methods and Queueable Apex. Which TWO characteristics are unique to Queueable Apex? (Choose TWO.)

Select 2 answers
A.Queueable Apex methods can be called synchronously from inside formula fields.
B.Queueable Apex returns an AsyncApexJob ID that can be used to monitor job progress.
C.Queueable Apex allows passing complex data types such as sObjects and custom Apex objects.
D.Queueable Apex does not support asynchronous job chaining.
E.Queueable Apex restricts external HTTP callouts entirely.
AnswersB, C

System.enqueueJob returns an ID corresponding to the AsyncApexJob record.

Why this answer

Queueable Apex supports complex objects and job chaining, unlike future methods.

87
Multi-Selecthard

Which THREE limitations apply to Apex Triggers? (Choose THREE.)

Select 3 answers
A.Triggers cannot perform DML statements directly without bulkification consideration (though syntax allows it, governor limits prevent it). Let's use: Triggers cannot use return types or be called directly from user interface buttons without wrapper classes/flows.
B.Triggers cannot exceed a maximum trigger recursion stack depth of 16 without throwing an exception.
C.Triggers cannot be defined on standard objects, only custom objects.
D.Triggers cannot process more than 200 records in a single batch chunk.
E.Triggers cannot make synchronous outbound HTTP callouts.
AnswersA, B, E

Triggers are event-driven database hooks and cannot be called directly as methods from UI buttons.

Why this answer

Triggers cannot make synchronous callouts, cannot use custom web service annotations directly on trigger bodies, and have limits on stack depth.

88
MCQeasy

What is the return type of a SOQL query that returns a single aggregate result, such as SELECT COUNT() FROM Account?

A.AggregateResult
B.Decimal
C.List<SObject>
D.Integer
AnswerD

COUNT() queries return an Integer representing the total number of matching records.

Why this answer

A SOQL query using COUNT() without a GROUP BY clause returns an Integer representing the row count.

89
MCQmedium

A developer needs to display a toast notification in a Lightning Web Component when a record is successfully saved. Which module should the developer import?

A.import { Toast } from 'lightning/toast';
B.import ShowToast from 'force:showToast';
C.import { ShowToastEvent } from 'lightning/platformShowToastEvent';
D.import { showNotification } from 'lightning/notificationsLibrary';
AnswerC

Correct because ShowToastEvent is the standard module for displaying toasts.

Why this answer

Lightning Toast notifications are triggered by importing ShowToastEvent from 'lightning/platformShowToastEvent'.

90
MCQhard

A developer is writing a batch Apex class. During the execute method, a record fails validation. The developer wants to ensure that successfully processed records in the same batch are committed while failing records are logged without aborting the entire batch. How should the DML be performed?

A.try-catch block around a standard insert statement
B.Database.upsert(records, true)
C.Database.insert(records, false)
D.Standard insert statement (e.g., insert records;)
AnswerC

Passing false for allOrNone enables partial success processing.

Why this answer

Using Database.insert(records, false) performs partial DML success, allowing valid records to commit while returning an array of save results for error handling.

91
MCQmedium

A developer is evaluating whether to use a Record-Triggered Flow or an Apex Trigger for a new automation requirement that involves complex callouts to an external system and heavy database operations. Which architectural guideline should the developer follow?

A.Use an Apex trigger combined with future methods or Queueable Apex to handle callouts asynchronously.
B.Use a Record-Triggered Flow with asynchronous paths for all callout requirements.
C.Use an Apex trigger with synchronous callouts to ensure immediate data consistency.
D.Use a Record-Triggered Flow because it handles synchronous HTTP callouts natively.
AnswerA

Apex is required when callouts are involved, and asynchronous features prevent blocking the main transaction.

Why this answer

Record-Triggered Flows cannot execute synchronous callouts directly. Apex must be used when callouts are required in a synchronous transactional context, or Queueable Apex can handle asynchronous callouts.

92
Multi-Selectmedium

Which TWO conditions must be met for an Apex test method to successfully execute and contribute to code coverage? (Choose two.)

Select 2 answers
A.The test method must accept a List of SObjects as a parameter.
B.The test class must implement the TestInterface interface.
C.The test method must return an Integer value representing success.
D.The test method must be declared as static.
E.The test method must be annotated with @isTest.
AnswersD, E

Test methods must be static.

Why this answer

Test methods must be static, have a void return type, and be marked with @isTest.

93
MCQhard

Why might a deployment fail due to 'Apex classes do not have sufficient coverage'?

A.Test classes are not marked @isTest.
B.Individual class coverage is below 75%.
C.Aggregate coverage is below 75%.
D.The test classes are too large.
AnswerC

Total coverage is the requirement.

Why this answer

The combined coverage across all classes must be at least 75%.

94
Multi-Selecteasy

Which THREE of the following are benefits of using the Salesforce CLI for deployment?

Select 3 answers
A.Allows bypassing validation rules in production
B.Supports automated deployment scripts
C.Automatically converts all code to Lightning Web Components
D.Enables version control integration with tools like Git
E.Provides a platform-independent way to deploy code
AnswersB, D, E

CLI commands can be scripted for CI/CD.

Why this answer

CLI offers automation, version control integration, and environment consistency.

95
MCQeasy

What is the primary benefit of using Flow Builder over Apex triggers when implementing simple field validations?

A.Flows can be managed and updated declaratively without code deployment.
B.Flows bypass all system validation rules automatically.
C.Flows do not count against governor limits.
D.Flows execute faster than compiled Apex triggers.
AnswerA

Flows offer a declarative interface that reduces maintenance overhead and code dependencies.

Why this answer

Flow Builder allows administrators and developers to build validations declaratively without writing and maintaining code.

96
Multi-Selecthard

Which TWO tools or APIs can a developer use to deploy metadata between Salesforce organizations? (Choose two.)

Select 2 answers
A.Data Loader
B.Outbound and Inbound Change Sets
C.Salesforce CLI (sf project deploy start)
D.Apex Anonymous Windows
E.Process Builder
AnswersB, C

Change sets are native point-and-click tools for moving metadata between connected orgs.

Why this answer

Change Sets and the Metadata API (via CLI or IDEs) are primary tools for metadata deployment.

97
MCQhard

A developer needs to chain multiple asynchronous jobs sequentially where Job B must run only after Job A finishes successfully. Which interface should the developer use to achieve this?

A.System.Queueable
B.Database.AllowsCallouts
C.System.Schedulable
D.Database.Batchable
AnswerA

Correct. Queueable Apex allows a job to chain another job by invoking System.enqueueJob inside its execute method.

Why this answer

Queueable Apex provides the ability to chain jobs by calling System.enqueueJob() from within the execute method of a currently running Queueable job.

98
MCQeasy

Which tag is used in Visualforce to output field labels and values dynamically based on sObject field definitions?

A.<apex:field>
B.<apex:inputField>
C.<apex:outputText>
D.<apex:outputField>
AnswerD

Renders sObject field data with field-level security and formatting.

Why this answer

<apex:outputField> renders field values with correct formatting and related labels.

99
Multi-Selecthard

A developer is troubleshooting lifecycle hooks and rendering behavior in a Lightning Web Component. Which THREE statements are correct regarding LWC lifecycle execution order? (Choose THREE)

Select 3 answers
A.The constructor() is invoked before the component is inserted into the DOM.
B.renderedCallback() only executes once during the lifetime of the component.
C.connectedCallback() is invoked when the component is inserted into the DOM.
D.disconnectedCallback() is invoked when the component is removed from the DOM.
E.renderedCallback() is invoked before connectedCallback().
AnswersA, C, D

Correct because the constructor initializes the component instance before DOM insertion.

Why this answer

Constructor runs first, then connectedCallback, then renderedCallback after render.

100
MCQmedium

A developer needs to ensure that a custom logging operation runs asynchronously and can be monitored using job IDs. Which interface is best suited?

A.Schedulable
B.Database.AllowsCallouts
C.Database.Batchable
D.Queueable
AnswerD

Queueable Apex returns an AsyncApexJob ID when enqueued, enabling monitoring.

Why this answer

Queueable Apex provides job IDs upon enqueueing, allowing for tracking and monitoring.

101
MCQeasy

Which context variable in an Apex trigger contains the old map of records for update operations?

A.Trigger.oldMap
B.Trigger.old
C.Trigger.new
D.Trigger.newMap
AnswerA

Trigger.oldMap holds the map of ID to record instances prior to the update.

Why this answer

Trigger.oldMap provides a map of ID to the old version of records during update and delete triggers.

102
MCQmedium

A developer needs to find all records across multiple objects (Contact, Lead, and Account) that contain the exact phrase 'Acme Corp'. Which feature should be used?

A.Database.query() with dynamic bindings
B.SOQL query with multiple WHERE clauses
C.SOSL FIND clause
D.Global Search API via REST
AnswerC

SOSL allows searching text across multiple objects using the FIND clause.

Why this answer

SOSL (Salesforce Object Search Language) is designed for text searches across multiple objects simultaneously.

103
Multi-Selectmedium

Which TWO interfaces must be implemented when creating a scheduled Batch Apex class that also needs to perform web service callouts? (Choose two.)

Select 3 answers
A.Database.Batchable<SObject>
B.Queueable
C.InstallHandler
D.Schedulable
E.Database.AllowsCallouts
AnswersA, D, E

Database.Batchable is required for batch processing.

Why this answer

To run as a scheduled batch with callouts, the class implements Schedulable, Database.Batchable, and Database.AllowsCallouts.

104
MCQeasy

What is the correct syntax to reference a custom label in a Lightning Web Component JavaScript file?

A.Label.get('LabelName')
B.System.Label.LabelName
C.$Label.LabelName
D.import labelName from '@salesforce/label/LabelName';
AnswerD

Correct import syntax for LWC JS.

Why this answer

Custom labels are imported from @salesforce/label/Namespace.LabelName.

105
MCQmedium

A developer needs to test a feature that relies on the current time. Which method should be used to simulate time?

A.DateTime.now().
B.Design code to use a custom provider that can be injected.
C.Test.setSystemTime().
D.System.now().
AnswerB

Dependency injection is the only way to mock time.

Why this answer

There is no built-in way to 'freeze' time; developers should design for dependency injection of time, but the question asks for standard tools.

106
Multi-Selecthard

Which THREE best practices should a developer follow when implementing CRUD and FLS checks in Apex? Choose 3 answers.

Select 3 answers
A.Rely solely on 'with sharing' keywords to handle field-level security checks.
B.Check sObject createability before performing insert DML operations.
C.Disable all triggers when performing security checks.
D.Check object updatability before committing updates to the database.
E.Use Schema describe methods to verify field accessibility before querying.
AnswersB, D, E

Verifying isCreateable ensures users have permission to create records.

Why this answer

Developers should check isAccessible, isCreateable, and isUpdateable using describe results before querying or saving data.

107
MCQhard

A developer is writing code that processes untrusted data and wants to automatically strip fields and relationships that the current user cannot access, without throwing an exception. Which feature should be used?

A.Security.stripInaccessible()
B.Database.insert(records, AccessType.ENFORCE_ACCESSIBLE)
C.Approval.lock()
D.Schema.sObjectType.fields.isAccessible()
AnswerA

stripInaccessible removes inaccessible fields and records gracefully.

Why this answer

The Security.stripInaccessible() method strips fields and SObjects that the user lacks permission to read or create/update, avoiding runtime security exceptions.

108
MCQhard

A developer wants to view real-time debug log streaming in their local environment using the Salesforce CLI. Which command should the developer execute?

A.sf apex run test
B.sf project deploy start
C.sf org display
D.sf apex log tail
AnswerD

sf apex log tail streams logs in real-time to the command line.

Why this answer

The sf apex tail log command streams debug logs to the terminal in real time.

109
MCQhard

A developer has a trigger that updates parent Account records when Child Contacts are modified. To prevent infinite recursion, the developer uses a static boolean variable in a helper class. What is a key limitation of using static variables for recursion control in Salesforce?

A.Static variables persist across multiple user transactions, causing triggers to never fire again.
B.Static variables cause governor limit exceptions on heap size.
C.Static variables reset at the end of each transaction, and do not protect against separate transactions or certain bulk test setups.
D.Static variables are prohibited in trigger helper classes.
AnswerC

Static variables are transaction-scoped and do not prevent recursive triggers if executed across multiple discrete transaction contexts.

Why this answer

Static variables persist only for the duration of a single transaction; if a secondary transaction or test context restarts, the static variable resets.

110
MCQhard

A developer writes a Queueable Apex job that queries 50,000 records, performs calculations, and updates them. During testing, the job hits a heap size limit. What is the standard asynchronous heap size limit in Apex?

A.12 MB
B.50 MB
C.36 MB
D.6 MB
AnswerA

The asynchronous heap size limit is 12 MB.

Why this answer

The asynchronous transaction heap size limit is 12 MB, compared to 6 MB for synchronous transactions.

111
MCQeasy

Which Apex data type should a developer use to represent a precise geographic location with latitude and longitude coordinates?

A.Coordinate
B.Location
C.Address
D.GeoPoint
AnswerB

Location represents latitude and longitude coordinates.

Why this answer

The Location primitive data type in Apex is designed specifically to represent geographic locations with latitude and longitude.

112
MCQeasy

Which collection type stores elements as key-value pairs in Apex?

A.Set
B.Array
C.List
D.Map
AnswerD

Maps store elements as key-value pairs for rapid retrieval by key.

Why this answer

A Map stores key-value pairs where each unique key maps to a single value.

113
MCQeasy

When should a developer choose Flow Builder over an Apex Trigger for business automation?

A.When implementing straightforward record-triggered field updates declaratively.
B.When performing complex callouts to external REST APIs.
C.When writing custom web service classes for external clients.
D.When processing millions of records nightly in batches.
AnswerA

Flow Builder is designed for declarative, point-and-click automation like record-triggered updates.

Why this answer

Flow Builder is declarative and preferred for standard point-and-click record updates and screen interactions when complex custom code is unnecessary.

114
MCQmedium

Why should a developer ensure that test classes have at least 75% coverage for production deployment?

A.It makes the code run faster.
B.It prevents bugs entirely.
C.It automatically generates the test classes.
D.It is a requirement set by the Salesforce platform.
AnswerD

Mandatory deployment requirement.

Why this answer

The platform requires at least 75% code coverage for all Apex classes before they can be deployed to production.

115
MCQmedium

A developer wants to ensure that specific test data is available to all test methods in a class without recreating it. Which method should be used?

A.Use @testSetup.
B.Use a static constructor.
C.Use a private method called by all tests.
D.Use Test.loadData().
AnswerA

@testSetup creates data once for all test methods in the class.

Why this answer

@testSetup methods are executed once per class and set up data for all methods.

116
MCQeasy

What is the synchronous governor limit for the total number of SOQL queries issued in a single Apex transaction?

A.200 locs
B.200
C.100
D.50
AnswerC

100 is the standard synchronous SOQL query limit.

Why this answer

The synchronous governor limit for SOQL queries per transaction is 100.

117
MCQhard

An Apex trigger executes during a bulk insert of 300 records. To adhere to best practices regarding governor limits and bulkification, how should SOQL queries be written?

A.Query inside a for-loop iterating over Trigger.new
B.Query each record individually using Limits.getQueries() checks
C.Use an asynchronous future method for every individual record
D.Query once outside the loop using a collection of IDs from Trigger.new
AnswerD

Bulkifying Apex code requires gathering IDs into collections and executing a single query outside of loops.

Why this answer

Queries must be written using bulkified collections, querying once outside of loops using bind variables for all records in Trigger.new.

118
MCQeasy

An asynchronous method needs to be invoked from a standard trigger to perform callouts to an external web service. Which annotation is required for this asynchronous method?

A.@TestSetup
B.@future(callout=true)
C.@InvocableMethod
D.@ReadOnly
AnswerB

The @future annotation with callout=true allows asynchronous execution and external web service callouts.

Why this answer

Future methods annotated with @future(callout=true) are used to perform asynchronous callouts from triggers.

119
MCQhard

A developer has written a Lightning Web Component and Apex controller, and wants to deploy only these specific metadata components to a production org using Salesforce CLI without relying on change sets. Which command is appropriate?

A.sf apex run
B.sf project deploy start
C.sf org open
D.sf project convert mdapi
AnswerB

sf project deploy start deploys metadata to a target org from the local project.

Why this answer

sf project deploy start deploys source files from a local project directory to a target org.

120
MCQmedium

When should a developer choose Flow Builder over Apex for implementing business automation logic?

A.When implementing custom encryption algorithms.
B.When standard screen interactions, record modifications, and maintenance by administrators are prioritized.
C.When complex web service callouts with complex XML namespaces need to be parsed.
D.When processing millions of records asynchronously in background batches.
AnswerB

Flows empower administrators to maintain logic visually without writing code.

Why this answer

Flow Builder is recommended for standard record transformations, screen prompts, and declarative logic because it is faster to build and maintain.

121
MCQmedium

A developer has a requirement to pass a complex SObject list containing parent and child records into an asynchronous method for further processing. Which asynchronous feature supports passing non-primitive data types such as Lists of SObjects?

A.Email Services
B.Schedulable Apex
C.Queueable Apex
D.Future Methods
AnswerC

Correct. Queueable Apex allows member variables of complex data types, including SObjects and custom objects.

Why this answer

Queueable Apex supports the execution of jobs asynchronously and allows passing non-primitive data types such as lists of SObjects through class member variables.

122
Multi-Selectmedium

Which TWO triggers are executed during a record merge operation in Salesforce? (Choose two.)

Select 2 answers
A.Before Insert and After Insert triggers on the losing record.
B.Undelete triggers on both records.
C.Lead conversion triggers instead of merge triggers.
D.Before Delete and After Delete triggers on the losing record.
E.Before Update and After Update triggers on the winning record.
AnswersD, E

The losing record is deleted during a merge, firing delete triggers.

Why this answer

Merging records deletes the loser record (firing delete triggers) and updates the winner record (firing update triggers).

123
MCQhard

A developer needs to pass data from a child Lightning Web Component to a parent Lightning Web Component up the component hierarchy. What is the standard mechanism to achieve this?

A.Use the @api decorator in the child component to expose a public method that the parent can call directly.
B.Dispatch a CustomEvent in the child and handle it in the parent's template using an event listener directive.
C.Publish a message using the Lightning Message Service from the child and subscribe in the parent.
D.Mutate a shared global reactive property imported from a common utility JavaScript module.
AnswerB

Correct because CustomEvent is the standard mechanism for child-to-parent communication.

Why this answer

Child-to-parent communication in LWC is achieved by dispatching a custom event using CustomEvent and listening to it in the parent template.

124
Multi-Selectmedium

A developer is configuring a Lightning Web Component to accept design attributes in the Lightning App Builder. Which THREE files make up a complete LWC bundle that supports App Builder configuration properties? (Choose THREE)

Select 6 answers
A.componentName.js-meta.xml
B.componentName.cmp
C.componentName.apex
D.componentName.html
E.componentName.js-meta.xml
.componentName.design
.componentName.js
.componentName.html
.componentName.js
AnswersA, D, E

Correct part of bundle.

Why this answer

A complete configurable LWC bundle includes the HTML template, JavaScript controller, metadata file (.js-meta.xml), and design file (.design).

125
MCQmedium

A developer needs to include a third-party style sheet in a Lightning Web Component. What is the standard way to load CSS styles that are stored as a static resource?

A.import { loadStyle } from 'lightning/platformResourceLoader';
B.Declaring the stylesheet in the component's metadata configuration file under <stylesheets>.
C.import stylesheet from '@salesforce/resourceUrl/myCSS';
D.Using a standard <link> tag pointing directly to the static resource URL in the HTML template.
AnswerA

Correct because loadStyle is used to load static resource CSS files.

Why this answer

Third-party stylesheets are loaded using loadStyle from 'lightning/platformResourceLoader' inside connectedCallback.

126
MCQeasy

Which CSS methodology forms the foundation of the styling architecture in Salesforce Lightning Design System (SLDS)?

A.Bootstrap grid standards
B.BEM (Block Element Modifier)
C.OOCSS exclusively without modifiers
D.Tailwind utility prefixes
AnswerB

Correct because SLDS utilizes BEM naming conventions.

Why this answer

SLDS is built using BEM (Block Element Modifier) methodology for class naming conventions.

127
MCQhard

A developer wants to ensure that a custom Apex REST service method properly handles authentication and executes securely in the context of the calling user. How should the class be defined?

A.webservice class without sharing
B.global class with sharing
C.public class with sharing
D.private class inherited sharing
AnswerB

Global accessibility is required for Apex REST endpoints, and with sharing enforces user context rules.

Why this answer

Apex REST services must be global classes, and specifying with sharing ensures sharing rules are respected.

128
MCQhard

A developer is working with the Lightning Data Service (LDS) via the @wire decorator to get record data. The record is updated elsewhere in the app, and the developer wants to imperatively refresh the wire data cache. Which function should be called?

A.refreshApex()
B.rehashData()
C.force:refreshView
D.reloadRecord()
AnswerA

Correct because refreshApex refreshes the cache for Apex wire adapters.

Why this answer

refreshApex() is used to refresh the data provisioned by an Apex wire adapter, while getRecordNotifyChange is used for LDS wire adapters. Wait, refreshApex is for Apex, and notifyRecordUpdateAvailable is for LDS. Let's use refreshApex for an Apex wire adapter context.

129
MCQmedium

A developer is writing a SOQL query to find accounts where the billing country starts with 'United'. Which operator should be used?

A.LIKE 'United%'
B.MATCHES
C.STARTS_WITH
D.INCLUDES
AnswerA

LIKE with 'United%' matches strings starting with 'United'.

Why this answer

The LIKE operator is used in SOQL for wildcard matching, using '%' as the wildcard character.

130
MCQhard

What is the maximum CPU time limit for a synchronous Apex transaction in a developer edition org?

A.60,000 milliseconds
B.10,000 milliseconds
C.120,000 milliseconds
D.5,000 milliseconds
AnswerB

The synchronous Apex CPU time limit is 10,000 milliseconds.

Why this answer

The synchronous CPU time limit is 10,000 milliseconds for standard transactions.

131
MCQhard

When using the Metadata API to deploy components, which XML file must be present to define the components included in the package?

A.manifest.xml
B.deploy.xml
C.package.xml
D.components.xml
AnswerC

This is the required manifest file for Metadata API operations.

Why this answer

The 'package.xml' file is the manifest that lists the components to be retrieved or deployed via the Metadata API.

132
Multi-Selecthard

A developer is writing an Apex trigger that needs to execute logic only when records are updated and a specific custom field 'Status__c' changes from 'Draft' to 'Submitted'. Which THREE elements are required to implement this check correctly? (Choose three.)

Select 3 answers
A.Use the Trigger.isInsert context variable to capture the initial draft creation.
B.Iterate through Trigger.old instead of Trigger.new.
C.Compare the prior status value with the new status value from Trigger.new.
D.Verify that the trigger context is either Trigger.isUpdate or check Trigger.isExecuting.
E.Access the prior value using Trigger.oldMap.get(record.Id).Status__c.
AnswersC, D, E

Comparing old and new field values confirms whether a transition took place.

Why this answer

Checking for field value changes across update contexts requires comparing Trigger.oldMap with Trigger.new and checking the specific context.

133
MCQmedium

An Apex trigger needs to prevent deletion of Account records that have related active Contacts. When should this check occur?

A.After Insert
B.After Update
C.Before Insert
D.Before Delete
AnswerD

Before delete triggers allow developers to inspect related records and call addError() to block deletion.

Why this answer

Before delete triggers are used to validate and prevent the deletion of records based on related criteria.

134
MCQmedium

A developer is building a Lightning Web Component and needs to dispatch a custom event. Which constructor should be used to create the event?

A.Event
B.AuraEvent
C.CustomEvent
D.LightningEvent
AnswerC

Standard constructor for custom events carrying detail payloads.

Why this answer

CustomEvent is the standard browser constructor used to create custom events in LWC.

135
MCQmedium

A developer is working with a Visualforce page and wants to display a list of Account records using standard styling that matches the Salesforce Classic UI. Which component should the developer include?

A.<apex:sldsGrid>
B.<apex:pageBlockTable>
C.<apex:lightningStylesheets>
D.<apex:outputStandardTable>
AnswerB

Correct because <apex:pageBlockTable> formats tabular data matching the standard Salesforce look and feel.

Why this answer

The <apex:enhancedList> or <apex:relatedList> components allow developers to display lists with standard Salesforce formatting.

136
MCQeasy

Which SOQL aggregate function should a developer use to count the exact number of rows returned by a query without retrieving the records into memory?

A.COUNT()
B.TOTAL()
C.SUM()
D.SIZE()
AnswerA

COUNT() returns the total number of matching records.

Why this answer

The COUNT() function returns the number of rows matching the query criteria efficiently as an integer.

137
MCQeasy

A developer needs to execute lightweight asynchronous logic that is chainable and allows passing complex objects to the background job. Which asynchronous feature should the developer implement?

A.Schedulable Apex
B.Queueable Apex
C.Future methods
D.Batch Apex
AnswerB

Queueable Apex allows complex data types and supports chaining of jobs.

Why this answer

Queueable Apex supports complex member variables including sObjects and custom Apex types, and it can be chained. Future methods only support primitive types and collections of primitive types.

138
Multi-Selectmedium

Which TWO methods can be used to navigate to a standard Salesforce object's home page from a Lightning Web Component? Choose 2 answers.

Select 2 answers
A.Using force:navigateToSObject Aura event.
B.Using window.location.assign() with hardcoded Salesforce URLs.
C.Using NavigationMixin.Navigate with type 'standard__objectPage' and actionName 'home'.
D.Using NavigationMixin.GenerateUrl to create a bookmarkable link for the object home.
E.Using lightning/uiRecordApi navigation methods.
AnswersC, D

Standard navigation mixin type for object pages.

Why this answer

NavigationMixin with standard__objectPage and actionName 'home' navigates to an object's home page.

139
MCQhard

A Lightning Web Component needs to communicate an event up to a grandparent component that is nested two levels above. What is the best practice to achieve this in LWC?

A.Use the pubsub utility pattern by importing a shared JavaScript pubsub library
B.Use a global Lightning Message Service context to broadcast the event across components
C.Use standard browser CustomEvent with bubbles: true and composed: false
D.Dispatch an Aura Application Event from within the LWC container
AnswerC

Correct. Setting bubbles: true allows the event to traverse up the DOM tree to parent and grandparent components.

Why this answer

Custom events in LWC bubble up the DOM tree by default when constructed with { bubbles: true, composed: false }, allowing parent and grandparent components to listen for them.

140
MCQmedium

In what order does Salesforce execute system validation rules relative to Before Triggers during an insert operation?

A.System validation rules run after Before Triggers but before custom validation rules.
B.System validation rules execute before Before Triggers.
C.Before Triggers execute before system validation rules.
D.Before Triggers and system validation rules run concurrently.
AnswerB

Standard system validation rules (like required fields) run prior to the execution of Before Triggers.

Why this answer

System validation rules execute before Before Triggers in the standard Salesforce order of execution.

141
MCQeasy

Where should a developer look in the Salesforce user interface to inspect detailed system debug logs generated during a specific transaction?

A.Setup > Custom Code > Debug Logs
B.Setup > Monitor > Logs
C.Setup > Environments > Logs
D.Setup > Process Automation > Debug Logs
AnswerA

Setup > Custom Code > Debug Logs lists all captured debug logs for users and traces.

Why this answer

Debug logs are accessed via Setup by navigating to Custom Code > Debug Logs or via the Developer Console.

142
Multi-Selecteasy

Which TWO methods are available on the Database class for performing DML operations with partial success capability? Choose 2 options.

Select 2 answers
A.Database.save()
B.Database.commit()
C.Database.persist()
D.Database.update()
E.Database.insert()
AnswersD, E

Supports partial success via allOrNone parameter.

Why this answer

Database.insert() and Database.update() accept an allOrNone boolean parameter allowing partial success.

143
MCQmedium

A developer needs to retrieve 10 Account records starting from the 21st record to implement pagination in a custom component. Which SOQL clause should be used?

A.LIMIT 10 OFFSET 20
B.LIMIT 20 OFFSET 10
C.RANGE 20 TO 30
D.SKIP 20 TAKE 10
AnswerA

LIMIT 10 restricts results to 10 records, and OFFSET 20 skips the first 20 records.

Why this answer

SOQL supports pagination using LIMIT and OFFSET clauses.

144
MCQmedium

A developer needs to dynamically instantiate an sObject type based on a string variable representing the object name (e.g., 'Account'). Which method should be used?

A.Schema.getGlobalDescribe().get('Account').newSObject()
B.Type.forName('Account').newInstance()
C.Database.load('Account')
D.SObject.createInstance('Account')
AnswerA

This method retrieves the token from global describe and instantiates a new sObject instance dynamically.

Why this answer

Schema.getGlobalDescribe().get('Account').newSObject() allows dynamic sObject creation from a string object name.

145
MCQhard

What is the maximum number of batch Apex jobs that can be queued or active concurrently in the Apex flex queue?

A.50
B.100
C.5
D.500
AnswerB

The flex queue can hold up to 100 batch jobs in 'Holding' status.

Why this answer

The Apex flex queue holds up to 100 batch jobs waiting to be processed.

146
MCQmedium

A developer needs to ensure that an Apex class respects organization-wide defaults, role hierarchies, and sharing rules when querying custom objects. Which keyword should be added to the class definition?

A.enforce sharing
B.with sharing
C.without sharing
D.inherited sharing
AnswerB

Enforces record-level security and sharing rules.

Why this answer

The with sharing keyword enforces sharing rules of the current user, while without sharing runs in system mode.

147
MCQhard

When calling Test.startTest() and Test.stopTest(), what happens to the governor limits?

A.Governor limits are reset to zero for the code between the two calls.
B.Governor limits are increased by a factor of 10.
C.Test.stopTest() forces an immediate deployment.
D.Governor limits are ignored entirely.
AnswerA

This allows for testing code that might hit limits individually.

Why this answer

Test.startTest and Test.stopTest reset governor limits within the block.

148
Multi-Selectmedium

Which TWO features are characteristics of SOSL (Salesforce Object Search Language) queries? Choose 2 answers.

Select 2 answers
A.SOSL returns a single flat List of SObjects.
B.SOSL queries can update existing records directly.
C.SOSL queries are limited to a maximum of 10 records per search.
D.SOSL can search across multiple sObjects and fields in a single query.
E.SOSL tokenizes search terms to perform optimized text matching.
AnswersD, E

SOSL is designed for text searches across multiple object types simultaneously.

Why this answer

SOSL searches text across multiple objects and fields simultaneously and can tokenize words for matching.

149
MCQmedium

A developer needs to retrieve a list of Accounts along with their related Contacts using a single SOQL query in Apex. Which query structure is syntactically correct?

A.SELECT Id, Name, Contacts.Id, Contacts.LastName FROM Account
B.SELECT Id, Name, Contact__r.Name FROM Account
C.SELECT Id, Name, (SELECT Id, LastName FROM Contact) FROM Account
D.SELECT Id, Name, (SELECT Id, LastName FROM Contacts) FROM Account
AnswerD

This represents a valid parent-to-child relationship query using a subquery for the child relationship name.

Why this answer

Parent-to-child relationships in SOQL are queried using a subquery within parentheses inside the SELECT clause.

150
MCQeasy

What is the correct way to declare a constant variable in Apex?

A.static readonly Integer MAX_COUNT = 10;
B.final Integer MAX_COUNT = 10;
C.immutable Integer MAX_COUNT = 10;
D.const Integer MAX_COUNT = 10;
AnswerB

final defines a variable that can only be assigned once.

Why this answer

Constants in Apex are declared using the final keyword combined with static.

Page 1

Page 2 of 7

Page 3

All pages