PD2
PD2
Which two methods can make this ERP order data visible in Salesforce? Choose 2
answers
2. An Apex class does not achieve expected code coverage. The testSetup method
explicitly calls a method in the Apex class. How can the developer generate the
code coverage?
A developer Is tasked with ensuring that email addresses entered into the system for
Contacts and for a Custom Object called Survey_Response__c do not belong to a list of
blacklisted domains. The list of blacklisted domains will be stored In a custom object for ease
of maintenance by users. Note that the Survey_Response__c object is populated via a
custom visualforce page. What is the optimal way to implement this?
A. Implement the logic in a helper class that is called by an Apex trigger on Contact and from the
Custom Visualforce page controller.
B. Implement the logic in the Custom Visualforce page controller and call that method from an
Apex trigger on Contact.
C. Implement the logic in a Validation Rule on the Contact and a validation Rule on the
Survey_Response__c object.
D. Implement the logic in an Apex trigger on Contact and also implement the logic within the
Custom visualforce page controller.
B. False
A developer created an Apex class that updates an Account based on input from a Lightning
web component that is used to register an Account. The update to the Account should only
be made if it has not already been registered.
What should the developer do to ensure that users do not overwrite each other's updates to
the same Account if they make updates at the same time?
A. Add a try/catch block around the update.
Users report that a button on a custom Lightning Web Component is not working. However,
there are no other details provided. What should the developer use to ensure error messages
are properly displayed?
A. Add the <apex:messages/> tag to the component.
B. 10
C. 50
D. 100
E. There is no limit
A developer wants to write a generic Apex method that will compare the Salesforce Name
filed between any two object records, for example to compare the Name field of an Account
and an Opportunity; or the name of an Account and a Contact.
How should the developer do this?
A. Invoke a Schema,describe() function to compare the values of each Name field.
B. Use the salesforce metadata API to extract the value of each object and compare the name
fields
D. Cast each object into an sObject and use sObject.get(Name') to compare the Name fields.
Within the System.Limit class, what would you call to get the number of calls made in your
transaction?
A. get [typeOfLimit] -> (Ex. getDXLStaterr.ents () )
A company exposes a REST web service and wants to establish two-way SSL between
Salesforce and the REST web service. A certificate signed by an appropriate certificate
authority has been provided to the developer.
What modification is necessary on the Salesforce side? (Choose two.)
A. Update the code to use HttpRequest.setHeaderQ to set an Authorization header.
A developer must create a custom pagination solution. While users navigate through pages,
if the data is changed from elsewhere, users should still see the cached results first
accessed.
How can the developer meet these requirements?
A. Use OFFSET in SOQL queries
D. Use a StandardSetController
Given a list of Opportunity records named opportunityList, which code snippet is best for
querying all Contacts of the Opportunity's Account?
A)
B)
C)
D)
A. Option C
B. Option D
C. Option B
D. Option A
Consider the following code snippet:
The Apex method is executed in an environment with a large data volume count for
Accounts, and the query Is performing poorly.
Which technique should the developer Implement to ensure the query performs optimally,
while preserving the entire result set?
A. Annotate the method with the @Future annotation.
B. Break down the query into two individual queries and Join the two result sets.
D. Create a formula field to combine the CreatedDate and RecardType value, then filter based
on the formula.
What is the correct syntax for calling a controller action from a Visualforce page and
updating part of the page once the action is completed? (Choose two.)
A. <apex:commandButton action="{!Save}" value="Save" redraw="thePageBlock"/>
A.
B.
C.
D.
A large company uses Salesforce across several departments. Each department has its own
Salesforce Administrator. It was agreed that each Administrator would have their own
sandbox in which to test changes. Recently, users notice that fields that were recently added
for one department suddenly disappear without warning. Also, Workflows that once sent
emails and created tasks no longer do so. Which two statements are true regarding these
issues and resolution? Choose 2 answers
A. A sandbox should be created to use as a unified testing environment instead of deploying
Change Sets directly to production.
B. The administrators are deploying their own Change Sets, thus deleting each other's fields
from the objects in production.
C. Page Layouts should never be deployed via Change Sets, as this causes Workflows and
Field-level Security to be reset and fields to disappear.
D. The administrators are deploying their own Change Sets over each other, thus replacing
entire Page Layouts and Workflows in Production
After a Platform Event Is defined in a Salesforce org, events can be published via which two
mechanisms?
Choose 2 answers
A. Internal Apps can use Process Builder.
How should a developer assert that a trigger with an asynchronous process has successfully
run?
A. Create at test data in the test class, use System.runAs() to invoke the trigger, then perform
assertions.
B. Create all test data in the test class, invoke Test.startTest() and Test.stopTest() and then
perform assertions,
C. Create all test data, use @future In the test class, then perform assertions.
When the sales team views an individual customer record, they need to see recent
interactions for the customer. These interactions can be sales orders, phone calls, or Cases.
The date range for recent interactions will be different for every customer record type.
How can this be accomplished?
A. Use a Lightning component to Query and display interactions based on record type that is
passed in using a design:attribute from the Lightning page.
B. Use batch Apex to query for the most recent interactions when the customer view screen is
loaded.
C. Use Lightning Flow to read the customer's record type, and then do a dynamic query for
recent interactions and display on the View page.
D. Use a dynamic form on the customer record page to display recent interactions.
A developer wrote an Apex method to update a list of Contacts and wants to make it available
for use by Lightning web components.
Which annotation should the developer add to the Apex method to achieve this?
A. @AuraEnable
B. @RemoteAction
C. @AuraEnabled
D. @RemoteAction(cacheable=true)
What is a consideration when using bind variables with dynamic SOQL? (Choose two.)
A. Dynamic SOQL cannot use bind variables
B. Is used to create, retrieve, update or delete records, such as accounts, leads, and custom
objects, and allows you to maintain passwords, perform searches, and much more
C. Provides a powerful, convenient, and simple REST-based web services interface for
interacting with Salesforce. Its advantages include ease of integration and development, and it's an
excellent choice of technology for use with mobile applications and web projects
D. Is used to retrieve, deploy, create, update, or delete customizations for your org. The most
common use is to migrate changes from a sandbox or testing org to your production environment
A developer has a page with two extensions overriding the Standard controller for Case.
A developer is writing a complex application involving triggers, workflow rules, Apex classes,
and
processes. The developer needs to carefully consider the order of execution when
developing the application.
1. Before Triggers
2. After Triggers
3. Post commit logic such as sending email
4. DML committed to the database
5. Workflow rules
6. Roll-up summary calculations
In what order do the following operations execute?
A. 1,5,6,2,4,3
B. 1,6,5,2,4,3
C. 1,2,4,5,6,3
D. 1,2,5,6,4,3
Universal Containers wants to use a Customer Community with Customer Community Plus
licenses so their customers can track how many of containers they are renting and when they
are due back. Many of their customers are global companies with complex Account
hierarchies, representing various departments within the same organization. One of the
requirements is that certain community users within the same Account hierarchy be able to
see several departments' containers, based on a junction object that relates the Contact to
the various Account records that represent the departments. Which solution solves these
requirements?
A. An Apex Trigger that creates Apex Managed Sharing records based on the junction object's
relationships
B. A Visualforce page that uses a Custom Controller that specifies without sharing to expose the
records
C. A Custom List View on the junction object with filters that will show the proper records based
on owner
D. A Custom Report Type and a report Lightning Component on the Community Home Page
Which two interfaces can the developer implement to make the component available as a
quick action?
Choose 2 answers
A. Force hasObjectName
B. Lightning QuickActionAPI
C. Force:hasRecordId
D. Force:lightningQuickActionWithoutHeader
E. Force:lightningQuicAction
Which statement is considered a best practice for writing bulk safe Apex Triggers?
A. Instead of DML statements, use the Database methods with allOrNone set to False.
B. Add records to collections and perform DML operations against these collections.
A developer is asked to build a solution that will automatically send an email to the Customer
when an Opportunity stage changes. The solution must scale to allow for 10,000 emails per
day. The criteria to send the email should be evaluated after all Workflow Rules have fired.
What is the optimal way to accomplish this?
A. Use a SingleEmailMessage() with an Apex Trigger.
B. Organization Id
D. Session Id
What level can a hierarchy custom setting be defined for? (Choose three.)
A. Groups
B. Organization
C. Roles
D. Users
E. Profiles
B)
C)
D)
A. Option B
B. Option D
C. Option A
D. Option C
B. 12 Months
C. 24 Months
D. 6 Months
E. 18 Months
B. Get request
Consider the above trigger intended to assign the Account to the manager of the Account''s
region. Which two changes should a developer make in this trigger to adhere to best
practices? Choose 2 answers
A. Use a Map to cache the results of the Region__c query by Id.
The following code segment is railed from a Trigger handler class from the Opportunity
trigger:
Which two changes should improve this code and make it more efficient? Choose 2 answers
A. Move the DML outside of the for loop.
D. Move the SOQL to fetch the account record outside of the for loop.
Assuming the CreateOneAccount class creates one account and implements the Queuetable
interface, which syntax tests the Apex code?
A)
B)
C)
D)
A. Option A
B. Option D
C. Option C
D. Option B
A company's support process dictates that any time a Case is closed with a Status of 'Could
not fix,' an Engineering Review custom object record should be created and populated with
information from the Case, the Contact, and any of the Products associated with the Case.
What is the correct way to automate this using an Apex trigger?
A. An after upsert trigger that creates the Engineering Review record and inserts it
B. A before update trigger that creates the Engineering Review record and inserts it
C. An after update trigger that creates the Engineering Review record and inserts it
D. A before update trigger that creates the Engineering Review record and inserts it
What is the optimal technique a developer should use to programmatically retrieve Global
Picklist options in a Test Method?
A. Use a static resource.
B. Example 2
C. Example 1
D. Example 3
What Salesforce tool lets you deploy/retrieve metadata, check status of apex jobs, and check
responses of REST calls?
A. Streaming API
B. Workbench
C. Developer Console
A Salesforce org has more than 50,000 contacts. A new business process requires a
calculation that aggregates data from all of these contact records. This calculation needs to
run once a day after business hours.
Which two steps should a developer take to accomplish this?
Choose 2 answers
A. Implement the Queuable Interface in the class that contains the aggregate calculation
method.
B. Use the @future annotation on the method that performs the aggregate calculation.
C. Use the areadOnly annotation on the method that performs the aggregate calculation.
D. Implement the schedulable Interface In the class that contains the aggregate calculation
method.
A developer has a Visual force page that automatically assign ownership of an Account to a
queue save. The page appears to correctly assign ownership, but an assertion validating the
correct ownership fails.
What can cause this problem?
A. The test class does not implement the Queueabfe interface.
B. The test class does not use the Bulk API for loading test data.
C. The test class does not retrieve the updated value from the database.
Which tag should a developer use to display different text while an <apex:commandButton>
is executing versus not executing?
A. <ApexactionStatus>
B. <ApexpageMessages>
C. <ApexactionSupper>
D. <apexactionPoller>
Which three approaches should a developer Implement to obtain the best performance for
data retrieval when building a Lightning web component?
Choose 3 answers
A. Use getRecordUi to obtain metadata.
C. myDataFactory.createTestRecords (10)
D. Database.createTestRecords (10)
A developer has generated Apex code from a WSDL for an external web service. The web
service requires Basic authentication.
What code should the developer use to authenticate?
A. Http.setHeader ('Authorization' , 'Basic QthZGprjpchVulHNchFtZQ!)
C. Http.setAuthentication('Basic QthZGprjpchVulHNchFtZQ')
A developer is working with existing functionality that tracks how many times a stage has
changed for an Opportunity. When the opportunity's stage is changed, a workflow rule is
fired to increase the value of a filed by one. The developer wrote an after trigger to create a
child record when the field changes from 4 to 5.
A user changes the stage of an Opportunities and manually sets the count field to 4. The
count field updates to 5, but the child record is not created.
What is the reason this is happening?
A. Trigger .old does not contain the updated value of the count field.
Customer billing data must be added and updated into Salesforce from a remote system on a
weekly basis. Additionally, customer activity information must be extracted from Salesforce
and put it into an on-premises data warehouse on a weekly basis.
Which approach should be used to import data into Salesforce and export data out of
Salesforce, taking into consideration that these imports and exports can interfere with end-
user operations during business hours and involve large amounts of data?
A. Salesforce Connect to push data to and pull data from the remote systems
B. Call-in directly from each remote system to Salesforce APIs to push and pull the data
C. Batch Apex, where Salesforce pushes data to and pulls data from the remote systems
D. Replication via third-party ETL to push data into Salesforce and pull data out in batches
An environment has two Apex Triggers: an after-update trigger on Account and an after-
update trigger on Contact. The Account after-update trigger fires whenever an Account's
address is updated, and it updates every associated Contact with that address. The Contact
after-update trigger fires on every edit, and it updates every Campaign Member record related
to the Contact with the Contact's state.
Consider the following: A mass update of 200 Account records' addresses, where each
Account has 50 Contacts. Each Contact has 1 Campaign Member. This means there are
10,000 Contact records across the Accounts and 10,000 Campaign Member records across
the contacts.
What will happen when the mass update occurs?
A. There will be no error, since each trigger fires within its own context and each trigger does not
exceed the limit of the number of records processed by DML| statements.
B. There will be no error, since the limit on the number of records processed by DML statements
is 50,000.
C. The mass update will fail, since the two triggers fire in the same context, thus exceeding the
number of records processed by DML statements.
D. The mass update of Account address will succeed, but the Contact address updates will fail
due to exceeding number of records processed by DML statements.
What tool in the Developer Console contains information on SOQL query Cardinality?
A. Log Inspector
B. Checkpoints tab
D. Query Editor
A developer is asked to find a way to store secret data with an ability to specify which
profiles and users can access which secrets.
What should be used to store this data?
A. Static resources
B. Custom settings
C. Custom metadata
D. System.Cookie class
A developer wrote a test class that successfully asserts a trigger on Account. It fires and
updates data correctly in a sandbox environment.
A salesforce admin with a custom profile attempts to deploy this trigger via a change set into
the production environment, but the test class fails with an insufficient privileges error.
What should a developer do to fix the problem?
A. Verify that Test, statement ( ) is not inside a For loop in the test class.
B. Add system.runAd ( ) to the best class to execute the trigger as a user with the correct object
permissions.
C. Add seeAllData=true to the test class to work within the sharing model for the production
environment.
D. Configure the production environment to enable ''Run All tests as Admin User.''
Universal Containers uses Big Objects to store almost a billion customer transactions called
Customer_Transaction__b. These are the fields on Customer_Transaction__b: Account__c
Program__c Points_Earned__c Location__c Transaction_Date__c The following fields have
been identified as Index Fields for the Customer_Transaction__b object: Account__c,
Program__c, and Transaction_Date__c. Which SOQL query is valid on the
Customer_Transaction__b Big Object?
A. SELECT Account__c, Program__c, Transaction_Date__c FROM Customer_Transaction__b
WHERE Account__c = '001R000000302D3' AND Program__c ='Shoppers' AND
Transaction_Date__c=2019-05-31T00:00Z
What is the transaction limit for the number of records using QueryLocator?
A. 50,000
B. 50,000,000
C. 100,000
D. 5,000,000
E. There is no limit
Universal Containers has a Visualforce page that displays a table every Container_ c being
rented by a gives Account.. failing because some of the customers rent over 100,000
containers.
What should a developer change about the Visualforce page to help with the page load
errors?
A. Implement pagination with a StandardSetController.
When calling a RESTful web service, a developer receives a JSON payload that has a data
hierarchy that is nested three levels deep. How can the developer describe the external data?
A. Declare a class with three levels and deserialize the JSON typed with this class.
B. Use the ANT migration tool, the custom metadata API, or the Dataloader.
C. Use middleware to flatten the JSON and consume it as a new custom object.
Which code statement includes an Apex method named updateAccount in the class
AccountController for use in a Lightning web component?
A. Import updateAccounts from @salesforceapex AccountController';
A company wants to incorporate a third-party web service to set the Address fields when an
Account is inserted, if they have not already been set. What is the optimal way to achieve
this?
A. Create an after insert trigger, call an Apex @InvocableMethod method from it, and make the
callout from that Apex method
B. Create a Process, call an Apex @InvocableMethod from it, and make the callout from that
Apex method.
C. Create an after insert trigger, call an @future(callout=true) method from it, and make the
callout from that Apex method.
D. Create a Process, call an Apex @future(callout=true) method from it, and make the callout
from that Apex method.
A developer is creating a Lightning web component that contains a child component. The
property stage is being passed from the parent to the child. The public property is changing,
but the setOppList function is not being invoked.
C. A test class that validates the formula field is needed for deployment.
D. A formula field will calculate the value retroactively for existing records.
A company has a custom object. Request__c. that has a field, Completed__c. and a Lookup
to Opportunity, Opportunity__c.
Which SOQL query will get a unique list of all of the Opportunity records that have a
Completed Request?
A.
B.
C.
D.
The Metadata API___________.
A. Is used to create, retrieve, update or delete records, such as accounts, leads, and custom
objects, and allows you to maintain passwords, perform searches, and much more
B. Provides a powerful, convenient, and simple REST-based web services interface for
interacting with Salesforce. Its advantages include ease of integration and development, and it's an
excellent choice of technology for use with mobile applications and web projects
C. Is based on REST principles and is optimized for loading or deleting large sets of data. You
can use it to query, queryAII, insert, update, upsert, or delete many records asynchronously by
submitting batches
D. Is used to retrieve, deploy, create, update, or delete customizations for your org. The most
common use is to migrate changes from a sandbox or testing org to your production environment
Which API can b|e used to execute unit tests? (Choose three.)
A. Metadata API
B. Streaming AP
C. Test API
D. SOAP API
E. Tooling API
B. There is an existing, external system of truth for user access assignments which will continue
to drive access and be integrated with salesforce
E. You need to change record access to read/write for all users utilising a lightning component
Which two lines must change in the above ode to make the Apex method able to be wired?
Choose 2 answers
A. Remove private from line 09.
What is the transaction limit for the number of records for SOQL queries?
A. 10,000
B. 50,000
C. There is no limit
D. 5,000
E. 20,000
users complain that a page Is very slow to respond. Upon investigation, the query below Is
found to perform slowly. SELECT id, Name FROM Contact WHERE CustomField_c null;
Which two actions can a developer take to improve performance?
Choose 2 answers
A. Contact Salesforce customer support to create a custom index to include null values
B. Make the CustomFleld__c field an External ID.
C. Add a UMir dause to the query to reduce the number of records returned.
D. Make the field CustomReW__c required because Salesforce field Indexes do not Include
nulls.
A Developer wishes to improve runtime performance of Apex calls by caching results on the
client. What is the best way to implement this?
A. Set a cookie in the browser for use upon return to the page.
D. Call the setStorable() method on the action in the JavaScript client-side code.
A developer implemented a custom data table in a Lightning web component with filter
functionality. However, users are submitted support tickets about long load times when the
filters are changed. The component uses an Apex method that is called to query for records
the selected filters.
What should the developer do to improve performance of the component?
A. Use SOSL to Query the records on filter change.
B. Return all records into a list when the component is created and filter the array in JavaScript
C. Use setStorable( ) in the Apex method to store the response in the client-side cache
A company has the Lightning Component above that allows users to dick a button to save
their changes and redirects them to a different page. Currently, when the user hits the Save
button the records are getting saved, but they are not redirected.
Which three techniques can a developer use to debug the JavaScript? Choose 3 answers
A. Use the browser's dev tools to debug the JavaScript.
A developer wishes to improve runtime performance of Apex calls by caching results on the
client.
What is the most efficient way to Implement this?
A. Set a cookie in the browser for use upon return to the page.
B. Decorate the server-side method with @AuraEnabled(storagele=true).
C. Decorate the server-side method with @AuraEnabled(caccheable-true).
D. Call the setstoreable () method on the action in the JavaScript client-side code.
What is the transaction limit on the max timeout for all callouts?
A. 60 seconds (synchronous); 200 seconds (async
B. 120 seconds
D. 60 seconds
E. There is no limit
For compliance purposes, a company is required to track long-term product usage in their
org. The information that they need to log will be collected from more than one object and,
over time, they predict they will have hundreds of millions of records.
What should a developer use to implement this?
A. Field History Tracking
B. Big objects
A developer must create a way for external partners to submit millions of leads into
Salesforce per day-How should the developer meet this requirement?
A. Publicly expose an Apex Web Service via Force.com Sites
B. Host a Web-to-Lead form on the company website
C. Publicly expose a Visualforce page via Force.com Sites
D. Create a web service on Heroku that uses Heroku Connect
Universal Containers wants to use an external Web Service provided by a third-party vendor
to validate that shipping and billing addresses are correct. The current vendor uses basic
password authentication, but Universal Containers might switch to a different vendor who
uses OAuth. What would allow Universal Containers to switch vendors without updating the
code to handle authentication?
A. Dynamic Endpoint
B. Custom Setting (List)
C. Named Credential
D. Custom Metadata
Choose 2 answers
A. import getOrders from @salesforc/apex/c.OrderController.getAvailablOrders';
A developer is asked to look into an issue where a scheduled Apex is running into DML
limits. Upon investigation, the developer finds that the number of records processed by the
scheduled Apex has recently increased to more than 10,000.
What should the developer do to eliminate the limit exception error?
A. Use the @future annotation.
B. Use the @RemoteAction annotation on the method definition with JavaScript Remoting
C. Use the $Controller global variable to access the controller method via JavaScript
Universal Containers (UC) wants to develop a customer community to help their customers
log issues with their containers. The community needs to function for their German- and
Spanish-speaking customers also. UC heard that it's easy to create an international
community using Salesforce, and hired a developer to build out the site.
What should the developer use to ensure the site is multilingual?
A. Use Custom Labels to ensure custom messages are translated property.
What is a recommended practice with regard to the Apex CPU limit? (Choose two.)
A. Use Map collections to cache sObjects
A developer created and tested a Visualforce page in their developer sandbox, but now
receives reports that users are encountering ViewState errors when using it in Production.
What should the developer ensure to correct these errors?
A. Ensure properties are marked as private.
A developer created a JavaScript function as a part of a Lightning web component (LWC) that
surfaces information... about leads by imperatively calling getFetchLeadList when certain
criteria are met.
What are these changes the developer should implement in the Apex class above to ensure
the LWC can displ... data efficiently while preserving security?
Choose 3 answers
A. Implement the without sharing keyword in the class declaration.
Which statement is true about using ConnectApi namespace (also called Chatter in Apex)?
(Choose two.)
A. Chatter in Apex methods honor the 'with sharing' and 'without sharing' keywords
B. Chatter in Apex methods do not run in system mode; they run in the context of the current
user
D. Many test methods related to Chatter in Apex require the IsTest (SeeAIIData=true) annotation
B. Use a content distribution network and Include <script> <script> tags In the component.
D. Upload the third-party JavaScript library as a static resource that Imports Into the component.
ABC Company has an Apex process that makes multiple extensive database operation and
web service callouts. The database processes and web services can take a length time to run
and must be run sequentially.
How should the developer write this Apex code without running into governor limits and
system limitations?
A. Use Apex Scheduler to scheduled each process.
B. Use Limits class to stop entire process once governor limits are reached.
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. @QRemoteAction(caccheable=true)
B. @AuraEnabledcacheable=true)
C. @RemoteAction
D. @AuraEnabled
A developer has a Debug method within a class, which is invoked hundreds of times.
What is the optimal functionality in the Developer Console to count the number of calls made
to the method?
A. The "Execution Log" Panel
This sales team needs a custom Visualforce page to enter sales orders. When a product is
selected on the Visualforce page, a web service is invoked to determine if the product is in
stock, and the result is displayed on the page.
How can a developer write this page to display the result of the web service and ensure
governor limits for concurrent usage are not exceeded?
A. Use visualforce Remoting to handle the web service callout.
B. Use the Salesforce Metadata API in the web service callout.
C. Use Continuation that is invoked when a Submit button is clicked.
D. Use an Apex trigger with callout=true annotation.
When developing a Visualforce page that will be used by a global organization that does
business in many languages and many currencies, which feature should be used? (Choose
three.)
A. Translation Workberic
B. Custom Labels
C. getLocalCurrency()
D. Global Labels
E. convertCurrency()
A developer needs to create a Lightning page for entering Order Information. An error
message should be displayed if the zip code entered as part of the Order's shipping address
is not numeric.
What is a recommended way for the error message be displayed to the end user?
A. Use the apex:message tag to display errors
D. In dynamic SOQL, you can use bind variables and bind variable fields
A developer created a JavaScript library that simplifies the development of repetitive tasks
and features and uploaded the library as a static resource called jsutils in Salesforce.
Another developer is coding a new Lightning web component (LWC) and wants to leverage
the library.
Which statement properly loads the static resource within the LWC?
A. const jsUtility = SA.get ('SReaource.jsUtils');
B. 2, 2, 4, 4
C. 2,2,3,3
D. 1,2,3,4
What is the correct way to communicate the new value of a property named ''passthrough'' to
my-parent component if the property is defined within my-child-component?
A)
B)
C)
D)
A. Option C
B. Option B
C. Option A
D. Option D
What is the transaction limit on the number of callouts?
A. 50
B. 100
C. 200
D. There is no limit
E. 150
Which two scenarios require an Apex method to be called imperatively from a Lightning web
component?
Choose 2 answers
A. Calling a method that is not annotated with cacheable=true
D. Calling a method that is external to the main controller for the Lightning web component
A. The code will result in a System.LimitException: Apex CPU time limit exceeded error
B. The code will result in a System.LimitException : Too many script statements error
C. SOQL could be avoided by creating a formula field for StageName in Account from the related
Opportunity
UC Loans is a small company with a part time Salesforce administrator. UC Loans wants to
create a Loan__c record whenever an Opportunity is won. What is the optimal solution for UC
Loans to accomplish this?
A. Process Builder
B. Workflow Rule
C. Quick Action
D. Apex Trigger
What is the transaction limit for the number of records for SOSL?
A. 200 (synchronous), 100 (async)
C. 2,000
D. There is no limit
E. 20
Line 1 public class AttributeTypes Line 2 { Line 3 private final String[] arrayItems; Line 4 Line
5 @AuraEnabled Line 6 public List<String> getStringArray() { Line 7 Strings+ arrayItems =
new String*+, 'red', 'green', 'blue' -; Line 8 return arrayItems; Line 9 } Line 10 } Consider the
Apex controller above that is called from a Lightning Aura Component. What is wrong with it?
A. Line 1: class must be global
D. Line 8: method must first serialize the list to JSON before returning
What are the ways a developer can create test data of Contacts? (Choose two.)
A. myDataFactory.createContacts(10)
B. Test.createTestData ()
C. Test.loadTestRecords(Contact.sObjectType, 'staticResource')
D. Test.loadData(Contact.sObjectType, 'staticResource')
A developer receives a LimitException: Too many query rows: 50001 error when running
code.
What debugging approach using the Developer Console provides the fastest and most
accurate mechanism to identify a specific component that may be returning an unexpected
number of rows?
A. Use the Execution Overview to see the number of rows returned by each Executed Unit
B. Count the number of Row Limit warning messages in the Debug Logs
C. Filter the Debug Log on SOQL_EXECUTE_END statements to track the results of each
SOQL Query
D. Add System.debug(System.getQueryRows()) to the code to track SOQL usage
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)
When calling a RESTful web service, the developer must implement two-way SSL
authentication to enhance security. The Salesforce admin has generated a self-sign
certificate within Salesforce with a unique name of "ERPSecCertificate".
Consider the following code snippet:
Which method must the developer implement in order to sign the HTTP request with the
certificate?
A. req.setHeader('certificate', 'ERPSecCertificate');
B. req.setSecureCertificate( 'ERPSecCertificate');
C. req.setClientCertificateName('ERPSecCertificate');
D. req.setSecure('ERPSecCertificare)';
Which component should the developer add to the form to display error messages?
A. lightning-error
B. apex:messages
C. lightning-messages
D. aura:messages
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. Invoke an Apex dass with the method annotated as @AiraEnabled to perform the query.
B. Write the query in a custom Lightning web component wrapper and invoke from the Lightning
component.
C. Create a Process Builder to execute the query and invoke from the Lightning component.
C. Query the FirstDayOfweek field from the Locale for the current user.
A developer writes the following Apex trigger so that when a Case is closed, a single Survey
record is created for that Case. The issue is that multiple Survey_c records are being created
per Case.
Sometimes events on Salesforce need to be handled by an external system due to the scale
or type of process being executed. Consider the use case of a user in Salesforce needing to
get pricing for an order they are building in Salesforce while on the phone with a customer.
The pricing logic already exists in a third-party system. Instead of recreating this logic in
Salesforce, it will be leveraged by making a request of the third-party system. The response,
in this case the pricing, will be returned and stored back in Salesforce. What is the optimal
solution?
A. An Apex trigger that upon saving the Order will make a real-time Apex callout, saving the
pricing back in Salesforce
B. A Visualforce page that can make a real-time Apex callout to display and save the pricing
back in Salesforce
C. A Process Builder process and Outbound Message to fetch the pricing upon save and store
the pricing in Salesforce
D. An ETL tool to process batches of newly saved Orders every few minutes to store the pricing
back in Salesforce
B. Lightning:editAction
C. Force: lightningQuickAction
D. Force:lightningEditAction
B. @HttpDelete
C. @Http Patch
D. @HttpUpsert
What is a valid request for the following REST method? (Choose two.)
@HttpPost global static void myPostMethod(String si, Integer il, Boolean bl, String 52)
A. <request> <sl>my first string</sl> <ll>123</il> <32>my second string</32> <bl>false</bl>
</request>
B. il" : 123, "SI" : "my first string", "S2" : "my second string", "bl" : false
D. si" : "my first string", 11" : "123", "bl" : "false", "S2" : "my second string"
What is a consideration when testing batch Apex? (Choose two.)
A. Test methods must execute the batch with a scope size of less than 200 records
B. Test methods must run the batch between TeststartTestQ and Test.stopTestQ
B. processList (ace)
Global with sharing class MyRemoter { public String accountName { get; set; } public static
Account account { get; set; } public AccountRemoter(} {} @RemoteAction global static
Account getAccount (String acccuntName) { account = [SELECT Id, Name,
NumberOfEmployees FROM Account WHERE Name = :accountName]; return account; } }
Consider the Apex class above that defines a RemoteAction used on a Visualforce search
page. Which code snippet will assert that the remote action returned the correct Account?
A. Account a = MyRemoter.getAccount ('TestAccount'):
System.assertEquals{ 'TestAccount', a.Name };
D. Account a = controller.getAccount('TestAccount');
System.assertEquals(, 'TestAccount', a.Name }
Which two relationship queries use the proper syntax? Choose 2 answers
A. SELECT Id, Name, Account __r.Name FROM Contact WHERE Account r.Industry = 'Media'
An org has a custom object, Registeration_c that has a lookup relationship to the
Opportunity object.
What should a developer use to create a stand-alone Vlsualforce page that displays the
Registration__c records related to an Opportunity.
A. A standard controller with a controller extension
B. A custom controler
C. A controler extension
D. A standard controller
Which three Visualforce components can be used to initiate Ajax behavior to perform partial
page updates? Choose 3 answers
A. <apex:actionStatus>
B. <apex:form>
C. <apex:commandButton>
D. <apex:actionSupport>
E. <apex:commandLink>
B. Create custom a custom date field on Opportunity for each field to track the previous date and
execute a SOQL query for date fields.
C. Subscribe to the Opportunity Change Data Capture event in the Lightning component.
D. Subscribe to the OpportunityHistory Change Data Capture event in the Lightning component.
A developer created an Apex class that makes outbound RESTful callout. The following was
created to send a fake response in Apex test methods.
Which method can be called to return this fake response in the test methods?
A. testSetup
B. Test.setTestData
C. TestcreateStub
D. TestsetMock
What is a best practice when unit testing a controller? (Choose two.)
A. Simulate user interaction by leveraging Test.setMock()
Which type of controller is best suited when you want to add custom functionality to a
standard controller page, or when you want reusable functionality throughout pages?
A. Standard List/Set Controller
B. Standard Controller
C. Controller Extensions
D. Custom Controller
The Salesforce admin at Cloud Kicks created a custom object called Region__c to store all
postal zip codes in the United States and the Cloud
Kicks sales region the zip code belongs to.
Object: Region__c
Fields: Zip_Code__c (Text), Region_Name__c(Text)
Cloud Kicks wants a trigger on the Lead to populate the Region based on the Lead's zip
code.
A)
B)
D)
A. Option D
B. Option A
C. Option C
D. Option B
What can be done to improve the performance of the insert trigger shown above?
A.
B.
C.
D.
In a VisualForce page with a VisualForce component that has rendered set to false when the
page loads, how can a developer ensure it will show on a re-render?
A. Perform a full page refresh since rendered elements cannot be re-rendered without
refreshing.
B. Set the rendered attribute of the component to true and re-render the component.
C. Set the re-render attribute of the component to true.
D. Set the rendered attribute of the component to true and re-render a parent component
A developer has created a Visualforce page that uses a third-party JavaScript framework. The
developer has decided to supply data to the JavaScript functions using JavaScript Remoting
for Apex Controllers.
What is the correct syntax to declare a remote method in Apex? (Choose two.)
A. @RemoteAction global String getTable()
What is the transaction limit for the number of DML statements allowed?
A. 20
B. 2,000
E. 150
An Apex trigger creates a Contract record every time an Opportunity record is marked as
Closed end Won. This trigger is working great, except (due to a recent acquisition) historical
Opportunity records need to be loaded into the Salesforce instance.
When a test batch of records are loaded, the Apex trigger creates Contract records. A
developer is tasked with preventing Contract records from being created when mass loading
the Opportunities, but the daily users still need to have the Contract records created.
What is the most extendable way to update the Apex trigger to accomplish this?
A. Add the Profile ID of the user who loads the data to the trigger so the trigger will not fire for
this user.
B. Use a Hierarchy Custom Setting to skip executing the logic inside the trigger for the user who
loads the data.
C. Add a Validation Rule to the Contract to prevent Contract creation by the user who loads the
data.
D. Use a List Custom Setting to disable the trigger for the user who loads the data.
Universal Containers has an existing automation where a custom record called Account Plan
is created upon an Account being marked as a Customer. Recently, a Workflow Rule was
added so that whenever an Account is marked as a Customer, a 'Customer Since' date field is
updated with today's date.
Now, since the addition of the Workflow Rule, two Account Plan records are created
whenever the Account is marked as a Customer.
What might cause this to happen?
A. The Apex Trigger responsible for the record creation does not use a static variable to ensure
It only fires once.
B. The Process Builder responsible for the record creation fires before and after the Workflow
rule.
C. The Workflow Rule responsible for the record creation fires twice because the 'Customer
Since' field Update Is marked as 'Re-evaluate Workflow Rules After Field Change
D. The Apex Trigger responsible for the record creation is not bulk sate and calls insert inside of
a for loop.
A developer gets an error saying 'Maximum Trigger Depth Exceeded.' What is a possible
reason to get this error message?
A. The SOQL governor limits are being hit.
B. A Process Builder is running that sends mass emails.
C. There are numerous DML operations in the trigger logic.
D. Trigger is recursively invoked more than 16 times.
A company accepts orders for customers in their enterprise resource planning (ERP)
crder__c records with a lookup field to Account. The Account object has an External ID field,
ERP_Customer_ID__c.
What should the integration use to create new Order__c records that will automatically be
related to the correct Account?
A. Upsert on the Account and specify the ERP_Customer_ID__c.
B. Insert on the Order__c object followed by an update on the Order__c object.
C. Upsert on the Order__c object and specify the ERP_Customer_ID__c.
D. Merge on the Order__c object and specify the ERP_Customer_ID__c
.
Which two best practices should the developer Implement to optimize this code?
Choose 2 answers
A. Remove the DML statement.
B. Create a Project Sharing Rule that shares to the Team Member Group
A company uses Opportunism to track sales to their customers and their org has millions of
Opportunities. They want to begging to track revenue over time through a related Revenue
object.
As part of their initial implementation, they want to perform a one-time seeding of their data
by automatically creating and populating Revenue records for Opportunities, based on
complex logic. They estimate that roughly 100,000 Opportunities will have revenue records
and populated.
What is the optimal way to automate this?
A. Use Database.txtcuteBatch() to invoke a Database.Batchable class.
B. Is used to retrieve, deploy, create, update, or delete customizations for your org. The most
common use is to migrate changes from a sandbox or testing org to your production environment
C. Is based on REST principles and is optimized for loading or deleting large sets of data. You
can use it to query, queryAII, insert, update, upsert, or delete many records asynchronously by
submitting batches
D. Provides a powerful, convenient, and simple REST-based web services interface for
interacting with Salesforce. Its advantages include ease of integration and development, and it's an
excellent choice of technology for use with mobile applications and web projects
A company has a custom object Sales_Help_Request__c that has a Lookup relationship to
Opportunity. The Sales_Help_Request__c has a number field, Number_of_Hours__c, that
represents the amount of time spent on the Sales_Help_Request__c.
A developer is tasked with creating a field, Total_Hours__c, on Opportunity that should be
the sum of all of the Number_of_Hours__c values for the Sales_Help_Request__c records
related to that Opportunity.
What should the developer use to implement this?
A. A roll-up summary field on the Opportunity object
C. A trigger on Sales_Help_Request__c
A developer creates an application event that has triggered an infinite loop. What may have
caused this problem?
A developer must create a custom pagination solution for accessing approximately 2000
records and displaying 50 records on each page. Data from Salesforce will be accessed via
an API and not via Apex.
How can the developer meet these requirements? (Choose two.)
A. Use a StandardSetController
The Account edit button must be overridden in an org where a subset of users still use
Salesforce Classic. The org already has a Lightning Component that will do the work
necessary for the override, and the client wants to be able to reuse it,
How should a developer implement this?
A. Override the edit button for both Lightning and Classic with a Lightning Component.
B. Override the edit button for Lightning with a Lightning Page; and for Classic, override the edit
button with a Visualforce pag That contains the Lightning Component.
C. the edit button for both Lightning and Classic with a new Visualforce page.
D. Override the edit button for Lightning with a Lightning Component; and for Classic, override
the edit button with a Visualforce page that contains the Lightning Component.
A company represents their customers as Accounts in Salesforce. All customers have a unique
Customer_Number__c that is unique across all of the company's systems. They also have a custom
Invoice__c object, with a Lookup to Account, to represent invoices that are sent out from their
external system. This company wants to integrate invoice data back into Salesforce so Sales Reps can
see when a customer is paying their bills on time. What is the optimal way to implement this?
A. Use Salesforce Connect and external data objects to seamlessly import the invoice data into
Salesforce without custom code.
B. Ensure Customer_Number__c is an External ID and that a custom field Invoice_Number__c is an
External ID and Upsert invoice data nightly.
C. Create a cross-reference table in the custom invoicing system with the Salesforce Account ID of each
Customer and insert invoice data nightly.
D. Query the Account Object upon each call to insert invoice data to fetch the Salesforce ID
corresponding to the Customer Number on the invoice
How should a developer reference a third-party JavaScript library from a Lightning component ?
A. From a document
B. From an asset file
C. From a static resource
D. From a third-party URL
An end user reports that a Lightning component is performing poorly. Which two steps should to
taken in production to investigate? Choose 2 answers
A. Add a trace flag to the user who reported the issue.
B. Print consoIe.log {} statements to identify where actions are delayed.
C. Enable Debug Mode for Lightning component
D. Use the salesforce Lightning inspector chrome extension.
What should the developer change in the code above for this to happen?
A. Create a new variable to store the result and annotate it with @track.
B. Call refreshApex () On this .data.
C. Create a variable to store the result and call refreshApex ()
D. Add the @track decorator to the data variable
A Page throws an Attempt to dereference a null object error for a Contact. What change In the
controller will fix the error?
A. Change the setters signature to return a Contact.
B. Use a condition in the getter to return a new Contact if it is null.
C. Declare a static final Contact at the top of the controller.
D. Change the getter's signature to be static Contact
Universal Containers (UC) wants to develop a customer community to help their customers log issues
with their containers. The community needs to function for their German- and Spanish -speaking
customers also. UC heard that it's easy to create an international community using Salesforce, and
hired a developer to build out the site. What should the developer use to ensure the site is
multilingual?
A. Use Custom Objects to translate custom picklist values.
B. Use Custom Metadata to translate custom picklist values.
C. Use Custom Labels to ensure custom messages are translated property.
D. Use Custom Settings to ensure custom messages are translated properly
How can a developer efficiently incorporate multiple JavaScript libraries, such as JQuery and
MomenUS, in a Lightning Component?
A. Use JavaScript remoting and script tags.
B. Join multiple assets from a static resource.
C. Use CONs with script attributes
D. Implement the libraries in separate helper files.
A developer created the code to perform an HTP GET request to an external system. When the code is
executed, the callout is unsuccessful and the following error appears within the Developer
Console:System.CalloutException: Unauthorized endpoint Which recommended approach should the
developer implement to the callout exception?
A. Change the access modifier for ERPCatelog from Public to global
B. Annotate the getERPCatalogContents method With @Future (Callout-true)
C. create a remote site setting configuration that includes the endpoint.
D. use the setHeader () method to specify Basic Authentication
Refer to the markup below: A Lightning web component displays the Account name and two custom
fields out of 275 that exist on the object. The developer receives complaints that the component
performs slowly. What can the developer do to improve the performance?
D.Replace layout-type=”Full” with fields=(fields)
Universal Containers wants to notify an external system in the event that an unhandled exception
occurs when their nightly Apex batch gob runs. What is the appropriate publish/subscribe logic to
meet this requirement?
A. Have the external system subscribe to a custom Platform Event that gets fired with addError().
B. Have the external system subscribe to a standard Platform Event that gets fired with
EventBus.publish().
C. Have the external system subscribe to a standard Platform Event that gets fired.
D. Have the external system subscribe to a custom Platform Event that gets fired with
EventBus.publish()
A Visualforce page loads slowly due to the large amount of data it displays.
Which strategy can a developer use to improve the performance?
A. Use Javascript to move data processing to the browser instead of the controller.
B. Use the transient keywords for the List variables used in the custom controller.
C. Use lazy loading to load the data on demand, instead of the controller's constructor.
D. Use an <apex:actionPoller> in the page to load all of the data asynchronously.
A. Custom Metadata
B. Custom Setting (List)
C. Dynamic Endpoint
D. Named Credential
A company has a Lightning Page with many Lightning Components, some that
cache reference data. It is reported that the page does not always show the most
current reference data.
What can a developer use to analyze and diagnose the problem in the Lightning
Page?
<lightning:layout multipleRows="true">
<lightning:layoutItem size="12">{!v.account.Name}
</lightning:layoutItem>
<lightning:layoutItem size="12">{!v.account.AccountNumber}
</lightning:layoutItem>
<lightning:layoutItem size="12">{!v.account.Industry}
</lightning:layoutItem>
</lightning:layout>
Refer to the component code above. The information displays as expected (in
three rows) on a mobile device. However, the information is not displaying as
desired (in a single row) on a desktop or tablet.
Which option has the correct component changes to display correctly on
desktops and tablets?
A. <lightning:layout multipleRows="true"> <lightning:layoutItem size="12"
mediumDeviceSize="6" largeDeviceSize="4">{!v.account.Name} </lightning:layoutItem>
<lightning:layoutItem size="12" mediumDeviceSize="6"
largeDeviceSize="4">{!v.account.AccountNumber} </lightning:layoutItem>
<lightning:layoutItem size="12" mediumDeviceSize="6"
largeDeviceSize="4">{!v.account.Industry} </lightning:layoutItem> </lightning:layout>
B. <lightning:layout multipleRows="true"> <lightning:layoutItem size="12"
largeDeviceSize="4">{!v.account.Name} </lightning:layoutItem> <lightning:layoutItem
size="12" largeDeviceSize="4">{!v.account.AccountNumber} </lightning:layoutItem>
<lightning:layoutItem size="12" largeDeviceSize="4">{!v.account.Industry}
</lightning:layoutItem> </lightning:layout>
C. <lightning:layout multipleRows="true"> <lightning:layoutItem size="12"
mediumDeviceSize="4">{!v.account.Name} </lightning:layoutItem> <lightning:layoutItem
size="12" mediumDeviceSize="4">{!v.account.AccountNumber} </lightning:layoutItem>
<lightning:layoutItem size="12" mediumDeviceSize="4">{!v.account.Industry}
</lightning:layoutItem> </lightning:layout>
D. <lightning:layout multipleRows="true"> <lightning:layoutItem size="12"
mediumDeviceSize="6">{!v.account.Name} </lightning:layoutItem> <lightning:layoutItem
size="12" mediumDeviceSize="6">{!v.account.AccountNumber} </lightning:layoutItem>
<lightning:layoutItem size="12" mediumDeviceSize="6">{!v.account.Industry}
</lightning:layoutItem> </lightning:layout>
A company's support process dictates that any time a Case is closed with a
Status of 'Could not fix', an Engineering Review custom object record should be
created and populated with information from the Case, the Contact, and any of
the Products associated with the Case.
What is the correct way to automate this using an Apex trigger?
A. An after update trigger that creates the Engineering Review record and inserts it
B. A before update trigger that creates the Engineering Review record and inserts it
C. An after upsert trigger that creates the Engineering Review record and inserts it
D. A before upsert trigger that creates the Engineering Review record and inserts it
An Apex class does not achieve expected code coverage. The testSetup method
explicitly calls a method in the Apex class.
How can the developer generate the code coverage?
A developer is asked to update data in an org based on new business rules. The
new rules state that Accounts with the type set to 'Customer' should have a
status of 'Active', and Accounts with the type set to 'Prospect' should have a
status of 'Pending'. No other changes to data should be made.
Which code block will accurately meet the business requirements?
A. Use the REST API as well as the SOAP API to effectively double the API calls allowed in a
24-hour period.
B. Create an Inbound Message that, using Flow, can do all of the logic the integration code was
doing.
C. Write a custom Apex web service that, given an email address, does all of the logic the
integration code was doing.
D. Create several Apex InboundEmailHandlers to accept calls from the third-party system, thus
bypassing the API limits.