1
1
1
Q1. A developer Is writing tests for a class and needs to insert records to validate functionality.
Which annotation method should be used to create records for every method in the test class?
A. @TestSetup
B. @isTest (SeeAllData=true)
C. @StartTest
D. @Pretest
Q2. Universal Containers wants to back up all of the data and attachments in its Salesforce org once
a month. Which approach should a developer use to meet this requirement?
A. Schedule a report.
B. Define a Data Export scheduled job.
C. Create a Schedulable Apex class.
D. Use the Data Loader command line.
Q3. Which two statements accurately represent the MVC framework implementation in Salesforce?
Choose 2 answers .
A. Records created or updated by triggers represent the Model (M) part of the MVC
framework.
B. Validation rules enforce business rules and represent the Controller (C) part of the MVC
framework.
C. Standard and Custom objects used in the app schema represent the View (V) part of the
MVC framework.
D. Lightning component HTML files represent the Model (M) part of the MVC framework.
Q4. Universal Containers has large number of custom applications that were built using a third-party
JavaScript framework and exposed using Visualforce pages. The Company wants to update these
applications to apply styling that resembles the look and feel of Lightning Experience. What should
the developer do to fulfill the business request in the quickest and most effective manner?
A. Incorporate the Salesforce Lightning Design System CSS stylesheet into the JavaScript
applications.
B. Enable Available for Lightning Experience, Lightning Communities, and the mobile app on
Visualforce pages used by the custom application.
C. Set the attribute enableLightning to true in the definition.
D. Rewrite all Visualforce pages as Lightning components.
Q5. Which process automation should be used to send an outbound message without using Apex
code?
A. Workflow Rule
B. Process Builder
C. Flow Builder
D. Strategy Builder
Q7. What are two benefits of using declarative customizations over code? Choose 2 answers
Q8. 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 can be declared as Public or Global.
D. A method using the @InvocableMethod annotation must define a return value.
E. A method using the @InvocableMethod annotation must be declared as static.
A. <apex:page contentType="pdf">
B. <apex:page contentType="application/pdf">
C. <apex:page rendersAs="application/pdf">
D. <apex:page renderAs="pdf">
Q10. What should a developer use to obtain the Id and Name of all the Leads. Accounts, and
Contacts that hove the company name "Universal Containers"?
A. SELECT lead(id, name). account(id, name), contact(id, name) FROM Lead, Account, Contact
WHERE Name = "universal Containers'
B. FIND 'Universal Containers' IN Name Fields RETURNING lead(id, name), account(id, name),
contact(id, name)
C. SELECT Lead.id., Lead.Name, Account.Id, Account.Name, Contact.id, Contact.Name FROM
Lead, Account, Contact WHERE CompanvName = 'Universal Containers'
D. FIND Universal Containers' IN CompanyName Fietds RETURNING lead{ld. name), account(id,
name), contact(id, name)
Q11. How many accounts will be inserted by the following block of code?
A. 0
B. 150
C. 500
D. 100
Q12. A developer created a new trigger that inserts a Task when a new Lead is created. After
deploying to production, an outside integration is periodically reporting errors.
Which change should the developer make to ensure the integration is not affected with minimal
impact to business logic?
Boolean isOK;
Integer x;
X=1;
X=2;
X=3;
} else {
X = 4;
A. 3
B. 4
C. 1
D. 2
Q14. While working in a sandbox, an Apex test fails when run in the Test Framework. However,
running the Apex test 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?
Q15. 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 Anonymous Apex to create the required data.
B. Use Test.loadData () and reference a JSON file in Documents.
C. Use Test.loadData () and reference a CSV file in a static resource.
D. Use SOQL to query the org for the required data.
Q16. Which two statements are true about using the @testSetup annotation in an Apex test class?
Choose two answers
A. A method defined with the @testSetup annotation executes once for each test method in
the test class and counts towards system limits.
B. In a testsetup method, test data is inserted once and is made available for all test methods
in the test class.
C. The @testSetup annotation is not supported when the @isTest(SeeAllData=True)
annotation is used.
D. Records created in the test setup method cannot be updated in individual test methods.
Q17. A developer must create a Lightning component that allows user 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?
</lightning-input>
</lightning-formatted-number>
C. <lightning-input-currency value="Salary__c">
</lightning-input-currency>
D. <ligthning-input-field field-name="Salary__c">
</lightning-input-field>
Q18. Which three steps allow a custom Scalable Vector Graphic to be included in a Lightning web
component?
Choose 3 answers
A. CalloutException
B. LimitException
C. A Custom Exception
D. NoAccessException
Q20. Given the following trigger implementation:
The developer receives deployment errors every time a deployment is attempted from Sandbox to
Production.
Q21. Universal Container use a simple order Management app. On the Order Lines, the order line
total is calculated by multiplying the item price with the quantity ordered. There is a Master-Detail
relationship between the Order and the Order Lines object.
What is the practice to get the sum of all order line totals on the order header?
Q22. 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 orgs
B. Developer sandboxes
C. Full Copy sandboxes
D. Scratch orgs
Q23. Since Aura application events follow the traditional publish-subscribe model, which method is
used to fire an event?
A. fire()
B. emit()
C. registerEvent()
D. fireEvent()
Q24. A developer has identified a method in an Apex class that performs resource intensive actions
in memory by iterating over the result set of a SOQL statement on the account. The method also
performs a DML statement to save the changes to the database. Which two techniques should the
developer implement as a best practice to ensure transaction control and avoid exceeding governor
limits?
Choose 2 answers
Q25. What is the value of the Trigger.old context variable in a Before Insert trigger?
A. A list of newly created sObjects without IDs
B. null
C. An empty list of sObjects
D. Undefined
Q26. A developer must troubleshoot to pin point the causes of performance issues when a custom
page loads in their org. Which tool should the developer use to troubleshoot?
A. AppExchange
B. Developer Console
C. Visual Studio Code IDE
D. Setup Menu
Q27. Instead of sending emails to support personnel directly from Salesforce from the finish method
of a batch process, Universal Containers wants to notify an external system in the event that an
unhandled exception occurs.
A. Publish the error event using the Eventbus.publish() method and have the external system
subscribe to the event using CometD.
B. Publish the error event using the addError() method and write a trigger to subscribe to the
event and notify the external system.
C. Since this only involves sending emails, no publishing is necessary. Have the external system
subscribe to the event channel.
D. Publish the error event using the addError() method and have the external system subscribe
to the event using CometD.
Q28. How should a custom user interface be provided when a user edits an Account in Lightning
Experience?
Q29. How can a developer check the test coverage of active Process Builders and Flows before
deploying them in a Change Set?
A. Use SOQL and the Tooling API.
B. Use the ApexTestResult class.
C. Use the Code Coverage Setup page.
D. Use the Flow Properties page.
Q30. A Lightning component has a wired property, searchResults, that stores a list of Opportunities.
Which definition of the Apex method, to which the searchReaults property is wired, should be used?
A. @AuraEnabIed(cacheable=false)
public static List<Opportunity> search(String term) { /*implementation”/ }
B. @AuraEnabIed(cacheable=true)
public static List<Opportunity> search(String term) { /*implementation*/ }
C. @AuraEnabIed(cacheable=false)
public List<Opportunity> search(String term) { /*implementation”/ }
D. @AuraEnabIed(cacheable=true)
public List<Opportunity> search(String term) { /*implementation”/ }
Q31. The values ‘High’, ‘Medium’ and ‘low’ are identified as common values for multiple picklists
across different objects.
What is an approach a developer can take to streamline maintenance of the picklists and their
values, while also restricting the values to the ones mentioned above?
A. Create the Picklist on each object and select “Restrict picklist to the values defined in the
value set”.
B. Create the Picklist on each object and use a Global Picklist Value Set containing the values.
C. Create the Picklist on each object as a required field and select “Display values
alphabetically, not in the order entered”
D. Create the Picklist on each object and add a validation rule to ensure data integrity
Q32. Universal Containers recently transitioned from Classic to Lightning Experience. One of its
business processes requires certain values from the Opportunity object to be sent via an HTTP REST
callout to its external order management system based on a user-initiated action on the Opportunity
detail page. Example values are as follows:
• Name
• Amount
• Account
Which two methods should the developer implement to fulfill the business requirement?
Choose 2 answers
A. 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.
B. Create a Lightning component that performs the HTTP REST callout, and use a Lightning
Action to expose the component on the Opportunity detail page.
C. Create an after update trigger on the Opportunity object that calls a helper method using
@Future(Callout=true) to perform the HTTP REST callout.
D. Create a Visualforce page that performs the HTTP REST callout, and use a Visualforce quick
action to expose the component on the Opportunity detail page.
Q33. Which statement generates a list of Leads and Contacts that have a field with the phrase
‘ACME’?
A. List<List <sCbject>> searchList = [ SELECT Name, ID FROM Contact, Lead WHERE Name like
‘$ACME$’];
B. List <sObject> searchList= [FIND "*ACME* IN ALL FIELDS RETURNING Contact, Lead];
C. Map <sObject> searchList = [FIND “*ACME*” IN ALL FIELDS RETURNING Contact, Lead];
D. List<List <s0bject>> searchList= [FIND "*ACME* IN ALL FIELDS RETURNING Contact, Lead];
/*implementation*/ }
Q35. A Next Best Action strategy uses an Enchance 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 static ListRecommendation getLevel(List<ContactWrapper> input)
{ /*implementation*/ }
C. @InvocableMethod
global Recommendation getLevel (ContactWrapper input)
{ /*implementation*/ }
D. @InvocableMethod
global static List<List<Recommendation>> getLevel(List<ContactWrapper> input)
{ /*implementation*/ }
Q36. .In the Lightning UI, where should a developer look to find information about a Paused Flow
Interview?
Q37. Refer to the following code snippet for an environment has more than 200 Accounts belonging
to the Technology’ industry:
for (Account thisAccount : [SELECT Id, Industry FROM Account LIMIT 150]) {
if(thisAccount.Industry == ‘Technology’) {
thisAccount.Is_Tech_c = true;
}
update thisAccount;
}
When the code execution, which two events occur as a result of the Apex transaction? Choose 2
answers
A. The Apex transaction succeeds regardless of any uncaught exception and all processed
accounts are updated.
B. If executed in an asynchronous context, the apex transaction is likely to fall by exceeding the
DML governor limit
C. If executed In a synchronous context, the apex transaction is likely to fall by exceeding the
DHL governor limit.
D. The Apex transaction fails with the following message. "SObject row was retrieved via
SOQL without querying the requested field Account.Is.Tech__c”.
Q38. Which three code lines are required to create a lightning component on a Visualforce page?
Choose 3 answers
A. $Lightning.createComponent
B. $Lightning.useComponent
C. <apex:includeLightning/>
D. $Lightning,use
E. <apex:slds/>
Choose 2 answers .
A. Changing a user’s default division when the transfer division option is checked
B. Renaming or replacing a picklist entry
C. Updates to Feed Items
D. Cascading delete operations
Q42. Which two events need to happen when deploying to a production org?
Choose 2 answers.
A. All Apex code must have at least 75% test coverage.
B. All Visual Flows must have at least 1% test coverage.
C. All triggers must have some test coverage.
D. All Process Builder Processes must have at least 1% test coverage.
Q43. Which three statements are true regarding custom exceptions in Apex?
Choose 3 answers
Q44. 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?
Q45. A developer writes a trigger on the Account object on the before insert/update event that
increments a count field. A workflow rule also increments the count field every time that an Account
is created or updated. The field update in the workflow rule is configured to not re-evaluate
workflow rules.
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. 1
B. 4
C. 2
D. 3
insert acct;
Q48. In the following example, which sharing context will myMethod execute when it is invoked?
Q49. A developer must create a DrawList class that provides capabilities defined in the Sortable and
Drawable interfaces.
Q50. Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a
Master-Detail relationship with the standard Account object. Based on some internal discussion, the
UC administrator tried to change the Master-Detail relationship to a Lookup relationship but was not
able to do so. What is a possible reason that this change was not permitted?
Q51. 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?
A. Query the Profile where the ID equals userInfo.getProfileID() and then use the
profile.Opportunity.getDefaultRecordType() method.
B. Use the Schema.userInfo.Opportunity.getDefaultRecordType() method.
C. Create the opportunity and check the opportunity.recordType before inserting, which will
have the record ID of the current user's default record type
D. Use Opportunity.SObjectType.getDescribe().getRecordTypeInfos() to get a list of record
types, and iterate through them until isdefaultRecordTypeMapping() is true.
Q52. What should a developer do to check the code coverage of a class after running all tests?
A. Select and run the class on the Apex Test Execution page in the Developer Console.
B. View the Code Coverage column in the 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. View the Class Test Percentage tab on the Apex Class list view in Salesforce Setup.
Q53. 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. Schema.sObjectType.Account.isDeletable ()
B. accountRec.isDeletable()
C. Account.isDeletable ()
D. accountRec.sObjectType.isDeletable ()
Q55. A developer created these three Rollup Summary fields in the custom object, Project__c.:
Total_Timesheets__c
Total_Approved_Timesheets__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.
What are two benefits of choosing a formula field instead of an Apex trigger to fulfill the request?
Choose 2 answers
A. A test class that validates the formula field is needed for deployment.
B. Using a formula field reduces maintenance overhead.
C. A formula field will calculate the value retroactively for existing records.
D. A formula field will trigger existing automation when deployed.
Q56. 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.
Q57. A developer wants to invoke an outbound message when a record meets a specific criterion.
Which three features satisfy this use case?
Choose 3 answers
A. Process Builder can be used to check the record criteria and send an outbound message
without Apex code.
B. Next Best Action can be used to check the record criteria and send an outbound message.
C. Flow Builder can be used to check the record criteria and send an outbound message
without additional code.
D. Approval Process has the capability to check the record criteria and send an outbound
message without Apex code.
Q58. Universal Containers hires a developer to build a custom search page to help users 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 SOQL and SQSL?
Choose 2 answers
Q59. 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 UserInfo Apex class to filter all SOQL queries to returned records owned by the
logged-in user
B. Use the schema describe calls to determine if the logged-in user has access to the Account
object.
C. Use the with sharing keyword on the class declaration
D. Use the without sharing keyword on the class declaration
Q60. Which two are best practices when it comes to Aura component and application event
handling? Choose two answers
A. Use component events to communicate actions that should be handled at the application
level.
B. Reuse the event logic in a component bundle, by putting the logic in the helper.
C. Try to use application events as opposed to component events.
D. Handle low-level events in the event handler and re-fire them as higher-level events.
Q61. A developer is asked to create a Visualforce page that displays some Account fields as well as
fields configured on the page layout for related Contacts.
Q62. Which Salesforce feature allows a developer to see when a user last logged in to Salesforce if
real-time notification is not required?
A. Calendar Events
B. Asynchronous Data Capture Events
C. Event Monitoring Log
D. Developer Log