Salesforce Dumps pd1
Salesforce Dumps pd1
1 . While writing an Apex class, a developer wants to make sure that all functionality being developed
is handled as specified by the requirements.
Which approach should the developer use to be sure that the Apex class is working according to
specifications?
B. Create a test class to execute the business logic and run the test in the Developer Console.
2 . A developer needs to have records with specific field values in order to test a new Apex class.
What should the developer do to ensure the data is available to the test?
3 . Which statement should be used to allow some of the records in a list of records to be inserted if
others fail to be inserted?
A. insert (records, false)
B. Database.insert(records, false)
C. Database.insert(records, true)
D. insert records
4 . How does the Lightning Component framework help developers implement solutions faster?
6 . A developer created a Lightning web component called StatusComponent to be inserted into the
Account record page.
Which two things should the developer do to make this component available? (Choose two.)
B.Create a Process Builder on the Opportunity object that executes an Apex immediate action to
perform the HTTP REST callout whenever the Opportunity is updated.
C.Create a Lightning component that performs the HTTP REST callout, and use a Lightning Action to
expose the component on the Opportunity detail page.
D. Create an after update trigger on the Opportunity object that calls a helper method using
@Future(Callout=true) to perform the HTTP REST callout.
8 . Universal Containers wants to ensure that all new leads created ni the system have a valid email
address. They have already created a validation rule to enforce this requirement, but want ot add an
additional layer of validation using automation.
What would be the best solution for this requirement?
A. Submit a REST API Callout with a JSON payload and validate the fields on a third party system
B. Use an Approval Process to enforce the completion of a valid email address using an outbound
message action.
C. Use a before-save Apex trigger on the Lead object to validate the email address and display an
error message if it is invalid
D. Use a custom Lightning Web component to make a callout to validate the fields on a third party
system.
9. An Apex method, getAccounts, that returns a List of Accounts given a searchTerm, is available for
Lightning Web components to use.
What is the correct definition of a Lightning Web component property that uses the getAccounts
method?
Ans: option A
11 . A developer has a Visualforce page and custom controller to save Account records. The
developer wants to display any validation rule violations to the user.
How can the developer make sure that validation rule violations are displayed?
12 . A developer has an integer variable called maxAttempts. The developer needs to ensure that
once maxAttempts is initialized, it preserves its value for the length of the Apex transaction; while
being able to share the variable's state between trigger executions.
How should the developer declare maxAttempts to meet these requirements?
A. Declare maxAttempts as a private static variable on a helper class.
B. Declare maxAttempts as a variable on a helper class.
C. Declare maxAttempts as a member variable on the trigger definition.
D. Declare maxAttempts as a constant using the static and final keywords.
13 . Universal Containers has an order system that uses an Order Number to identify an order for
customers and service agents. Order records will be imported into Salesforce.
How should the Order Number field be defined in Salesforce?
A. Direct Lookup
B. External ID and Unique
C. Lookup
D. Indirect Lookup
14 . A developer created a trigger on the Account object. While testing the trigger, the developer
sees the error message 'Maximum trigger depth exceeded'.
What could be the possible causes?
A. the developer does not have the correct user permission.
B. The trigger is getting executed multiple times.
C.The trigger does not have sufficient code coverage.
D.The trigger is too long and should be refactored into a helper class.
15 . A developer is asked to write helper methods that create test data for unit tests.
01: public TestUtils {
02:
03: public static Account createAccount() {
04: Account act= new Account();
05: //...set some fields on acct...
06: return act;
07: }
08: //...other methods...
09: }
What should be changed in the TestUtils class so that its methods are only usable by unit test
methods?
Which governor limit will likely be exceeded within the Apex transaction?
17 . Which code in a Visualforce page and/or controller might present a security vulnerability?
18 . What are two ways for a developer to execute tests in an org? (Choose two.)
A. Tooling API
B. Developer Console
C. Metadata API
D. Bulk API
19 . A software company is using Salesforce to track the companies they sell their software to in the
Account object. They also use Salesforce to track bugs in their software with a custom object,
Bug__c.
As part of a process improvement initiative, they want to be able to report on which companies have
reported which bugs. Each company should be able to report multiple bugs and bugs can also be
reported by multiple companies.
20. What are three characteristics of change set deployments? (Choose three.)
A. Change sets can deploy custom settings data.
B. Change sets can only be used between related organizations.
C. Deployment is done in a one-way, single transaction.
D. Sending a change set between two orgs requires a deployment connection.
E. Change sets can be used to transfer records.
21 . A developer deployed a trigger to update the status__c of Assets related to an Account when the
Account''s status changes and a nightly integration that updates Accounts in bulk has started to fail
with limit failures.
What should the developer change about the code to address the failure while still having the code
update all of the Assets correctly?
A Change the gerAssetsToUpdac= method to process all Accounts in one call and call it outside of the for loop
that starts on line 03.
B Add a LIMIT clause to the SOQL query on line 16 to limit the number of Assets queried for an Account.
C Move all of the logic to a Queueable class that queries for and updates the Assets and call it from the trigger.
D Add List<Asset> assets = [SELECT Id, Status__c FROM Asset WHERE AccountId = :acctId] to line 14 and iterate
over the assets list in the for loop on line 15.
22 . A developer is tasked with building a custom Lightning web component to collect Contact information.
The form will be shared among many different types of users in the org. There are security requirements that
only certain fields should be edited and viewed by certain groups of users.
What should the developer use in their Lightning Web Component to support the security requirements?
A. force-input-field
B. ui-input-field
C. aura-input-field
D. lightning-input-field
23 . Which three Salesforce resources can be accessed from a Lightning web component' (Choose 3
answers)
A. Third-party web components
B. Content asset files
C. All external libraries
D. SVG resources
E. Static resources
24 . A software company uses the following objects and relationships:
What should be done to share a specific Case_Defect_c record with the user?
A. ●Share the Case_Defect_c record.
B. ●Share the parent Defect_c record.
C. ●Share the parent Case record.
D. ●Share the parent Case and Defect_c records.
25 . In terms of the MVC paradigm, what are two advantages of implementing the layer of a
Salesforce application using Aura Component-based development over Visualforce?
( Choose 2 answers)
26 . Flow builder uses an apex Action to provide additional information about multiple Contacts,
stored in a custom class, contactInfo. Which is the correct definition of the Apex method that gets
additional information?
A. @InvocableMethod(Label='additional Info')
public ContactInfo(Id contactId)
{ /implementation/ }
B. @InvocableMethod(label='Additional Info')
public List<ContactInfo> getInfo(List<Id> contactIds)
{ /implementation/ }
C. @invocableMethod(label)='Additional Info')
public static List<ContactInfo> getInfo(List<Id> contactIds)
{ /Implementation/ }
D. @InvocableMethod(label='additional Info')
public static ContactInfo getInfo(Id contactId)
{ /implementation/ }
28 . A developer is creating a Lightning web component to show a list of sales records.The Sales
Representative user should be able to see the commission field on each record. The Sales Assistant
user should be able to see all fields on the record except the commission field.
How should this be enforced so that the component works for both users without showing any
errors?
29 . Which annotation should a developer use on an Apex method to make it available to be wired to
a property in a Lightning web component?
A. @RemoteAction(cacheable=true)
B. @AuraEnabled
C. @RemoteAction
D. @AuraEnabled(cacheable=true)
30 . What are two use cases for executing Anonymous Apex code? Choose 2 answers
31 . Consider the following code snippet for a Visualforce page that is launched using a Custom
Button on the Account detail page layout.
<apex:page standardController-"Account">
<apex:page>
When the Save button is pressed the developer must perform a complex validation that involves
multiple objects and, upon success, redirect the user to another Visualforce page.
What can the developer use to meet this business requirement?
B. Controller extensions
A. 4
B. 2
C. 3
D. 1
34 . What are two ways a developer can get the status of an enquered job for a class that queueable
interface? ( Choose 2 answers)
36 . The following Apex method is part of the ContactService class that is called from a trigger:
How should the developer modify the code to ensure best practice are met?
What should a developer consider for an environment that has over 10,000 Case records?
38 . Universal Containess wants Opportunities to no longer be editable when its reaches the
Closed/Won stage.
Which two strategies can a developer use to accomplish this? (Choose 2 answers)
41 . A developer created a child Lightning web component nested inside a parent Lightning web
component. The parent component needs to pass a string value to the child component.
A. The parent component can use a custom event to pass the data to the child component.
B. The parent component can invoke a public method in the child component.
C. The parent component can use a public property to pass the data to the child component.
D. The parent component can use the Apex controller class to send data to the child component.
42 . What are two benefits of using declarative customizations over code?(Choose 2 answers)
A. Declarative customizations automatically update with each Salesforce release.
B. Declarative customizations automatically generate test classes.
C. Declarative customizations cannot generate run time errors.
D. Declarative customizations generally require less maintenance
43 . 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. Use a Max Roll-Up Summary field on the Latest availability date fields.
C. Use a DAYS formula on each of the availability date fields and a COUNT Roll-Up Summary field on
the Order.
45 . Which two are phases in the Salesforce Application Event propagation framework? (Choose two.)
A. Bubble
B. Default
C. Control
D. Emit
46 . Universal Container(UC) wants to lower its shipping cost while making the shipping process
more efficient. The Distribution Officer advises UC to implement global addresses to allow multiple
Accounts to share a default pickup address. The Developer is tasked to create the supporting object
and relationship for this business requirement and uses the Setup Menu to create a custom object
called "Global Address". Which field should the developer ad to create the most efficient model that
supports the business need?
A. Add a Lookup field on the Account object to the Global Address object.
B. Add a Lookup field on the Global Address object to the Account object
C. Add a Master-Detail field on the Account object to the Global Address object
D. Add a Master-Detail field on the Global Address object to the Account object.
47 . Which statement generates a list of Leads and Contacts that have a field with the phrase
'ACME'?
A. List <sObject> searchList = (FIND "ACME" IN ALL FIELDS RETURNING Contact, Lead);
B. Map <sObject> searchList = (FIND "ACME" IN ALL FIELDS RETURNING Contact, Lead);
C. List<List <sObject>> searchList = (FIND "ACME" IN ALL FIELDS RETURNING Contact, Lead);
D. List<List < sObject>> searchList = (SELECT Name, ID FROM Contact, Lead WHERE Name like
'%ACME%');
48 . Universal Containers wants to back up all of the data and attachments in its Salesforce org once
month. Which approach should a developer use to meet this requirement?
A. Use the Data Loader command line.
B. Create a Schedulable Apex class.
C. Schedule a report.
D. Define a Data Export scheduled job.
A. Unify the before insert and before update triggers and use Process Builder for the delete action.
B. Create helper classes to execute the appropriate logic when a record is saved.
C. Maintain all three triggers on the Expense__c object, but move the Apex logic out of the trigger
definition.
D. Unify all three triggers in a single trigger on the Expense__c object that includes all events.
50 . A developer must create a DrawList class that provides capabilities defined in the Sortable and
Drawable interfaces.
B. ANSWER
C.
D.
51 . A developer creates a new Apex trigger with a helper class, and writes a test class that only
exercises 95% coverage of new Apex helper class
Change Set deployment to production fails with the test coverage warning:
"Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required"
What should the developer do to successfully deploy the new Apex trigger and helper class?
A. Increase the test class coverage on the helper class
B. Remove the falling test methods from the test class.
C. Run the tests using the 'Run All Tests' method.
D . Create a test class and methods to cover the Apex trigger
53 . A developer creates a batch Apex job to update a large number of records, and receives reports
of the job timing out and not completing.
What is the first step towards troubleshooting the issue?
A. Disable the batch job and recreate it with a smaller number of records.
B. Decreas the batch size to reduce the load on the system.
C Check the debug logs for the batch job.
D. Check the asynchronous job monitoring page to view the joh status and logs.
54. When using Salesforce DX, what does a developer need to enable to create and manage scratch
orgs?
A. Production
D. Dev Hub
C. Environment Hub
D. Sandbox
55 . A developer creates a Lightning web component that imports a method within an Apex class.
When a Validate button is pressed, the method runs to execute complex validations.
In this implementation scenario, which two options are part of the Controller according to the MVC
architecture? (Choose 2 answers)
A. JavaScript file
B. Apex Class
C. HTML
D. XML file
56 . A developer created these three Rollup Summary fields in the custom object, Project_c:
Total Timesheets_c
Total Approved_Timesheet_c
Total Rejected_Timesheet_c
The developer is asked to create a new field that shows the ratio between rejected and approved
timesheets for a given project.
Which should the developer use to implement the business requirement in order to minimize
maintenance overhead?
A. Apex trigger
B. Formula field
C. Record-triggered flow
D. Roll up summary field
57 . A developer wants to send an outbound message when a record meets a specific criteria.
Which two features satisfy this use case? (Choose 2 answers)
A. Next Best Action can be used to check the record criteria and send an outbound message
B. Flow Builder can be used to check the record criteria and send an outbound message.
C. Approval Process can be used to check the record criteria and send an outbound message without
Apex code.
D. Entitlement Process can be used to check the record criteria and send en outbound messa without
Apex code.
58 . Which statement is true regarding execution order when triggers are associated to the same
object and event?
A. Trigger execution order cannot be guaranteed.
B. Triggers are executed alphabetically by trigger name.
C. executed In the order they are modified.
D. Triggers are executed in the order they are created.
Recruiters have requested the ability to view whether the Contact's Mailing State value matches a
value selected on the Preferred_Locations_c field, within the Job_Applicationc record. Recruiters
would like this value to be kept in sync, if changes occur to the Contact's Mailing State or if the Job's
Preferred_Locations_c field is updated.
What is the recommended tool a developer should use to meet the business requirement?
A. Apex Digger
B. Process Builder
C. Record-triggered flow
D. Formula field
62 . The Job_Application_c custom object has a field that is a Master-Detail relationship to the
Contact object, where the Contact object is the Master. As part of a feature implementation, a
developer needs to retrieve a list containing all Contact records where the related Account Industry
is `Technology' while also retrieving the contact's Job_Application_c records.
Based on the object's relationships, what is the most efficient statement to retrieve the list of
contacts?
A. [SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE Account.Industry =
'Technology'];
B. [SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE Accounts.Industry =
'Technology'];
C. [SELECT Id, (SELECT Id FROM Job_Applications_c) FROM Contact WHERE Accounts.Industry =
'Technology'];
D. [SELECT Id, (SELECT Id FROM Job_Application_c) FROM Contact WHERE Account.Industry =
'Technology'];
63 . Universal Containers hires a developer to build a custom search page to help user- 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 SOQ1 Mid SOSI ?
( Choose 2 answers )
A. SOQL is able to return more records.
B. SOQL is faster for text searches.
C. SOSL is able to return more records.
D. SOSL is faster for tent searches
64 . A developer needs to allow users to complete a form on an Account record that will create a
record for a custom object.
The form needs to display different fields depending on the user’s job role. The functionality should
only be available to a small group of users.
Which three things should the developer do to satisfy these requirements? ( Choose 3 answers )
A . Add a dynamic action to the Account record page.
B . Create a custom permission for the users.
C . Create a Lightning web component.
D . Add a dynamic action to the user’s assigned page layouts.
E . Create a dynamic form.
A. Use a MAX Roll-Up Summary field on the latest availability date fields.
B. Use a LATEST formula on each of the latest availability date fields.
C. Use a DAYS formula on each of the availability date fields and a COUNT Roll-Up Summary
field on the Order
D. D. Use a CEILING formula on each of the latest availability date fields,
2. Universal Containers wants to ensure that all new leads created in the system have a valid
email address. They have already created a validation rule to enforce this requirement, but
want to add an additional layer of validation using Apex code. What would be the best
solution for this requirement?
A. Use a Process Builder to validate the email address and display. Message if it is
invalid error
B. Use a trigger on the Lead object to validate the email address and display an error
message if it is invalid.
C. Create a time-based workflow rule that updates the email address if it is Invalid
D. Submit a REST API Callout with a JSON payload and validate the fields on a third
party system.
A. 0 B. 1 C. 2
D. 3
A. Scratch orgs
B. Developer Sandboxes
C. Developer orgs
D. Full Copy Sandboxes
6. Universal Containers uses Service Cloud with a custom field, Stage__c, on the Case object.
Management wants to send a follow-up email reminder to the Case Owner 6 hours after the
stage_c field is set to “Waiting on Customer”. The Salesforce Administrator wants to ensure
the solution used is bulk safe.
Which automation tool should a developer recommend to meet these business
requirements?
A. Entitlement Process
B. Record Triggered flow with a scheduled path
C. Scheduled flow
D. Einstein Next Best Action
7. A developer is alerted to an issue with a custom Apex trigger that is causing records to be
duplicated.
What is the most appropriate debugging approach to troubleshoot the issue?
A. Use the Apex Interactive Debugger to step through the code and Identify the Issue.
B. Disable the trigger in production and test to see if the issue still occurs.
C. Review the Historical Event logs to identify the source of the issue.
D. Add system.debug statements to the code to track the execution flow and Identify
the issue.
8. Universal Containers needs to create a custom user interface component that allows users to
enter information about their accounts. The component should be able to validate the user
input before saving the information to the database.
A. Flow
B. VUE Javascript framework
C. Visualforce
D. Lightning Web Components
9. A developer must troubleshoot to pinpoint the causes of performance issues when a custom
page loads in their org.
Which tool should the developer use to troubleshoot query performance?
A. Visual Studio Code IDE
B. Setup Menu
C. AppExchange
D. Developer Console
10. How can a developer check the test coverage of active Process Builder and Flows deploying
them in a Changing Set?
A. Use the Flow properties page.
11. What should a developer do to check the code coverage of a class after running all tests?
A. View the Class Test Percentage tab on the Apex Class list view in Salesforce Setup.
B. View the Code Coverage column in the list view on the Apex Classes page.
C. View the code coverage percentage for the class using the Overall Code Coverage
panel in the Developer Console Tests tab.
D. Select and run the class on the Apex Test Execution page in the Developer
12. A developer has a Visualforce page and custom controller to save Account records. The
developer wants to display any validation rule violations to the user.
How can the developer make sure that validation rule violations are displayed?
13. 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?
14. A developer has an integer variable called maxAttempts. The developer needs to ensure that
once maxAttempts is initialized, it preserves its value for the length of the Apex transaction;
while being able to share the variable’s state between trigger executions.
How should the developer declare maxAttempts to meet these requirements?
15. 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. <lightning-input-field field-name=’Salary__c’>
</lightning-input-field>
B. <lightning-formatted-number value=’Salary__c’ format-style=’currency’>
</lightning-formatted-number>
C. <lightning-input type=’number’ value=’Salary__c’ formatter=’currency’>
</lightning-input>
D. <lightning-input-currency value=’Salary__c’>
</lightning-input-currency>
16. What will be the output in the debug log in the event of a QueryException during a call to
the aQuery method in the following example?
A. Querying Accounts.
Query Exception.
B. Querying Accounts.
Custom Exception.
C. Querying Accounts.
Custom Exception.
Done.
17. Which Lightning code segment should be written to declare dependencies on a Lightning
component, c: accountList, that is used in a Visualforce page?
</aura:component>
</aura: application>
C. <aura:application access-GLOBAL” extends-“itng:outApp”>
<aura: dependency resource=”c:accountList”>
</aura: application>
D. <aura:component access-“GLOBAL”>
<aura: dependency resource=”c:accountList”/>
</aura:component>
18. A developer wants to mark each Account in a List<Account> as either or Inactive based on
the LastModifiedDate field value being more than 90 days. Which Apex technique should the
developer use?
19. A developer is creating an app that contains multiple Lightning web components. One of the
child components is used for navigation purposes. When a user click a button called..
component, the parent component must be alerted so it can navigate to the next page.
How should this be accomplished?
D. Fire a notification.
20. 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. 2 B. 1 C. 3
D. 4
@AuraEnabled
Public static void updateLeads() {
For (Lead thisLead : [SELECT Origin FROM Lead]) {
thisLead.LeadSource = ‘Some Source’; // Example field update update
thisLead;
thisLead.Origin__c = ‘Some Origin’; // Example custom field update
}
}
Which governor limit will likely be exceeded within the Apex transaction?
23. A developer needs to implement a custom SOAP Web Service that is used by an external
Web Application. The developer chooses to include helper methods that are not used by the
Web Application in the implementation of the Web Service Class.
Which code segment shows the correct declaration of the class and methods?
Boolean helperMethod() {
/* implementation*/
24. A developer created these three Rollup Summary fields in the custom object, Project__c:
The developer is asked to create a new field that shows the ratio between rejected and
approved timesheets for a given project.
Which should the developer use to implement the business requirement in order to
minimize maintenance overhead?
A. Apex trigger
B. Record-triggered flow
C. Roll-up summary Field
D. Formula Field
25. Given the following Anonymous block : List<Case> casesToUpdate = new List<Case>(); for
(Case thisCase: [Select Id, Status FROM Case LIMIT 50000]) { thisCase. Status = ‘Working’;
casesToUpdate.add(thisCase);
}
try{
Database.update (casesToUpdate, false); }
catch (Exception e) {
System.debug(e.getMessage());
}
What should a developer consider for an environment that has over 10,000 Case records?
26. Universal Containers implemented a private sharing model for the Account object. A custom
Account search tool was developed with Apex to help sales
representatives find accounts that match multiple criteria they specify. Since its release,
users of the tool report they can see Accounts they do not own. What should the
developer use to enforce sharing permissions for the currently logged-in user while
using the custom search tool?
A. Use the schema describe calls to determine if the logged-in user has access to the
Account object.
B. Use the UserInfo Apex class to filter all SOQL queries to returned records owned by
the logged-in user.
C. Use the with sharing keyword on the class declaration.
D. Use the without sharing keyword on the class declaration.
return result;
}
Given the multi-tenant architecture of the Salesforce platform, what is a best practice a
developer should implement and ensure successful execution of the method?
28. How does the Lightning Component framework help developers implement solutions faster?
A. By providing an Agile process with default steps
B. By providing code review standards and processes
C. By providing device-awareness for mobile and desktops
D. By providing change history and version control
29. A developer created a custom order management app that uses an Apex class. The order is
represented by an Order object and an Orderltem object that has a masterdetail relationship
to Order. During order processing, an order may be split into multiple orders.
What should a developer do to allow their code to move some existing Orderltem records to
a new Order record?
30. Flow Builder uses an Apex action to provide additional information about multiple Contacts,
stored in a custom class, Contact Info.
Which is the correct definition of the Apex method that gets the additional information?
/*implementation*/
}
/*implementation*/
}
/*implementation*/
}
/*implementation*/
}
31. A PrimaryId__c custom field exists on the candidate C custom object. The field is used to
store each candidate’s id number and is marked as Unique in the schema definition.
As part of a data enrichment process, Universal Containers has a CSV file that contains
updated data for all candidates in the system. The file contains each Candidate’s primary id
as a data point. Universal Containers wants to upload this information into Salesforce, while
ensuring all data rows are correctly mapped to a candidate in the system.
Which technique should the developer implement to streamline the data upload?
MyClass.myStaticMethod(trigger.new);
The developer creates a test class with a test method that calls MyClass.myStaticMethod,
resulting in 81% overall code coverage.
What happens when the developer tries to deploy the trigger and two classes to production,
assuming no other code exists?
A. The deployment fails because no assertions were made in the test
method.
B. The deployment passes because both classes and the trigger were
included in the deployment.
C. The deployment passes because the Apex code has required (>75%)
code coverage.
D. The deployment fails because the Apex trigger has no code
coverage.
33. Universal Containers is developing a new Lightning web component for their marketing
department. They want to ensure that the component is fine tuned and provides a seamless
user experience.
What are some benefits of using the Lightning Component framework?
A. Automatic support for accessibility standards
B. Compatibility with all web browsers
C. Better performance due to client-side rendering
D. Easy Integration with third-party libraries
34. Universal Containers has developed custom Apex code and Lightning Components in a
Sandbox environment. They need to deploy the code and associated configurations to the
Production environment.
What is the recommended process for deploying the code and configurations to Production?
A. Use the Ant Migration Tool to deploy the Apex code and Lightning Components.
B. Use Salesforce CLI to deploy the Apex code and Lightning Components.
C. Use a change set to deploy the Apex code and Lightning Components.
D. Use the Force.com IDE to deploy the Apex code and Lightning Components.
35. A developer is creating a Lightning web component to show a list of sales records. The Sales
Representative user should be able to see the commission field on each record. The Sales
Assistant user should be able to see all fields on the record except the commission field.
How should this be enforced so that the component works for both users without showing
any errors?
A. Use Lightning Data Service to get the collection of sales records.
B. Use WITH SECURITY_ENFORCED in the SOQL that fetches the data for the
component.
C. Use Lightning Locker Service to enforce sharing rules and field-level security.
36. An Opportunity needs to have an amount rolled up from a custom object that is not in a
master-detail relationship.
How can this be achieved?
A. Use the Streaming API to create real-time roll-up summaries.
B. Write a trigger on the Opportunity object and use an aggregate function to sum
the amount for all related child objects under the Opportunity.
C. Write a trigger on the child object and use an aggregate function to sum the
amount for all related child objects under the Opportunity. D. Use the Metadata
API to create real-time roll-up summaries.
37. The OrderHelper class is a utility class that contains business logic for processing orders.
Consider the following code snippet:
public class without sharing OrderHelper
{
//code implementation
}
A developer needs to create a constant named DELIVERY MULTIPLIER with a value of 4.15.
The value of the constant should not change at any time in the code. How should the
developer declare the DELIVERY MULTIPLIER constant to meet the business objectives?
A. constant decimal DELIVERY_MULTIFILTER = 4.15;
38. What can be easily developed using the Lightning Component framework?
A. Customized JavaScript buttons
B. Salesforce Classic user Interface pages
C. Salesforce integrations
D. Lightning Pages
39. In the Lightning UI, where should a developer look to find information about a Paused Flow
Interview?
A. On the Paused Flow Interviews related list for a given record
B. In the system debug log by filtering on Paused Flow Interview
C. In the Paused Interviews section of the Apex Flex Queue
D. On the Paused and failed Flow Interviews page under Setup > Process
Automation
40. What should a developer use to obtain the Id and Name of all the Leads, Accounts, and
Contacts that have the company name ”Universal Containers”?
42. Universal Containers wants Opportunities to be locked from editing when reaching the
Closed/Won stage. Which two strategies should a developer use to accomplish this? (Choose
two.)
44. A Salesforce Administrator used Flow Builder to create a flow named “accountOnboarding”.
The flow must be used inside an Aura component.
Which tag should a developer use to display the flow in the component?
A. lightning-flow
B. aura-flow
C. lightning:flow
D. aura:flow
45. A large corporation stores Orders and Line Items in Salesforce for different lines of business.
Users are allowed to see Orders across the entire organization, but, for security purposes,
should only be able to see the Line Items for Orders in their line of business.
Which type of relationship should be used between Line Items and Orders?
A. Lookup
B. Direct Lookup
C. Master-Detail
D. Indirect Lookup
46. A developer needs to have records with specific field values in order to test a new Apex class.
What should the developer do to ensure the data is available to the test? A. Use
SOQL to query the org for the required data.
B. Use Teat loadData() and reference a JSON file in Documents.
C. Use Anonymous Apex to create the required data.
D. Use Text.loadData() and reference a CSV file in a static resource.
47. What should a developer use to script the deployment and unit test execution as part of
continuous integration?
A. Execute Anonymous
B. Developer Console
C. VS Code
D. Salesforce CLI
50. What should a developer use to fix a Lightning web component bug in a sandbox?
A. Force.com IDE
B. Execute Anonymous
C. Developer Console
D. VS Code
51. A developer migrated functionality from JavaScript demoting to a Lightning web component
and wants to use the existing getOpportunities() method to provide data.
Which modification to the method is necessary?
A. The method must be decorated with @AuraEnabled.
B. The method must return a JSON Object.
C. The method must be decorated with (cacheable=true).
D. The method must return a String of a serialized JSON Array.
53. A custom picklist field, Food Preference c, exists on a custom object. The picklist contains the
following options: ‘Vegan’, ‘Kosher’, ‘No Preference’. The developer must ensure a value is
populated every time a record is created or updated. What is the optimal way to ensure a
value is selected every time a record is saved?
54. A developer wrote Apex code that calls out to an external system using REST API.
How should a developer write the test to prove the code is working as intended? A. Write
a class that extends HTTPCalloutMock.
B. Write a class that extends WebServiceMock.
C. Write a class that implements WebServiceMock.
D. Write a class that implements HTTPCalloutMock.
55. A custom object Trainer has a lookup field to another custom object Gym .
Which SOQL query will get the record for the Viridian City Gym and all it’s trainers?
B. SELECT Id, (SELECT Id FROM Trainer__c ) FROM Gym__c WHERE Name =’Viridian City
Gym’
C. SELECT Id, (SELECT Id FROM Trainers__r ) FROM Gym__c WHERE Name =’Viridian
City Gym’
D. SELECT Id, (SELECT Id FROM Trainer__c ) FROM Gym__c WHERE Name =’Viridian City
Gym’
56. A developer wants to import 500 Opportunity records into a sandbox. Why should the
developer choose to use Data Loader instead of Data Import Wizard?
A. Data Loader runs from the developer’s browser.
B. Data Loader automatically relates Opportunities to Accounts.
C. Data Import Wizard does not support Opportunities.
D. Data Import Wizard can not import all 500 records.
57. developer is working on a project to import data from an external system into Salesforce.
The data contains sensitive information that should not be visible to all users in Salesforce.
What should the developer do to ensure that the data is secure?
A. Use the Data Import Wizard to Import the data and set up field-level security to
restrict access to sensitive fields.
B. Use a third-party tool to encrypt the sensitive data before Importing it into
Salesforce.
C. Use the Salesforce CLI to import the data and set up user permissions to restrict
access to sensitive data.
D. Use the Apex Data Loader to import the data and write Apex code to handie security
and access control.
58. A developer has a requirement to write Apex code to update a large number of account
records on a nightly basis. The system administrator needs to be able to schedule the class to
run after business hours on an as-needed basis.
Which class definition should be used to successfully implement this requirement?
59. An org has an existing flow that edits an Opportunity with an Update Records element. A
developer must update the flow to also create a Contact and store the created Contact’s ID
on the Opportunity.
Which update must the developer make in the flow?
61. A developer is designing a new application on the Salesforce platform and wants to ensure it
can support multiple tenants effectively.
Which design framework should the developer consider to ensure scalability and
maintainability?
A. Agile Development
B. Waterfall Model
C. Model-View-Controller (MVC)
D. Flux (view, action, dispatcher, and store)
62. Which action may cause triggers to fire? A. Renaming or replacing a picklist entry
B. Updates to Feed Items
C. Changing a user’s default division when the transfer division option is checked
D. Cascading delete operations
64. Since Aura application events follow the traditional publish- subscribe model, which method
is used to fire an event?
A. fireEvent()
B. registerEvent()
C. emit()
D. fire()
65. The Job_Application__c custom object has a field that is a master-detail relationship to the
Contact object, where the Contact object is the master.
As part of a feature implementation, a developer needs to retrieve a list containing all
Contact records where the related Account Industry is ‘Technology’, while also retrieving the
Contact’s Job_Application__c records.
Based on the object’s relationships, what is the most efficient statement to retrieve the list
of Contacts?
-----------END------------
SET 4
1 . Universal Containers (UC) processes orders in Salesforce in a custom object,
order_c. They also allow sales reps to upload CSV files with thousands of orders at a
time.
A developer is tasked with integrating orders placed in Salesforce with UC's enterprise
resource planning (ERP) system.
After the status for an order__c is first set to 'Placed', the order information must be
sent to a REST endpoint in the ERP system that can process one order at a time.
What should the developer implement to accomplish this?
A. Callout from a Queueable class called from a trigger
B. Callout from a Batchable class called from a scheduled job
C. Flow with a callout from an invocable method
D. Callout from an @future method called from a trigger
2. 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.
Which two automation tools can be used to implement this feature?
A Quick actions
B. Approval process
C Account trigger
D. Fast Field Updates record-triggered flow
6. The value of the account type field is not being displayed correctly on the
page. Assuming the custom controller is properly referenced on the Visualforce page,
what should the developer do to correct the problem?
A. Add a getter method for the actType attribute.
B. Change theAccount attribute to public.
C. Add with sharing to the custom controller.
D. Convert theAccount.Type to a String.
8. What can be used to override the Account's standard Edit button for Lightning
Experience?
A. Lightning action
B. Lightning page
C. Lightning component
D. Lightning flow
9. A developer created this Apex trigger that calls MyClass.myStaticMethod:
trigger myTrigger on Contact (before insert)
{ MyClass.myStaticMethod(trigger.new); }
The developer creates a test class with a test method that calls
MyClass.myStaticMethod directly, resulting in 81% overall code coverage.
What happens when the developer tries to deploy the trigger and two classes to
production, assuming no other code exists?
A. The deployment passes because both classes and the trigger were included in the
deployment.
B. The deployment fails because no assertions were made in the test method.
C. The deployment passes because the Apex code has the required >75% code
coverage.
D. The deployment falls because the Apex trigger has no code coverage.
10. A developer needs to create a baseline set of data (Accounts, Contacts, Products,
Assets) for an entire suite of Apex tests allowing them to test isolated requirements
for various types of Salesforce cases.
Which approach can efficiently generate the required data for each unit test? A.
Create a mock using the HttpCalloutMock interface.
B. Use @TestSetup with a void method.
C. Add @IsTest(seeAllData=true) at the start of the unit test class.
D. Create test data before Test.startTest() in the unit test.
13. An org has an existing flow that edits an Opportunity with an Update Records
element. A developer must update the flow to also create a Contact and store the
created Contact's ID on the Opportunity.
Which update must the developer make in the flow? A.
Add a new Update Records element.
B. Add a new Roll Back Records element.
C. Add a new Create Records element.
D. Add a new Get Records element.
14. A developer needs to create a baseline set of data (Accounts, Contacts, Products,
Assets) for an entire suite of tests allowing them to test independent requirements
for various types of Salesforce Cases.
Which approach can efficiently generate the required data for each unit test? A.
Create a mock using the Stub API.
B. Create test data before Test.startTest() in the unit test.
C. Use @TestSetup with a void method.
D. Add @IsTest(seeAllData=true) at the start of the unit test class
15. Which Lightning Web Component custom event property settings enable the
event to bubble up the containment hierarchy and cross the Shadow DOM boundary?
A. bubbles: true, composed: false
B. bubbles: false, composed: false
C. bubbles: true, composed: true
D. bubbles: false, composed: true
16. Universal Containers needs to create a custom user interface component that
allows users to enter information about their accounts. The component should be
able to validate the user input before saving the information to the database.
What is the best technology to create this component?
A. Flow
B. Lightning Web Components
C. Visualforce
D. VUE JavaScript framework
17. How should a developer write unit tests for a private method in an Apex class? A.
Use the SeeAllData annotation.
B. Add a test method in the Apex class.
C. Mark the Apex class as global.
D. Use the @TestVisible annotation.
C. 2
D. 3
21. While developing an Apex class with custom search functionality that will be
launched from a Lightning Web Component, how can the developer ensure only
records accessible to the currently logged in user are displayed? A. Use the
WITH SECURITY_ENFORCED clause within the SOQL.
B. Use the inherited sharing keyword.
C. Use the with sharing keyword.
D. Use the without sharing keyword.
23. 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
24. While working in a sandbox, an Apex test fails when run in the Test Runner.
However, executing the Apex logic in the Execute Anonymous window succeeds with
no exceptions or errors.
Why did the method fail in the sandbox test framework but succeed in the Developer
Console?
A. The test method does not use System.runAs to execute as a specific user.
B. The test method is calling an @future method.
C. The test method relies on existing data in the sandbox.
D. The test method has a syntax error in the code.
25. How many Accounts will be inserted by the following block of code?
for (Integer i=0; i < 500; i++) (
Account a = new Account (Name='New Account ‘+ i);
insert a;
}
A. 100
B. 0
C. 150
D. 500
26. Which two characteristics are true for Lightning Web Component custom events?
A. Data may be passed in the payload of a custom event using @wire decorated
properties.
B. Data may be passed in the payload of a custom event using a property called
detall.
C. By default a custom event only propagates to its immediate container and to
its immediate child component.
D. By default a custom event only propagates to it's Immediate container.
27. Cloud Kicks has a multi-screen flow that its call center agents use when handling
inbound service desk calls.
At one of the steps in the flow, the agents should be presented with a list of order
numbers and dates that are retrieved from an external order management system in
real time and displayed on the screen.
What should a developer use to satisfy this requirement?
A. An outbound message
B. An Apex REST class
C. An Apex controller
D. An invocable method
28. Where are two locations a developer can look to find information about the
status of batch or future methods?
A. Developer Console
B. Apex Jobs
C. Paused Flow Interviews component
D. Apex Flex Queue
29. A lead developer creates a virtual class called "OrderRequest". Consider the
following code snippet:
public class CustomerOrder(
//code implementation
}
How can a developer use the OrderRequest class within the CustomerOrder class?
A. @Extends (class="OrderRequest") public class CustomerOrder
B. public class CustomerOrder implements Order
C. public class Customerorder extends OrderRequest D.
@Implements (class="OrderRequest") public class
CustomerOrder
30. What is the value of the Trigger.old context variable in a before insert trigger?
A. An empty list of sObjects
B. Undefined
C. null
D. A list of newly created sObjects without IDs
34. A Next Best Action strategy uses an Enhance element that invokes an Apex
method to determine a discount level for a Contact, based on a number of factors.
What is the correct definition of the Apex method?
A. @InvocableMethod global List<List<Recommendation>> getLevel
(List<ContactWrapper> input)
{/*implementation"/}
B. @InvocableMethod global Recommendation getlevel
(ContactWrapper input)
{/*implementation"/}
C. @InvocableMethod
global static ListRecommendation getLevel (List<ContactWrapper input)
{/*implementation"/}
D. @InvocableMethod global static List<List<Recommendation>>
getLevel ( List <ContactWrapper> input)
35. Universal Containers decided to transition from Classic to Lightning Experience.
They asked a developer to replace a JavaScript button that was being used to create
records with prepopulated values.
What can the developer use to accomplish this?
A. Validation rules
B. Apex triggers
C. Record triggered flows
D. Quick Actions
36. Universal Containers has developed custom Apex code and Lightning Components
in a Sandbox environment. They need to deploy the code and associated
configurations to the Production environment.
What is the recommended process for deploying the code and configurations to
Production?
A. Use the Force.com IDE to deploy the Apex code and Lightning Components.
B. Use the Ant Migration Tool to deploy the Apex code and Lightning
Components.
C. Use a change set to deploy the Apex code and Lightning Components.
D. Use Salesforce CLI to deploy the Apex code and Lightning Components.
37. In the following example, which sharing context will myMethod execute when it
is invoked?
public Class myClass {
public void myMethod() { /* implementation */ }
}
A. Sharing rules will be enforced by the instantiating class.
B. Sharing rules will be enforced for the running user.
C. Sharing rules will not be enforced for the running user.
D. Sharing rules will be inherited from the calling context.
38. What are two considerations for deploying from a sandbox to production? A.
At least 75% of Apex code must be covered by unit tests.
B. Unit tests must have calls to the System.assert method.
C. Should deploy during business hours to ensure feedback can be quickly
addressed.
D. All triggers must have at least one line of test coverage.
40. Universal Containers has a Visualforce page that displays a table of every
Container__c being rented by a given Account. Recently this page is failing with a
view state limit because some of the customers rent over 10,000 containers.
What should a developer change about the Visualforce page to help with the page
load errors?
A. Implement pagination with an OffsetController.
B. Implement pagination with a StandardSetController.
C. Use JavaScript remoting with SOQL Offset.
D. Use lazy loading and a transient List variable.
41. Universal Containers decides to use purely declarative development to build out a
new Salesforce application.
Which two options can be used to build out the business logic layer for this
application?
A. Record-Triggered Flow
B. Batch Jobs
C. Remote Actions
D. Validation Rules
42. A custom object Trainer__c has a lookup field to another custom object Gym__c.
Which SOQL query will get the record for the Viridian City Gym and all it's trainers?
A. SELECT ID FROM Trainer__c WHERE Gym_r.Name = 'Viridian City Gym’
B. SELECT ID, (SELECT ID FROM Trainer__c) FROM Gym__C WHERE Name =
'Viridian City Gym’
C. SELECT ID, (SELECT ID FROM Trainers__r) FROM Gym__C WHERE Name =
'Viridian City Gym’
D. SELECT ID, (SELECT ID FROM Trainer__c) FROM Gym__C WHERE Name =
'Viridian City Gym’
43. Which three resources in an Aura component can contain JavaScript functions?
A. Style
B. Renderer
C. Controller
D. Design
E. Helper
44. A developer created a custom order management app that uses an Apex class.
The order is represented by an Order object and an OrderItem object that has a
master-detail relationship to Order. During order processing, an order may be split
into multiple orders.
What should a developer do to allow their code to move some existing OrderItem
records to a new Order record?
A. Add without sharing to the Apex class declaration.
B. Change the master-detail relationship to an external lookup relationship.
C. Create a Junction object between OrderItem and Order.
D. Select the Allow reparenting option on the master-detail relationship.
47. An Opportunity needs to have an amount rolled up from a custom object that is
not in a master-detail relationship.
How can this be achieved?
A. Write a trigger on the Opportunity object and use tree sorting to sum the
amount for all related child objects under the Opportunity.
B. Use the Streaming API to create real-time roll-up summaries.
C. Write a trigger on the child object and use an aggregate function to sum the
amount for all related child objects under the Opportunity.
D. Use the Metadata API to create real-time roll-up summaries.
}
Based on this code, what is the value of x?
A. 3
B. 2
C. 4
50. Universal Containers has an order system that uses an Order Number to identify
an order for customers and service agents. Order records will be imported into
Salesforce.
How should the Order Number field be defined in Salesforce?
A. Indirect Lookup
B. External ID and Unique
C. Direct Lookup
D. Lookup
51. A developer created a trigger on a custom object. This custom object also has
some dependent pick lists.
According to the order of execution rules, which step happens first? A.
The original record is loaded from the database.
B. System validation is run for maximum field lengths C.
Old values are overwritten with the new record values.
D. JavaScript validation is run in the browser.
52. Universal Containers implemented a private sharing model for the Account
object. A custom Account search tool was developed with Apex to help sales
representatives find accounts that match multiple criteria they specify. Since its
release, users of the tool report they can see Accounts they do not own.
What should the developer use to enforce sharing permissions for the currently
logged in user while using the custom search tool?
A. Use the with sharing keyword on the class declaration.
B. Use the without sharing keyword on the class declaration.
C. Use the Userinfo Apex class to filter all SOQL queries to returned records
owned by the logged-in user.
D. Use the schema describe calls to determine if the logged-in user has access to
the Account object.
53. Universal Containers has a support process that allows users to request support
from its engineering team using a custom object, Engineering_Support_c.
Users should be able to associate multiple Engineering_Support__c records to a
single Opportunity record. Additionally, aggregate information about the
Engineering_Support__c records should be shown on the Opportunity record.
Which relationship field should be implemented to s upport these requirements?
A. Lookup field from Opportunity to Engineering Support__c
B: Master-detail field from Engineering support__c to Opportunity
C. Master-detail field from Opportunity to Engineering_Support__c
D. Lookup field from Engineering_Support__c to Opportunity
54. A developer is creating an app that contains multiple Lightning web components.
One of the child components is used for navigation purposes. When a user clicks a
button called Next in the child component, the parent component must be alerted so
it can navigate to the next page.
How should this be accomplished?
A. Update a property on the parent.
B. Call a method in the Apex controller.
C. Fire a notification.
D. Create a custom event.
56. Universal Containers is building a recruiting app with an Applicant object that
stores information about an individual person and a Job object that represents a job.
Each applicant may apply for more than one job.
What should a developer implement to represent that an applicant has applied for a
job?
A. Junction object between Applicant and Job
B. Lookup field from Applicant to Job
C. Master-detail field from Applicant to Job
D. Formula field on Applicant that references Job
57. A developer is implementing an Apex class for a financial system. Within the class,
the variables 'creditAmount' and 'debitAmount" should not be able to change once a
value is assigned.
In which two ways can the developer declare the variables to ensure their value can
only be assigned one time?
A. Use the static keyword and assign its value in a static initializer.
B. Use the final keyword and assign its value in the class constructor.
C. Use the final keyword and assign its value when declaring the variable.
D. Use the static keyword and assign its value in the class constructor.
59. Developers at Universal Containers (UC) use version control to share their code
changes, but they notice that when they deploy their code to different environments
they often have failures. They decide to set up Continuous Integration (CI).
What should the UC development team use to automatically run tests as part of their
CI process?
A. Salesforce CLI
B. Visual Studio Code
C. Force.com Toolkit
D. Developer Console
60. A developer is asked to prevent anyone other than a user with Sales Manager
profile from changing the Opportunity Status to Closed Lost if the lost reason is blank.
Which automation allows the developer to satisfy this requirement in the most
efficient manner?
A. An Apex trigger on the Opportunity object
B. An error condition formula on a validation rule on Opportunity
C. A record trigger flow on the Opportunity object
D. An approval process on the Opportunity object
61. A developer created a trigger on the Account object and wants to test if the
trigger is properly bulkified. The developer team decided that the trigger should be
tested with 200 account records with unique names.
What two things should be done to create the test data within the unit test with the
least amount of code?
A. Use the @isTest (seeAllData = true) annotation in the test class.
B. Use the @isTest(isParallel = true) annotation in the test class.
C. Create a static resource containing test data.
D. Use Test.loadData to populate data in your test methods.
62. 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 in Salesforce 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?
A. Use the order number from the OMS as an external ID.
B. Ensure that the order number in the OMS is unique.
C. Use the email on the contact record as an external ID.
D. Write a trigger on the Order object to delete the duplicates.
63. Which three data types can a SOQL query return?
A. Double
B. Long
C. sobject
D. Integer
E. List
64. A developer created a new after insert trigger on the Lead object that creates
Task records for each Lead.
After deploying to production, an existing outside integration that inserts Lead
records in batches to Salesforce is occasionally reporting total batch failures being
caused by the Task insert statement. This causes the integration process in the
outside system to stop, requiring a manual restart.
Which change should the developer make to allow the integration to continue when
some records in a batch cause failures due to the Task insert statement, so that
manual restarts are not needed?
A. Use the Database method with allorNone set to false.
B. Deactivate the trigger before the integration runs.
C. Remove the Apex class from the integration user's profile.
----------END-----------
SET5
1 . A Salesforce administrator used Flow Builder to create a flow named "accountOnboarding". The
flow must be used inside an Aura component.
Which tag should a developer use to display the flow in the component?
A . lightning : flow
B . lightning – flow
C . aura : flow
D . aura - flow
2 . A developer is alerted to an issue with a custom Apex trigger that is causing records to be
duplicated.
What is the most appropriate debugging approach to troubleshoot the issue?
A. Review the Historical Event logs to identify the source of the issue.
B. Add system.debug statements to the code to track the execution flow and identify the issue.
C. Use the Apex Interactive Debugger to step through the code and identify the issue.
D. Disable the trigger in production and test to see if the issue still occurs.
4 . If Apex code executes inside the execute() method of an Apex class when implementing the
Batchable Interface, which two statements are true regarding governor limits?
(Choose 2 answers)
A. The Apex governor limits are reset for each iteration of the execute() method.
B . The Apex governor limits cannot be exceeded due to the asynchronous nature of the transaction.
C. The Apex governor limits will use the asynchronous limit levels.
D. The Apex governor limits are omitted while calling the constructor of the Apex class.
5 . A developer must perform a complex SOQL query that joins two objects in a Lightning
component.
How can the Lightning component execute the query?
A. Write the query in a custom Lightning web component wrapper and invoke from the Lightning
component.
B . Invoke an Apex class with the method annotated as @AuraEnabled to perform the query.
C. Use the Salesforce Streaming API to perform the SOQL query
D. Create a flow to execute the query and invoke from the Lightning component.
6 . Which two operations affect the number of times a trigger can fire? (Choose 2 answers)
A. Criteria-based sharing calculations
B. Email messages
C. Roll-up summary fields
D. After-save record-triggered flow
7 . Which two are best practices when it comes to Aura component and application event handling?
(Choose 2 answers)
A. Try to use application events as opposed to component events.
B. Reuse the event logic in a component bundle, by putting the logic in the helper.
C. Use component events to communicate actions that should be handled at the application level.
D. Handle low-level events in the event handler and re-fire them as higher-level events.
8 of 65. What are three considerations when using the @InvocableMethod annotation in Apex?
(Choose 3 answers)
A. Only one method using the @InvocableMethod annotation can be defined per Apex class.
B. A method using the @InvocableMethod annotation can have multiple input parameters.
C. A method using the @InvocableMethod annotation must be declared as static.
D. A method using the @InvocableMethod annotation must define a return value.
E. A method using the @InvocableMethod annotation can be declared as Public or Global.
9 . Managers at Universal Containers want to ensure that only decommissioned containers are able
to be deleted in the system. To meet the business requirement a Salesforce developer adds
"Decommissioned” as a picklist value for the Status_c custom field within the Container_c object.
Which two approaches could a developer use to enforce only Container records with a status of
"Decommissioned" can be deleted? (Choose 2 answers)
A Before record-triggered flow
B. Apex trigger
C. After record-triggered flow
D. Validation rule
10 of 65. 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
11 of 65. A developer wrote Apex code that calls out to an external system using REST API.
How should a developer write the test to prove the code is working as intended?
13. How is a controller and extension specified for a custom object named "Notice" on a Visualforce
page?
A. apex:page standardController="Notice_c" extensions="myControllerExtension"
B. apex:page controllers="Notice_c, myControllerExtension"
C. apex:page Notice extends="myControllerExtension"
D. apex:page controller "Notice_c" extensions="myControllerExtension"
14. How does the Lightning Component framework help developers implement solutions faster?
A. By providing an Agile process with default steps
B. By providing code review standards and processes
C. By providing change history and version control
D. By providing device-awareness for mobile and desktops
15 . Universal Containers wants a list button to display a Visualforce page that allows users to edit
multiple records.
Which Visualforce feature supports this requirement?
A. Standard Controller with Custom List Controller extension
B. Custom List Controller with recordSetVar page attribute
C. Controller Extension and <apex:ltatautton> tag
D. Standard controller and the recordSetVar page attribute
16. Universal Containers wants to ensure that all new leads created in the system have a valid email
address. They have already created a validation rule to enforce this requirement, but want to add an
additional layer of validation using automation.
What would be the best solution for this requirement?
A. Submit a REST API Callout with a ISON payload and validate the fields on a third party system
B. Use an Approval Process to enforce the completion of a valid email address using an outbound
message action.
C. Use before-save Apex tripper on the Lead object to validate the email address and display an
error message if it is invalid
D. Use a custom Lightning Web component to make a callout to validate the fields on a third party
systems
17. A team of developers is working on a source-driven project that allows them to work
independently, with many different org configurations.
Which type of Salesforce orgs should they use for their development?
A. Developer sandboxes
B. Full Copy sandboxes
C. Developer orgs
D. Scratch orgs
18 . A team of many developers work in their own individual orgs that have the same configuration
as the production org.
Which type of org is best suited for this scenario?
A. Developer Sandbox
B. Full Sandbox
C. Developer Edition
D. Partner Developer Edition
19 . 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
20 . Which code statement includes an Apex method named updateAccounts Accounts in the class
AccountController for use in a Lightning web component?
A. import updateAccounts from Account Controller’;
B .import updateAccounts from ‘salesforce/apex/Account Controller’;
C .import updateAccounts from ‘Account Controller.updateAccounts’;
D .import updateAccounts from @salesforce/apex/Account Controller.updateAccounts’;
21 . A developer needs to allow users to complete a form on an Account record that will create a
record for a custom object.
The form needs to display different fields depending on the user's job role. The functionality should
only be available to a small group of users.
> Which three things should the developer do to satisfy these requirements?
(Choose 3 answers)
A. Add a Dynamic Action to the Users' assigned Page Layouts.
B. Create a Lightning web component. []
C. Create a Custom Permission for the users.
D. Add a Dynamic Action to the Account Record Page.
E. Create a Dynamic Form.
22. A developer needs to prevent the creation of request records when certain conditions exist in the
system. A RequestLogic class exists to checks the conditions. What is the correct implementation?
25 . What should a developer do to check the code coverage of a class after running all tests?
A. View the code coverage percentage for the class using the Overall Code Coverage panel in the
Developer Console Tests tab.
B. View the Class Test Percentage tab on the Apex Class list view in Salesforce Setup.
C. Select and run the class on the Apex Test Execution page in the Developer Console.
D. View the Code Coverage column in the list view on the Apex Classes page.
26 . A developer creates a new Apex trigger with a helper class, and writes a test class that only
exercises 95% coverage of the new Apex helper class.
Change Set deployment to production fails with the test coverage warning:
"Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required."
What should the developer do to successfully deploy the new Apex trigger and helper class?
A. Increase the test class coverage on the helper class.
B. Create a test class and methods to cover the Apex trigger.
C. Remove the failing test methods from the test class.
D. Run the tests using the 'Run All Tests' method
27 . What are three capabilities of the <ltng : require> tag when loading JavaScript resources in Aura
components? ( Choose 3 answers )
A. One-time loading for duplicate scripts
B. Loading scripts in parallel
C. Loading files from Documents
D. Specifying loading order
E. Loading externally hosted scripts
28 . A custom picklist field, Food_Preference_c, exists on a custom object. The picklist contains the
following options: 'Vegan', 'Kosher', 'No Preference'. The developer must ensure a value is populated
every time a record is created or updated.
What is the optimal way to ensure a value is selected every time a record is saved?
A Set "Use the first value in the list as the default value" to True.
B. Write an Apex trigger to ensure a value is selected.
C. Mark the field as Required on the object's page layout.
D. Mark the field as Required on the field definition.
29 . A company decides to implement a new process where every time an Opportunity is created, a
follow up Task should be created and assigned to the Opportunity Owner.
What is the most efficient way for a developer to implement this?
A. Apex trigger on Task
B. Task actions
C. Auto-launched flow on Task
D. Record-triggered flow on Opportunity
30 . A developer is tasked to perform a security review of the ContactSearch Apex class that exists in
the system. Within the class, the developer identifies the following method as a security threat:
What are two ways the developer can update the method to prevent a SOQL injection attack?
(Choose two.)
A. Use the @ReadOnly annotation and the with sharing keyword on the class.
B. Use the escapeSingleQuotes method to sanitize the parameter before its use.
C. Use a regular expression expression on the parameter to remove special characters.
D. Use variable binding and replace the dynamic query with a static SOQL.
33 . What should a developer use to script the deployment and unit test execution as part of
continuous integration?
A . Developer Console
B . Execute Anonymous
C . Salesforce CLI
D . VS Code
34 of 65. What are two considerations for deploying from a sandbox to production?
Choose 2 answers
A. Urist tests must have calls to the System.assert method.
B. All triggers must have at least one line of test coverage.
C At least 75% of Apex code must be covered try unit tests.
D. Should deploy during business hours to ensure feedback can be quickly addressed.
35 . What is the result of the following code?
Account a = new Account () ;
Database.insert(a, false);
A. The record will not be created and no error will be reported.
B. The record will not be created and a exception will be thrown.
C. The record will be created and a message will be in the debug log.
D. The record will be created and no error will be reported.
36 . A developer is creating a page that allows users to create multiple Opportunities. The developer
is asked to verify the current user’s default Opportunity record type, and set certain default values
based on the record type before inserting the record.
How can the developer find the current user’s default record type?
B. Query the Profile where the ID equals userInfo.getProfileID() and then use the
profile.Opportunity.getDefaultRecordType() method.
C. Create the opportunity and check the opportunity.recordType, which will have the record ID of the
current user’s default record type, before inserting.
37 . The Account object in an organization has a master-detail relationship to a child object called
Branch. The following automations exist:
Roll-up summary fields
Custom validation rules
Duplicate rules
A developer created a trigger on the Account object.
Which two things should the developer consider while testing the trigger code? (choose 2 answers)
A .Rollup summary fields can cause the parent record to go through Save.
B. Duplicate rules are executed once all DML operations commit to the database.
C .The trigger may fire multiple times during a transaction
D .The validation rules will cause the trigger to fire again
38 . A developer has a single custom controller class that works with a Visualforce Wizard to support
creating and editing multiple subjects. The wizard accepts data from user inputs across multiple
Visualforce pages and from a parameter on the initial URL.
Which three statements are useful inside the unit test to effectively test the custom controller?
Choose 3 answers
A. public ExtendedController(ApexPages StandardController cntrl) { }
B. Test.setCurrentPage(pageRef);
C. ApexPages.CurrentPage().getParameters().put('input\', 'TestValue');
D. String nextPage - controller.save().getUrl();
E. insert pageRef.
39 . A developer is designing a new application on the Salesforce platform and wants to ensure it can
support multiple tenants effectively.
Which design framework should the developer consider to ensure scalability and maintainability?
A. Flux (view, action, dispatcher, and store)
B. Waterfall Model
C. Agile Development
D. Model-View-Controller (MVC)
40 . A developer at AW Computing is tasked to create the supporting test class for a programmatic
customization that leverages records stored within the custom object, Pricing_Structure__c. AW
Computing has a complex pricing structure for each item on the store, spanning more than 500
records.
Which two approaches can the developer use to ensure Pricing_Structure__c records are available
when the test class is executed? (Choose two.)
A. Use the Test.loadTest() method.
B. Use the @IsTest(SeeAllData=true) annotation.
C. Use a Test Data Factory class.
D. Use without sharing on the class declaration.
What occurs when more than one Account is returned by the SOQL query?
A. The variable, myaccount, is automatically cast to the List data type
B. An unhandled exception is thrown and the code terminates.
C The query fails and an error is written to the debug log.
D. The first Account returned is assigned to myaccount.
42 . An org has an existing Visual Flow that creates an Opportunity with an Update Records element.
A developer must update the Visual Flow to also create a Contact and store the created Contact's ID
on the Opportunity.
Which update should the developer make in the Visual Flow?
A. Add a new Create Records element.
B. Add a new Quick Action (of type Create) element.
C. Add a new Update Records element.
D. Add a new Get Records element.
43 . Universal Containers wants to back up all of the data and attachments in its Salesforce org once
month. Which approach should a developer use to meet this requirement?
A . Use the Data Loader command line.
B . Create a Schedulable Apex class.
C . Schedule a report.
D . Define a Data Export scheduled job.
44 . What should a developer use to fix a Lightning web component bug in a sandbox?
A. VS Code
B. Developer Console
C. Force.com IDE
D. Execute Anonymous
45 . A developer must write an Apex method that will be called from a Lightning component. The
method may delete an Account stored in the accountRec variable.
Which method should a developer use to ensure only users that should be able to delete Accounts
can successfully perform deletions?
A. accountRec.isDeletable()
B. accountRec.sObjectType.isDeletable()
C. Account.isDeletable()
D. Schema.sObjectType.Account.isDeletable()
46 . A lead developer creates an Apex interface called "Laptop". Consider the following code snippet:
How can a developer use the Laptop Interface within the SilverLaptop class ?
A. @Extends(class=Laptop'') public class SilverLaptop
B. public class SilverLaptop extends Laptop
C. @Interface (class=''Laptop'') public class SilverLaptop
D. public class Silverlaptop implements Laptop
47 . A lead developer creates a virtual class called "OrderRequest". Consider the following code
snippet:
public class CustomerOrder(
//code implementation
}
How can a developer use the OrderRequest class within the CustomerOrder class?
A . Extends (class="OrderRequest")
public class CustomerOrder
D. Implements (class="OrderRequest")
public class CustomerOrder
48 . What should a developer use to obtain the Id and Name of all the Leads, Accounts, and Contacts
that have the company name "Universal Containers"?
49 . An Opportunity needs to have an amount rolled up from a custom object that is not in a master-
detail relationship.
How can this be achieved?
A. Write a Process Builder that links the custom object to the Opportunity.
B. Write a trigger on the child object and use an aggregate function to sum the amount for all related
child objects under the Opportunity
C. Write a trigger on the child object and use a red-black tree sorting to sum the amount for all
related child objects under the Opportunity.
D. Use the Streaming API to create real-time roll-up summaries.
50 . A primaryid_c custom field exists on the candidate_c custom object. The filed is used to store
each candidate's id number and is marked as Unique in the schema definition.
As part of a data enrichment process. Universal Containers has a CSV file that contains updated data
for all candidates in the system, the file contains each Candidate's primary id as a data point.
Universal Containers wants to upload this information into Salesforce, while ensuring all data rows
are correctly mapped to a candidate in the system.
Which technique should the developer implement to streamline the data upload?
A. Create a Process Builder on the Candidate_c object to map the records.
B. Create a before Insert trigger to correctly map the records.
C. Update the primaryid__c field definition to mark it as an External Id
D. Upload the CSV into a custom object related to Candidate_c.
51 . A Developer Edition org has five existing accounts. A developer wants to add 10 more accounts
for testing purposes. The following code is executed in the Developer Console using the Execute
Anonymous window:
Account myAccount = new Account (Name = 'MyAccount' ) ;
insert myAccount; Integer x = 1;
List<Account> newAccounts = new List<Account> () ;
do {
Account acet = new Account (Name = *New Account » + x++);
newAccounts.add (acct) ;
} while (x < 10);
How many total accounts will be in the org after this code is executed?
A. 5
в. 6
C. 10
D. 15
52 of 65. What are two considerations for running a flow in debug mode? Choose 2 answers
A. Callouts to external systems are not executed when debugging a flow.
B. DML operations will be rolled back when the debugging ends.
C. Input variables of type record cannot be passed into the flow.
D. Clicking Pause or executing a Pause element closes the flow and ends debugging.
53 of 65. A credit card company needs to implement the functionality for a service
agent to process damaged or stolen credit cards. When the customers call in, the service agent must
gather many pieces of information.
A developer is tasked to implement this functionality. What should the developer use to satisfy this
requirement in the most efficient manner?
A. Screen-based flow
B. Approval process
C. Apex trigger
D. Lightning Component
54 . A custom Visualforce controller calls the ApexPages, addMessage () method, but no messages
are rendering on the page. Which component should be added to the Visualforce page to display the
message?
A. Capeximessage for="info"/>
В. aрех: pageMessages />
C «apex:pageMessage severity-"into* />
D. «apex:facet name-"messages" />
55. Since Aura application events follow the traditional publish-subscribe model, which method is
used to fire an event?
A. fire()
B. aegisterEvent ()
C. fireBrent ()
D. emit()
56 . A developer must troubleshoot to pinpoint the causes of performance issues when a custom
page loads in their org. Which tool should the developer use to troubleshoot query performance?
A. Setup Menu
B. AppExchange
C. Visual Studio Code IDE
D. Developer Console
59 . Universal Containers wants to automatically assign new cases to the appropriate support
representative based on the case origin. They have created a custom field on the Case object to store
the support representative name.
What is the best solution to assign the case to the appropriate support representative?
A . use a trigger on the Case object.
B. Use a formula field on the Case object.
C. Use a validation rule on the Case object.
D. Use an Assignment Flow element.
60 . What are three ways for a developer to execute tests in an org? >> Choose 3 answers
A. Bulk API
B. Salesforce DX
C. Tooling API
D. Setup Menu
E. Metadata API
61 . When importing and exporting data into Salesforce, which two statements are true?
Choose 2 answers
A. Bulk API can be used to bypass the storage limits when importing large data volumes in
development environments.
B. Data import wizard is an application that is installed on your computer.
C. Bulk API can be used to import large data volumes in development environments without
bypassing the storage limits.
D. Developer and Developer Pro sandboxes have different storage limits.
63 . A Developer wants to get access to the standard price book in the org while writing a test class
that covers an OpportunityLineItem trigger.
Which method allows access to the price book?
A. Use Test.getStandardPricebookId() to get the standard price book ID.
B. Use @IsTest(SeeAllData=true) and delete the existing standard price book.
C. Use Test.loadData() and a Static Resource to load a standard price book.
D. Use @TestVisible to allow the test method to see the standard price book.
64 . 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.
B.
C.
D.
65 . 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. Custom objects and fields
B. Triggers
C. Roll-up summaries
D. Relationships
E. Flows
SET 6
1. Given the following Anonymous block: List<Case>
casesToUpdate = new List<Case>();
for(Case thiscase : [SELECT Id, Status FROM Case LIMIT 50000]){ thisCase.Status
= 'Working’:
casesToUpdate.add(thisCase);
} try{
Database.update(casesToUpdate, false):
}catch (Exception e) (
System.debug(e.getMessage());
}
What should a developer consider for an environment that has over 10,000 Case
records?
A. The try-catch block will handle any DML exceptions thrown.
B. The try-catch block will handle exceptions thrown by governor limits.
C. The transaction will fall due to exceeding the governor limit.
D. The transaction will succeed and changes will be committed.
2. A developer wrote Apex code that calls out to an external system using REST API.
How should a developer write the test to prove the code is working as intended? A.
Write a class that extends WebserviceMock.
B. Write a class that implements HTTPCalloutMoak.
C. Write a class that extends HTTPCalloutMoak.
D. Write a class that implements WebServiceMock.
3. How can a developer check the test coverage of autolaunched Flows before
deploying them in a change set?
5. Universal Containers has developed custom Apex code and Lightning Components
in a Sandbox environment. They need to deploy the code and associated
configurations to the Production environment.
What is the recommended process for deploying the code and configurations to
Production?
A. Use Saleforce CLI to deploy the Apex code and Lightning Components:
B. Use the Force.com IDF to deploy the Apex code and Lightning Components,
C. Lise a change set to deploy the Apex code and Lightning Components.
D. Use the Ant Migration Tool to deplay the Apex coda and Lightning Components
7. 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. 2
B. 3
C. 4
D. 1
10. A developer created a custom order management app that uses an Apex class.
The order is represented by an Order object and an OrderItem object that has a
master-detail relationship to Order. During order processing, an order may be split
into multiple orders.
What should a developer do to allow their code to move some existing OrderItem
records to a new Order record?
A. Change the master-detail relationship to an external lookup relationship.
B. Select the Allow reparenting option on the master-detail relationship.
C. Add without sharing to the Apex class declaration.
D. Create a function object between Orderitem and Order.
11. A developer is creating an app that contains multiple Lightning web components.
One of the child components is used for navigation purposes. When a user clicks a
button called Next in the child component, the parent component must be alerted so
it can navigate to the next page.
How should this be accomplished? A.
Create a custom event.
B. Call a method in the Apex controller.
C. Update a property on the parent.
D. Fire a notification
13. A developer has a Visualforce page and custom controller to save Account
records. The developer wants to display any validation rule violations to the user.
How can the developer make sure that validation rule violations are displayed? A.
Include<apex: messages> on the Visualforce page.
B. Perform the DML using the Database.upsert() method.
C. Use a try/catch with a custom exception class.
D. Add custom controller attributes to display the message.
14. Universal Containers wants to ensure that all new leads created in the system
have a valid email address. They have already created a validation rule to enforce this
requirement, but want to add an additional layer of validation using Apex code.
What would be the best solution for this requirement?
A. Use a trigger on the Lead object to validate the email address and display an error
message if it is invalid.
B. Create a time-based workflow rule that updates the email address if it is invalid.
C. Submit a REST API Callout with a JSON payload and validate the fields on a third
party system.
D. Use a Process Builder to validate the email address and display an error message it
it is invalid.
16. Universal Containers uses Service Cloud with a custom field, Stage_c, on the Case
object.
Management wants to send a follow-up email reminder to the Case Owner 6 hours
after the Stage_c field is set to "Waiting on Customer". The Salesforce Administrator
wants to ensure the solution used is bulk safe.
Which automation tool should a developer recommend to meet these business
requirements?
A. Entitlement Process
B. Record-Triggered Flow with a Scheduled Path
C. Scheduled Flow
D. Einstein Next Best Action
17. A developer is working on a project to import data from an external system into
Salesforce. The data contains sensitive information that should not be visible to all
users in Salesforce.
What should the developer do to ensure that the data is secure?
A. Use the Data Import Wizard to import the data and set up field-level security
to restrict access to sensitive fields.
B. Use the Salesforce CLI to import the data and set up user permissions to
restrict access to sensitive data.
C. Use a third-party tool to encrypt the sensitive data before imparting it into
Salesforce.
D. Use the Apex Data Loader to import the data and write Apex code to handle
security and access control.
20. An org has an existing flow that edits an Opportunity with an Update Records
element. A developer must update the flow to also create a Contact and store the
created Contact's ID on the Opportunity.
Which update must the developer make in the flow?
A Add a new Update Records clement.
B. Add a new Roll Back Records clement.
C. Add a new Get Records element.
D. Add a new Create Records element.
}
The developer creates a test class with a test method that calls
myclass.myStaricMethod directly, resulting in 81% overall code coverage.
What happens when the developer tries to deploy the trigger and two classes to
production, assuming no other code exists?
A. The deployment passes because the apex code has the required >75% code
coverage.
B. The deployment fails because no assertions were made in the test method.
C. The deployment fails because the apex trigger has no code coverage.
D. The deployment passes because both classes and the trigger were included in the
deployment.
22. In the Lightning UI, where should a developer look to find information about a
Paused Flow Interview?
A. In the Paused Interviews section of the Apex lex Queue
B. In the system debug log by filtering on Paused Flow Interview
C. On the Paused and failed Flow Interviews page under Setup Process Automation
D. On the Paused Flow Interviews related list for a given record.
23. A Primaryid_c custom field exists on the Candidate_c custom object. The field is
used to store each candidate's id number and is marked as Unique in the schema
definition.
As part of a data enrichment process, Universal Containers has a CSV file that
contains updated data for all candidates in the system. The file contains each
Candidate's primary id as a data point. Universal Containers wants to upload this
information into Salesforce, while ensuring all data rows are correctly mapped to a
candidate in the system.
Which technique should the developer implement to streamline the data upload?
A Upload the CSV into a custom object related to Candidate_c. B.
Create a before insert trigger to correctly map the reconds.
C. Create a before save now to correctly map the records.
D. Update the Primaryid_c held definition to mark it as an External Id.
27. What should a developer use to script the deployment and unit test execution as
part of continuous Integration?
A. Developer Console
B. Execute Anonymous
C. Salesforce CLI
D. VS Code
28. A developer needs to have records with specific field values in order to test a new
Apex class.
What should the developer do to ensure the data is available to the test? A.
Use Test.loadData() and reference a JSON file In Documents.
B. Use SOQL to query the org for the required data
C. USE Anonymous Apex to create the required data
D. Use Test.loadData() and reference a CSV the in a static resource.
29. A developer created these three Rollup Summary fields in the custom object,
Project_c :
Total_Timesheets_c
Total_Approved_Timesheets_c
Total Rojected Timesheet_c
The developer is asked to create a new field that shows the ratio between rejected
and approved timesheets for a given project.
Which should the developer use to implement the business requirement in order to
minimize maintenance overhead?
A. Roll-up summary field
B. Formula field
C. Apex trigger
D. Record-triggered flow