0% found this document useful (0 votes)
83 views

Prep

The developer should create after insert and after update triggers to update an unrelated object when a record gets saved. When importing data into Salesforce, Bulk API can be used to import large data volumes in development environments without bypassing storage limits, and developer and developer pro sandboxes have different storage limits. A trigger will fire 2 times if a new account is inserted - once for the after insert trigger and once for the workflow rule update.

Uploaded by

jelena.saveljic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views

Prep

The developer should create after insert and after update triggers to update an unrelated object when a record gets saved. When importing data into Salesforce, Bulk API can be used to import large data volumes in development environments without bypassing storage limits, and developer and developer pro sandboxes have different storage limits. A trigger will fire 2 times if a new account is inserted - once for the after insert trigger and once for the workflow rule update.

Uploaded by

jelena.saveljic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 28

A developer needs to update an unrelated object when a record gets saved.

Which two trigger


types should the developer create?

A After insert
B After update
C Before insert
D Before update

When importing and exporting data into Salesforce, which two statements are true? Choose 2 answers
A . Bulk API can be used to import large data volumes in development environments without bypassing
the storage limits.
B . Bulk API can be used to bypass the storage limits when importing large data volumes in development
environments.
C . Developer and Developer Pro sandboxes have different storage limits.
D . Data import wizard is a client application provided by Salesforce.

A developer writes a trigger on the Account object on the after insert and after update events. A
workflow rule modifies a field every time an Account is created or updated. How many times trigger will
fire if a new Account is inserted?
A. 4
B. 1
C. 2
D. 8

237. A developer must provide a custom user interface when users edit a Contact. Users must be able to
use the interface in Salesforce Classic and Lightning Experience.
What should the developer do to provide the custom user interface?
A. Override the Contact’s Edit button with a Visualforce page in Salesforce Classic and a
Lightning component in Lightning Experience.
B. Override the Contact’s Edit button with a Visualforce page in Salesforce Classic and a Lightning
page in Lightning Experience.
C. Override the Contact’s Edit button with a Lightning component in Salesforce Classic and a
Lightning component in Lightning Experience.
D. Override the Contact’s Edit button with a Lightning page in Salesforce Classic and a Visualforce
page in Lightning Experience.
175. Which three operations affect the number of times a trigger can fire?
(Choose 3 answers)
A. Process Flows
B. Workflow Rules
C. Criteria-based Sharing calculations
D. Email messages
E. Roll-Up Summary fields

247. A developer identifies the following triggers on the Expense__c object: deteleExpense,
applyDefaultsToExpense, validateExpenseUpdate; The triggers process before delete, before insert, and
before update events respectively. Which two techniques should the developer implement to ensure
trigger best practices are followed? (Choose 2)
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.

251. 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. Account.isDeletable()
C. accountRec.isDeletable()
D. accountRec.sObjectType.isDeletable()

A workflow updates the value of a custom field for an existing Account.


How can a developer access the updated custom field value from a trigger?
A. By writing, a Before Update trigger and accessing the field value from Trigger.new
B. By writing a Before Insert trigger and accessing the field value from Trigger.new
C. By writing an After Insert trigger and accessing the field value from Trigger.old
D. By writing an After Update trigger and accessing the field value from Trigger.old

191. 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 picklist and their values,
while also restricting the values to the ones mentioned above?
A. Create the Picklist on each object and use a Global Picklist Value Set containing the Values.
B. Create the Picklist on each object as a required field and select 'Display values alphabetically, not
in the order entered'.
C. Create the Picklist on each object and select 'Restrict picklist to the values defined in the value set'.
D. Create the Picklist on each and add a validation rule to ensure data integrity.
192. An Apex method, getAccounts, that returns a List of Accounts given a search Term, is available for
Lightning Web components to use.
What is the correct definition of a Lighting Web component property that uses the getAccounts method?
A. @AuraEnabled(getAccounts, ‘$searchTerm’)
accountList;
B. @wire(getAccounts, ‘$searchTerm’)
accountList;
C. @AuraEnabled(getAccounts, {searchTerm: ‘$searchTerm’})
accountList;
D. @wire(getAccounts, {searchTerm: ‘$searchTerm’})
accountList;

189. Which code in a Visualforce page and/or controller might present a security vulnerability?
A. <apex:outputField value=”{!ctrl.userInput}”/>
B. <apex:outputText escape=”false” value=”{!$CurrentPage.parameters.userInput}”/>
C. <apex:outputText value=”{!$CurrentPage.parameters...}”
D. <apex:outputText escape="false" value="{!$ctrl.us}" />

355. Which two are phases in the Salesforce Application Event propagation framework? (Choose two.)
A. Bubble
B. Default
C. Control
D. Emit
242. Universal Containers (UC) decided it will not send emails to support personnel directly from
Salesforce in the event that an unhandled exception occurs. Instead, UC wants an external system to be
notified of the error.
(UC wants to notify an external system, in the event that unhandled exception occurs, by publishing a
custom event using Apex.)
What is the appropriate publish/subscribe logic to meet these requirements?
A. Publish the error event using the addError() method and write a trigger to subscribe to the event
and notify the external system.
B. Publish the error event using the Eventbus.publish() method and have the external system
subscribe to the event using CometD.
C. Have the external system subscribe to the BatchApexError event, no publishing is necessary.
D. Publish the error event using the addError() method and have the external system subscribe to
the event using CometD.

224. 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. @StartTest
B. @TestSetup
C. @PreTest
D. @isTest(SeeAllData=true)
198. How should a custom user interface be provided when a user edits an Account in Lightning
Experience?
A. Override the Account's Edit button with Lightning page.
B. Override the Account's Edit button with Lightning Flow
C. Override the Account's Edit button with Lightning component.
D. Override the Account's Edit button with Lightning Action

A developer receives an error when trying to call a global server-side method using the @remoteAction
decorator. How can the developer resolve the error?
A. Decorate the server-side method with (static=false)
B. Add static to the server-side method signature.
C. Decorate the server-side method with (static=true).
D. Change the function signature to be private static.

Options 1 and 2.

What is an example of polymorphic lookup field in salesforce?


The WhatID on the standard Event object.

184. What are three considerations when using the @InvocableMethod annotation?
Choose 3 answers.
A. A method using the @InvocableMethod annotation must define a return value.
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 can be declared as Public or Global.
E. Only one method using the @InvocableMethod annotation can be defined per Apex class.
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

176. Which process automation should be used to send an outbound message without using code? (1)
A. Process Builder
B. Workflow rule
C. Flow Builder
D. Strategy builder

208. When using SalesforceDX, what does a developer need to enable to create and manage scratch orgs?
A. Dev Hub
B. Sandbox
C. Producion
D. Environment Hub

248. What is a fundamental difference between a Master-Detail relationship and a Lookup relationship?
A. In a Master-Detail relationship, when a record of a master object is deleted, the detail records are
not deleted.
B. In a Lookup relationship when the parent record is deleted, the child records are always deleted.
C. A Master-Detail relationship detail record inherits the sharing and security of its master
record.
D. In a Lookup relationship, the field value is mandatory.

205. What will be the output in the debug log in the event of a QueryException during a call..?
A. Querying Accounts. Query Exception.
B. Querying Accounts. Custom Exception.
C. Querying Accounts. Custom Exception. Done.
D. Querying Accounts. Query Exception. Done.

235. Given the following Apex statement:


Account myAccount = [SELECT Id, Name FROM Account];
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. The first Account returned is assigned to myAccount.
C. The query fails and an error is written to the debug log.
D. An unhandled exception is thrown and the code terminates.

Which two statements are true about Getter and Setter methods as they relate to Visualforce? Choose 2:
A. Getter methods can pass a value from a controller to a page.
B. There is no guarantee for the order in which Getter and Setter methods are executed.
C. Setter methods always have to be declared global.
D. Setter method can pass a value from a controller to a page.

46. Which exception type cannot be caught ?


A. A custom Exception
B. LimitException
C. CalloutException
D. NoAccessException

What is the value of the trigger.old context variable in a before insert trigger?
A. A list of newly created objects without IDs.
B. Undefined
C. An empty List of sObjects
D. null

213. What does the Lightning Component framework provide to developers?


A. Support for Classic and Lightning UIs
B. Templates to create custom components
C. Extended governor limits for applications
D. Prebuilt components that can be reused

109. 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 text searches.

Which two characteristics are true for Aura component events?

A. Calling event, stopPropagation ( ) may or may not stop the event propagation based of the
current propagation phase.
B. If a container component needs to handle a component event, add a handleFacets='' attribute to
Its handler.
C. Only parent components that create subcomponents (either in their markup or programmatically)
can handle events.
D. The event propagates to every owner In the containment hierarchy.

Universal Containers wants to assess the advantages of declarative development versus programmatic
customization for specific use cases in its Salesforce implementation.
What are two characteristics of declarative development over programmatic customization? Choose 2
answers
A . Declarative development has higher design limits and query limits.
B . Declarative development can be done using the Setup UI.
C . Declarative development does not require Apex test classes.
D . Declarative code logic does not require maintenance or review.

21. What should be used to create scratch orgs?


A. Salesforce CLI
B. Developer Console
C. Workbench
D. Sandbox refresh

190. If apex code executes inside the execute() method of an Apex class when implementing the
Batchable interface, which statements are true regarding governor limits?
Choose 2 answers
A. The Apex governor limits cannot be exceeded due to the asynchronous nature of the transaction.
B. The Apex governor limits are relaxed while calling the constructor of the Apex class.
C. The apex governor limits are reset for each iteration of the execute() method.
D. The Apex governor limits might be higher due to the asynchronous nature of the
transaction.

178. Which Salesforce feature allows a developer to see when a user last logged in?
A. Event Monitoring Log
B. Developer Log
C. Asynchronous Data Capture Events
D. Calendar Events
Which three statements are accurate about debug logs? Choose 3 answers:
A. Amount of information logged in the debug log can be controlled programmatically.
B. Debug Log levels are cumulative, where FINE log level includes all events logged at the
DEBUG, INFO, WARN, and ERROR levels.
C. Amount of information logged in the debug log can be controlled by the log levels.
D. Permission is needed.
E. Permission is needed.

45. A developer created a Visualforce page and custom controller to display the account type field as
shown below. Custom controller code:
public class customCtrlr{
private Account theAccount;
public String actType;
public customCtrlr() {
theAccount = [SELECT Id, Type FROM Account
WHERE Id:apexPages.currentPage().getParameters().get('id')];
actType = theAccount.Type;
}
}
Visualforce page snippet:
The Account Type is {!actType}
The value of the account type field is not being displayed correctly on the page. Assuming the custom
controller is property 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. Convert theAccount.Type to a String.
D. Add with sharing to the custom controller.

180. A Lightning component has a wired property, searchResults, that stores a list of Opportunities.
Which definition of the Apex method, to which the searchResults property is wired, should be used?
A. @AuraEnabled(cacheable=true)
public static List<Opportunity> search(String term) { /* implementation*/ }
B. @AuraEnabled(cacheable=false)
public static List<Opportunity> search(String term) { /*implementation*/ }
C. @AuraEnabled(cacheable=false)
public List<Opportunity> search(String term) { /*implementation*/ }
D. @AuraEnabled(cacheable=true)
public List<Opportunity> search(String term) { /*implementation*/ }
Which two statements accurately represent the MVC framework implementation in salesforce?
A. Lightning component HTML files represent the Model part of the MVC.
B. Validation rules enforce business rules and represent the Controller part of the MVC.
C. Standard and Custom objects used in the app schema represent the View part of the MVC.
D. Records created or updated by triggers represent the Model part of the MVC.

A developer needs to confirm that an Account (or Contact) trigger is working correctly without changing
the organization's data. What would the developer do to test the Account trigger?
A. Use the Test menu on the developer Console to run all test classes for the Account (Cont)
trigger.
B. Use the Open Execute Anonymous feature on the Developer Console to run an 'insert Account' DML
statement.
C. Use Deploy from the Force.com IDE to deploy an 'insert Account' Apex class.
D. Use the New button on the Salesforce Accounts Tab to create a new Account record.

A developer needs to implement the functionality for a service agent to gather multiple pieces of
information from a customer in order to send a replacement credit card.
Which automation tool meets these requirements?
A. Flow Builder
B. Process Builder
C. Lightning Component
D. Approval Process

Which two types of process automation can be used to calculate the shipping cost for an Order when the
Order is placed and apply a percentage of the shipping cost of some of the related Order Products? Choose 2
answers
A. Workflow Rule
B. Approval Process
C. Process Builder
D. Flow Builder

99. A developer wants to mark each Account in a List<Account> as either Active or Inactive based on the
LastModified field value being more than 90 days.
Which Apex technique should the developer use?
A. A for loop, with a switch statement inside
B. An If/else statement, with a for loop inside
C. A Switch statement, with a for loop inside
D. A for loop, with an if/else statement inside

177. Which aspect of Apex programming is limited due to multitenancy?


A. The number of methods in an Apex class
B. The number of records processed in a loop
C. The number of records returned from database queries
D. The number of active Apex classes
What are two ways that a controller and extension can be specified for a custom object named Notice on
a Visualforce page? Choose 2 answers
A . apex:page=Account extends="myControllerExtension"
B . apex:page standardController="Notice__c" extensions="myControllerExtension”
C . apex:page controllers="Account, myControllerExtension”
D . apex:page controller="Notice__c” extensions="myControllerExtension"

211. Universal Containers recently transitioned from Classic to Lightning Experience. One of its business
processes requires certain value from the opportunity object to be sent via HTTP RESTcallout 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 2answers)
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 Visualforce page that performs the HTTP REST callout, and use a Visualforce quick
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 Lightning component that performs the HTTP REST callout, and use a Lightning
Action to expose the component on the Opportunity detail page

Which annotation expose an apex class as a restful web services?


@AuraEnabled
@RestResource
@RemoteAction
@HttpInvocable

227. 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.
12. Which three code lines are required to create a Lightning component on a Visualforce page?
A. $Lightning.createComponent
B. <apex:includeLightning/>
C. $Lightning.use
D. <apex:slds/>
E. $Lightning.useComponent

106. 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. Full Sandbox
B. Developer Sandbox
C. Developer Edition
D. Partner Developer Edition

105. 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. Specifying loading order
C. Loading files from Documents
D. Loading externally hosted scripts
E. Loading scripts In parallel

96. A recursive transaction is limited by a DML statement creating records for these two objects:
1. Accounts
2. Contacts
The Account trigger hits a stack depth of 16.
Which statement is true regarding the outcome of the transaction?
A. The transaction succeeds as long as the Contact trigger stack depth is less than 16.
B. The transaction succeeds and all the changes are committed to the database.
C. The transaction fails only if the Contact trigger stack depth is greater or equal to 16.
D. The transaction fails and all the changes are rolled back.

303. How many Account objects will be inserted with the following code snippet?
For(i=0;i<=200;i++){
Insert
}
A. 0
B. 1
C. 200
D. 201
197. What are two characteristics related to formulas?
Choose 2 answers
A. Formula can reference themselves.
B. Formulas are calculated at runtime and are not stored in the database.
C. Formulas can reference values in related objects.
D. Fields that are used in a formula field can be deleted or edited without the formula.

113. 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. A Update the primaryid__c field definition to mark it as an External Id
C. Upload the CSV into a custom object related to Candidate_c.
D. Create a before Insert trigger to correctly map the records.

249. Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package application. One of
the application modules allows the user to calculate body fat using the Apex class, BodyFat, and its
method, calculateBodyFat(). The product owner wants to ensure this method is accessible by the
consumer of the application when developing customizations outside the ISVs package namespace.
Which approach should a developer take to ensure calculateBodyFat() is accessible outside the package
namespace?
A. Declare the class and method using the public access modifier.
B. Declare the class as global and use the public access modifier on the method.
C. Declare the class as public and use the global access modifier on the method.
D. Declare the class and method using the global access modifier.

207. Application Events follow the traditional publish-subscribe model.


Which method is used to fire an event?
A. fireEvent()
B. event()
C. registerEvent()
D. fire()

196. A developer has the following requirements:


- Calculate the total amount on an Order.
- Calculate the line amount for each Line Item based on quantity selected and price.
- Move Line Items to a different Order if a Line Item is not in stock.
Which relationship implementation supports these requirements?
A. Order has a Lookup field to Line Item and there can be many Line Items per Order.
B. Line Item has a Lookup field to Order and there can be many Line Items per Order.
C. Order has20 a Master-Detail field to Line Item and there can be many Line Items per Order.
D. Line Item has a Master-Detail field to Order and the Master can be re-parented.

182. 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 most efficient way to ensure a value is selected every time a record is saved?
A. Mark the field as Required on the field definition.
B. Set a validation rule to enforce a value is selected.
C. Set "Use the first value in the list as the default value" as True.
D. Mark the field as Required on the object's page layout.

351. 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. Remove the failing 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.

357. A developer wrote Apex code that calls out to an external system.
How should a developer write the test to provide test coverage?
A. Write a class that implements the HTTPCalloutMock interface.
B. Write a class that extends HTTPCalloutMock.
C. Write a class that extends WebserviceMock.
D. Write a class that implements the WebserviceMock interface.

223. 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. List<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 < sObject>> searchList = (SELECT Name, ID FROM Contact, Lead WHERE Name like
‘%ACME%’);
43. Which statement about change set deployments is accurate? (Choose 3 answers)
A. They require a deployment connection.
B. They can be used to transfer Contact records.
C. They use an all or none deployment model. (One-way, single transaction)
D. They can be used to deploy custom settings data.
E. They can be used only between related organizations.
219. A developer must create an Apex class, ContactController, that a Lightning component can use to
search for Contact records. Users of the Lightning component should only be able to search for Contact
records to which they have access.
Which two will restrict the records correctly? (Choose two.)
A. public with sharing class ContactController
B. public inherited sharing class ContactController
C. public class ContactController
D. public without sharing class ContactController

254. A developer must create a ShippingCalculator class that cannot be instantiated and must include a
working default implementation of a calculate method, that subclasses can override.
What is the correct implementation of the ShippingCalculator class?
A.

B.

C.

D.

218. How can a developer check the test coverage of active Process Builders and Flows before deploying
them in a Change Set?
A. Use the Flow Properties page.
B. Use the Code Coverage Setup page.
C. Use the ApexTestResult class.
D. Use SOQL and the Tooling API.
---------------------------------------------------------------------------------------------------------------
42. Manage package can be created in which type of org?
A. Developer sandbox
B. Unlimited edition
C. Developer Edition
D. Partial copy sandbox

200. What is the result of the following code?


Account a = new Account ();
Database.insert(a, false);
A. The record will not be created and an exception will be thrown.
B. The record will be created and a message will be in the debug log.
C. The record will not be created and no error will be reported.
D. The record will be created and no error will be reported.
--------------------------------------------------------------------------------------------------------------------------
Universal Containers wants Opportunities to be locked from editing when reaching the Closed/Won
stage. How should a developer accomplish this?
A. Use a FLow Builder.
B. Use a validation rule.
C. Mark fields as a read-only on the page layout.
D. Use a Process automation settings.

230. Which Salesforce org has a complete duplicate copy of the production org including data and
configuration?
A. Developer Pro Sandbox
B. Partial Copy Sandbox
C. Production
D. Full Sandbox

234. 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 practices are met?

A.

B.

C.

D.
D. keep the dml out of the for loop

115. A developer is implementing an Apex class for a financial system. Within the class, the variables
'creditAmount' and 'debtAmount' 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?
(Choose 2 answers)
A. Use the final keyword and assign its value in the class constructor.
B. Use the static 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 a static initializer.

Which action may cause triggers to fire?

A. Cascading delete operations

B. Renaming or replacing a picklist entry

C. Updates to Feed Items

D. Changing a user's default division when the transfer division option it checked

233. 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. <apex:listButton> tag
B. recordSetVar page attribute
C. custom controller
D. controller extension

A developer wants to invoke on outbound message when a record meets a specific criteria. Which three
features satisfy this use case? Choose 3 answer

A. Approval Process has the capacity to check the record criteria and send an outbound
message without Apex Code
B. Process builder can be used to check the record criteria and send an outbound message
with Apex Code.
C. Workflows can be used to check the record criteria and send an outbound message.
D. Process builder can be used to check the record criteria and send an outbound message without
Apex Code.
E. Flow Builder can be used to check the record criteria and send an outbound message without
Apex Code.

195. A developer has an Apex controller for a Visualforce page that takes an ID as a URL parameter.
How should the developer prevent a cross site scripting vulnerability?
A. String.escapeSingleQuotes(ApexPages.currentPage().getParameters(). get('url_param'))
B. ApexPages.currentPage().getParameters().get('url_param').escapeHtml4()
C. String.ValueOf(ApexPages.currentPage().getParameters().get('url_param'))
D. ApexPages.currentPage().getParameters().get('url_param')

117. In the following example, which sharing context will myMethod execute when it is invoked?
A. Sharing rules Ail be enforced by the instantiating class
B. Sharing rules will not be enforced for the running user.
C. Sharing rules will be inherited from the calling context.
D. Sharing rules Ml be enforced for the running user.

188. 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 CSV file.
B. Use SOQL to query the org for the required data.
C. Use Test.loadData() and reference a static resource.
D. Use Anonymous Apex to create the required data.

240. 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_Application_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’];

204. 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 10000 Case records?
A. The transaction will fail due to exceeding the governor limit.
B. The try/catch block will handle any DML exceptions thrown.
C. The transaction will succeed and changes will be committed.
D. The try/catch block will handle exceptions thrown by governor limits.

110. 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. Scratch orgs
B. Developer sandboxes
C. Full Copy sandboxes
D. Developer orgs

300. 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. Executed In the order they are modified.
C. Triggers are executed alphabetically by trigger name.
D. Triggers are executed in the order they are created.

301. 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 static ListRecommendation getLevel(List<ContactWrapper> input)
{ /*implementation*/ }
B. @InvocableMethod
global STATIC List<List<Recommendation>> getLevel(List<ContactWrapper> input)
{ /*implementation*/ }
C. @InvocableMethod
global List<List<Recommendation>> getLevel(List<ContactWrapper> input)
{ /*implementation*/ }
D. @InvocableMethod
global Recommendation getLevel (ContactWrapper input) { /*implementation*/ }
185. 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.

244. Which two are best practices when it comes to component and application event handling? (Choose
2)
A. Reuse the event logic in a component bundle, by putting the logic in the helper.
B. Use component events to communicate actions that should be handled at the application level.
C. Handle low-level events in the event handler and re-fire them as higher-level events.
D. Try to use application events as opposed to component events.

What are three benefits of using declarative customizations over code? Choose 3 answers

A. Declarative customizations are not subject to governor limits.

B. Declarative customizations generally require less maintenance.

C. Declarative customizations do not require user testing.

D. Declarative customizations will automatically update with each Salesforce release.

E. Declarative customizations cannot generate run time errors.

209. What are two ways a developer can get the status of an enqueued job for a class that implements
the.. (Choose 2 answers)
A. View the Apex Flex Queue
B. View the Apex Status Page
C. View the Apex Jobs Page
D. Query the AsyncApexJob object

203. Which three steps allow a custom SVG to be included in a Lightning web component. (Choose 3
answers)
A. Upload the SVG as a static resource.
B. Reference the getter (variable) in the HTML template.
C. Import the SVG as a content asset file.
D. Import the static resource and provide a getter (variable) for it in JavaScript.
E. Reference the import in the HTML template.

An opportunity needs to have an amount rolled up from a custom object that is not in Master/Detail
relationship. How can this be achieved?
A. Write a trigger on a child object and use a red-black tree sorting to sum the amount for all related
child objects under the Opportunity.
B. Write a trigger on a child object and use an aggregate function to sum the amount for all
related child object under the Opportunity.
C. Write a Process builder that links the custom object to Opportunity.
D. Use the Streaming API to create real time roll up summaries.

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.
How should a developer implement this feature?
A. Build an Account Workflow Rule.
B. Build an Account Assignment Rule.
C. Build an Account custom Trigger. (Flow with Flow Builder)
D. Build an Account Approval Process.

A developer created three Rollup Summary fields: Total_timesheets_c, Total_Approved_timesheet_c and


Total_project_Timesheet_c in the custom object, project _c Now, the developer is tasked with created a
new field to show the ratio between and approved

A. No test methods will be executed during deployment.

B. A formula field will calculate the value retroactively for existing records.

C. A test class that validates the formula field is needed for deployment.

D. Using a formula field reduces maintenance overhead.

33. An org has an existing Visual Flow that creates an Opportunity with an Update records element. A
developer must update the Visual Flow also created a Contact and store the created Contact's ID on the
Opportunity.
A. Add a new Update records element
B. Add a new Create records element.
C. Add a new Quick Action (of type create) element.
D. Add a new Get Records element.

352. Universal Containers (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 add to create the most efficient model that supports the business need?
A. Add a Master-Detail field on the Global Address object to the Account object.
B. Add a Master-Detail field on the Account object to the Global Address object.
C. Add a Lookup field on the Global Address object to the Account object.
D. Add a Lookup field on the Account object to the Global Address object.
Which query should a developer use to obtain the id and name of all the Leads,Accounts, andContacts
that have the company name “universal Containers”?
A. FIND “Universal Containers” IN name fields RETURNING lead(id,name),
account(id,name),Contact(id,name)
B. SELECT Lead.id,Lead.Name,Account.Id, Account.Name,Contact.Id,Contact.Name FROM
Lead,Account,Contact WHERE companyName=’Universal Containers’
C. SELECT lead(id,name),account(id,name),contact(id,name) FROM Lead,Account,Contact WHERE
Name=”Universal Containers”
D. FIND ‘Universal Containers’ IN companyName fields RETURNING lead(id,name),
account(id,name),Contact(id,name)

A Visual Flow 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*/ }

101. How does the Lightning Component framework help developers implement solutions faster?
A. By providing code review standards and processes
B. By providing an Agile process with default steps
C. By providing change history and version control
D. By providing device-awareness for mobile and desktops

111. A developer has to identify a method in en 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
SOQL 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)
A. Use the @ReadOnly annotation to bypass the number of rows returned by a SOQL.
B. Use Partial DHL statements to ensure only valid data is committed.
C. Use the Database.Savepoint method to enforce database Integrity.
D. Use the System.Limit class to monitor the current CPU governor limit consumption.

226. A developer considers the following snippet of code:

Based on this code, what is the value of x?


A. 1
B. 2
C. 3
D. 4

Which action causes a before trigger to fire by default for Accounts?

A. Renaming or replacing picklists.


B. Importing data using Data Loader and the Bulk API
C. Updating addresses using the Mass Address update tool
D. Converting Leads to Contacts accounts.

239. Which three statements are true regarding custom exceptions in Apex?
(Choose three.)
A. A custom exception class must extend the system Exception class.
B. A custom exception class can implement one or many interfaces.
C. A custom exception class cannot contain member variables or methods.
D. A custom exception class name must end with "Exception".
E. A custom exception class can extend other classes besides the Exception class.

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?
A. Deactivate the Trigger before the Integration runs.

B. Use the Database method with allOrNone set to False.

C. Use a Try/Catch block after the insert statement.

D. Remove the Apex Class from the Integration User's Profile.

72. Which two operations can be performed using a formula field?


(Choose 2 answers)
A. Displaying an image based on the Opportunity Amount
B. Triggering a Process Builder
C. Calculating a score on a Lead based on the information from another field
D. Displaying the last four digits of an encrypted Social Security number

210. A developer must implement a CheckPaymentProcessor class that provides check processing
payment capabilities that adhere to what is defined for payments in the PaymentProcessor interface.

public interface PaymentProcessor {


void pay(Decimal amount);
}

Which is the correct implementation to use the PaymentProcessor interface class?


A. Public class CheckPaymentProcessor extends PaymentProcessor {
public void pay(Decimal amount) {}
B. Public class CheckPaymentProcessor extends PaymentProcessor {
public void pay(Decimal amount);}
C. Public class CheckPaymentProcessor implements PaymentProcessor {
public void pay(Decimal amount) {}}
D. Public class CheckPaymentProcessor implements PaymentProcessor {
public void pay(Decimal amount);}

201. 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 constant using the static and final keywords
B. Declare maxAttempts as a variable on a helper class
C. Declare maxAttempts as a private static variable on a helper class
D. Declare maxAttempts as a member variable on the trigger definition.
114. Which Apex class contains methods to return the amount of resources that have been used for a
particular governor, such as the number of DML statements?
A. Limits
B. Messaging
C. OrgLimits
D. Exception

181. A developer observes that an Apex test method fails in the Sandbox. To identify the issue, the
developer copies the code inside the test method and executes it via the Execute Anonymous tool in the
Developer Console. The code then executes with no exceptions or errors.
Why did the test method fail in the sandbox and pass in the Developer Console?
A. The test method has a syntax error in the code.
B. The test method relies on existing data in the sandbox.
C. The test method is calling an @future method.
D. The test method does not use System.runAs to execute as a specific user.

Which scenario is VALID for execution by unit tests?


A. Set the create date of a record using a system method.
B. Generate a VIsualforce PDF with getContentAsPDF().
C. Execute Anonymous Apex as a different user.
D. Load data from a remote site with a callout.

104. While writing a test class that covers an OpportunityLineItem trigger, a Developer is unable to
create a standard PriceBook since one already exists in the org.
(A developer wants to get to the standard price book in the org while writing a test class that covers an
OpportunityLineItem trigger.)
How should the Developer overcome this problem?
A. Use Test.getStandardPricebookId() to get the standard PriceBook ID.
B. Use @TestVisible to allow the test method to see the standard PriceBook.
C. Use @IsTest(SeeAllData=true) and delete the existing standard PriceBook.
D. Use Test.loadData() and a Static Resource to load a standard Pricebook.

51. Which three data types can be returned from an SOQL statement?
A. Single object
B. List of objects (List)
C. Integer
D. Boolean (Long)
E. String (Double)
A developer has two custom controller extensions where each has a save() method.

Which save() method will be called for the following Visualforce page?

A. ExtensionA save()

B. ExtensionB save()

C. standard controller save()

D. Runtime error will be generated

222. 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:
List<Contact> performSearch(String lastName)
{ return Database.query(‘Select Id, FirstName, LastName FROM Contact WHERE LastName Like
%’+lastName+’%); }
What are two ways the developer can update the method to prevent a SOQL injection attack? Choose 2
answers
A. Use variable binding and replace the dynamic query with a static SOQL
B. Use the escapeSingleQuote method to sanitize the parameter before its use.
C. Use a regular expression on the parameter to remove special characters.
D. Use the @Readonly annotation and the with sharing keyword on the class.

243. 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.
356. Universal Containers stores Orders and Line Items in Salesforce. For security reasons, financial
representatives are allowed to see information on the Order such as order amount, but they are not
allowed to see the Line Items on the Order.
Which type of relationship should be used?
A. Direct Lookup
B. Indirect Lookup
C. Master-Detail
D. Lookup

174. Universal Containers has an order system that uses an Order Number to identify an order for
customers and service agents. Order will be imported into Salesforce.
How should the Order Number field be defined in Salesforce?
A. Lookup
B. Direct Lookup
C. Number with External ID
D. Indirect Lookup

Which Lightning code segment should be written to declare dependencies on a Lightning component,
c:accountList, that is used in a Visualforce page?

A. <aura:application access=”GLOBAL” extends=”ltng:outApp”>

<aura:dependency resource=”c:accountList”/>
</aura:application>

215. 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. Relationships
B. Process Builder
C. Custom Objects and Fields
D. Roll-up Summaries
E. Triggers

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?

A. Salesforce CLI

B. AppExchange

C. Developer Console

D. Visual Studio Core IDE


232. A developer must create a CreditCardPayment class that provides an implementation of an existing
Payment class.

Which is the correct implementation?


A.

B.

C.

D.

71. 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. Set the attribute enableLightning to true the definition.
C. Enable Available for Lightning Experience, Lightning Comminities, and the mobile app on
Visualforce pages used by the custom application.
D. Rewrite all Visualforce pages asLightning components.

108. A development team wants to use a deployment script lo automatically deploy lo a sandbox during
their development cycles.
Which two tools can they use to run a script that deploys to a sandbox?
(Choose 2 answers)
A. Developer Console
B. SFDX CLI
C. Ant Migration Tool (VSCode)
D. Change Sets
187. What are three ways for a developer to execute tests in an Org from the following options? (Choose
3 answers)
A. Bulk API
B. Tooling API
C. Setup Menu
D. SalesforceDX
E. MetaData API

359. An Approval Process is defined in the Expense_Item__c object. A business rule dictates that
whenever a user changes the Status to ‘Submitted’ on an Expense_Report__c record, all the
Expense_Item__c records related to the expense report must enter the approval process individually.
Which approach should be used to ensure the business requirement is met?
A. Create a Process Builder on Expense_Report__c with an ‘Apex’ action type to submit all related
Expense_Item__c records when the criteria is met.
B. Create a Process Builder on Expense_Report__c to mark the related Expense_Item__c as submittable
and a trigger on Expense_Item__c to submit the records for approval.
C. Create two Process Builders, one on Expense_Report__c to mark the related Expense_Item__c
as submittable and the second on Expense_Item__c to submit the records for approval.
D. Create a Process Builder on Expense_Report__c with a ‘Submit for Approval’ action type to submit
all related Expense_Item__c records when the criteria are met.

You might also like