pd1 dumps2
pd1 dumps2
While writing an Apex class, a developer wants to make sure that all functionality being
developed is handled as specified by the requirements.
Which approach should the developer use to be sure that the Apex class is working according to
specifications?
B. Create a test class to execute the business logic and run the test in the Developer Console.
2 . A developer needs to have records with specific field values in order to test a new Apex class.
What should the developer do to ensure the data is available to the test?
3 . Which statement should be used to allow some of the records in a list of records to be inserted if
others fail to be inserted?
A. insert (records, false)
B. Database.insert(records, false)
C. Database.insert(records, true)
D. insert records
4 . How does the Lightning Component framework help developers implement solutions faster?
5 . How can a developer check the test coverage of active Process Builder and Flows deploying them
in a Changing Set?
6 . A developer created a Lightning web component called StatusComponent to be inserted into the
Account record page.
Which two things should the developer do to make this component available? (Choose two.)
B.Create a Process Builder on the Opportunity object that executes an Apex immediate action to
perform the HTTP REST callout whenever the Opportunity is updated.
C.Create a Lightning component that performs the HTTP REST callout, and use a Lightning Action to
expose the component on the Opportunity detail page.
D. Create an after update trigger on the Opportunity object that calls a helper method using
@Future(Callout=true) to perform the HTTP REST callout.
8 . Universal Containers wants to ensure that all new leads created ni the system have a valid email
address. They have already created a validation rule to enforce this requirement, but want ot add an
additional layer of validation using automation.
What would be the best solution for this requirement?
A. Submit a REST API Callout with a JSON payload and validate the fields on a third party system
B. Use an Approval Process to enforce the completion of a valid email address using an outbound
message action.
C. Use a before-save Apex trigger on the Lead object to validate the email address and display an
error message if it is invalid
D. Use a custom Lightning Web component to make a callout to validate the fields on a third party
system.
9. An Apex method, getAccounts, that returns a List of Accounts given a searchTerm, is available for
Lightning Web components to use.
What is the correct definition of a Lightning Web component property that uses the getAccounts
method?
Ans: option A
11 . A developer has a Visualforce page and custom controller to save Account records. The
developer wants to display any validation rule violations to the user.
How can the developer make sure that validation rule violations are displayed?
13 . Universal Containers has an order system that uses an Order Number to identify an order for
customers and service agents. Order records will be imported into Salesforce.
How should the Order Number field be defined in Salesforce?
A. Direct Lookup
B. External ID and Unique
C. Lookup
D. Indirect Lookup
14 . A developer created a trigger on the Account object. While testing the trigger, the developer
sees the error message 'Maximum trigger depth exceeded'.
What could be the possible causes?
A. the developer does not have the correct user permission.
B. The trigger is getting executed multiple times.
C.The trigger does not have sufficient code coverage.
D.The trigger is too long and should be refactored into a helper class.
15 . A developer is asked to write helper methods that create test data for unit tests.
01: public TestUtils {
02:
03: public static Account createAccount() {
04: Account act= new Account();
05: //...set some fields on acct...
06: return act;
07: }
08: //...other methods...
09: }
What should be changed in the TestUtils class so that its methods are only usable by unit test
methods?
16 . The following code snippet is executed by a Lightning web component in an environment with
more than 2,000 lead records:
Which governor limit will likely be exceeded within the Apex transaction?
17 . Which code in a Visualforce page and/or controller might present a security vulnerability?
18 . What are two ways for a developer to execute tests in an org? (Choose two.)
A. Tooling API
B. Developer Console
C. Metadata API
D. Bulk API
19 . A software company is using Salesforce to track the companies they sell their software to in the
Account object. They also use Salesforce to track bugs in their software with a custom object,
Bug__c.
As part of a process improvement initiative, they want to be able to report on which companies have
reported which bugs. Each company should be able to report multiple bugs and bugs can also be
reported by multiple companies.
20. What are three characteristics of change set deployments? (Choose three.)
A. Change sets can deploy custom settings data.
B. Change sets can only be used between related organizations.
C. Deployment is done in a one-way, single transaction.
D. Sending a change set between two orgs requires a deployment connection.
E. Change sets can be used to transfer records.
21 . A developer deployed a trigger to update the status__c of Assets related to an Account when the
Account''s status changes and a nightly integration that updates Accounts in bulk has started to fail
with limit failures.
What should the developer change about the code to address the failure while still having the code
update all of the Assets correctly?
A Change the gerAssetsToUpdac= method to process all Accounts in one call and call it outside of the for loop
that starts on line 03.
B Add a LIMIT clause to the SOQL query on line 16 to limit the number of Assets queried for an Account.
C Move all of the logic to a Queueable class that queries for and updates the Assets and call it from the trigger.
D Add List<Asset> assets = [SELECT Id, Status__c FROM Asset WHERE AccountId = :acctId] to line 14 and iterate
over the assets list in the for loop on line 15.
22 . A developer is tasked with building a custom Lightning web component to collect Contact information.
The form will be shared among many different types of users in the org. There are security requirements that
only certain fields should be edited and viewed by certain groups of users.
What should the developer use in their Lightning Web Component to support the security requirements?
A. force-input-field
B. ui-input-field
C. aura-input-field
D. lightning-input-field
23 . Which three Salesforce resources can be accessed from a Lightning web component' (Choose 3
answers)
A. Third-party web components
B. Content asset files
C. All external libraries
D. SVG resources
E. Static resources
24 . A software company uses the following objects and relationships:
What should be done to share a specific Case_Defect_c record with the user?
A. ●Share the Case_Defect_c record.
B. ●Share the parent Defect_c record.
C. ●Share the parent Case record.
D. ●Share the parent Case and Defect_c records.
25 . In terms of the MVC paradigm, what are two advantages of implementing the layer of a
Salesforce application using Aura Component-based development over Visualforce?
( Choose 2 answers)
26 . Flow builder uses an apex Action to provide additional information about multiple Contacts,
stored in a custom class, contactInfo. Which is the correct definition of the Apex method that gets
additional information?
A. @InvocableMethod(Label='additional Info')
public ContactInfo(Id contactId)
{ /implementation/ }
B. @InvocableMethod(label='Additional Info')
public List<ContactInfo> getInfo(List<Id> contactIds)
{ /implementation/ }
C. @invocableMethod(label)='Additional Info')
public static List<ContactInfo> getInfo(List<Id> contactIds)
{ /Implementation/ }
D. @InvocableMethod(label='additional Info')
public static ContactInfo getInfo(Id contactId)
{ /implementation/ }
How should this be enforced so that the component works for both users without showing any
errors?
29 . Which annotation should a developer use on an Apex method to make it available to be wired to
a property in a Lightning web component?
A. @RemoteAction(cacheable=true)
B. @AuraEnabled
C. @RemoteAction
D. @AuraEnabled(cacheable=true)
30 . What are two use cases for executing Anonymous Apex code? Choose 2 answers
31 . Consider the following code snippet for a Visualforce page that is launched using a Custom
Button on the Account detail page layout.
<apex:page standardController-"Account">
<apex:page>
When the Save button is pressed the developer must perform a complex validation that involves
multiple objects and, upon success, redirect the user to another Visualforce page.
What can the developer use to meet this business requirement?
B. Controller extensions
A. 4
B. 2
C. 3
D. 1
34 . What are two ways a developer can get the status of an enquered job for a class that queueable
interface? ( Choose 2 answers)
36 . The following Apex method is part of the ContactService class that is called from a trigger:
How should the developer modify the code to ensure best practice are met?
What should a developer consider for an environment that has over 10,000 Case records?
38 . Universal Containess wants Opportunities to no longer be editable when its reaches the
Closed/Won stage.
Which two strategies can a developer use to accomplish this? (Choose 2 answers)
39 . 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 ISV's 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.
41 . A developer created a child Lightning web component nested inside a parent Lightning web
component. The parent component needs to pass a string value to the child component.
A. The parent component can use a custom event to pass the data to the child component.
B. The parent component can invoke a public method in the child component.
C. The parent component can use a public property to pass the data to the child component.
D. The parent component can use the Apex controller class to send data to the child component.
42 . What are two benefits of using declarative customizations over code?(Choose 2 answers)
A. Declarative customizations automatically update with each Salesforce release.
B. Declarative customizations automatically generate test classes.
C. Declarative customizations cannot generate run time errors.
D. Declarative customizations generally require less maintenance
43 . A developer must provide custom user interfaces when users edit a Contact in either Salesforce
Classic or Lightning Experience.
What should the developer use to override the Contact's Edit button and provide this functionality?
A. Use a Max Roll-Up Summary field on the Latest availability date fields.
C. Use a DAYS formula on each of the availability date fields and a COUNT Roll-Up Summary field on
the Order.
45 . Which two are phases in the Salesforce Application Event propagation framework? (Choose
two.)
A. Bubble
B. Default
C. Control
D. Emit
46 . Universal Container(UC) wants to lower its shipping cost while making the shipping process
more efficient. The Distribution Officer advises UC to implement global addresses to allow multiple
Accounts to share a default pickup address. The Developer is tasked to create the supporting object
and relationship for this business requirement and uses the Setup Menu to create a custom object
called "Global Address". Which field should the developer ad to create the most efficient model that
supports the business need?
A. Add a Lookup field on the Account object to the Global Address object.
B. Add a Lookup field on the Global Address object to the Account object
C. Add a Master-Detail field on the Account object to the Global Address object
D. Add a Master-Detail field on the Global Address object to the Account object.
47 . Which statement generates a list of Leads and Contacts that have a field with the phrase
'ACME'?
A. List <sObject> searchList = (FIND "ACME" IN ALL FIELDS RETURNING Contact, Lead);
B. Map <sObject> searchList = (FIND "ACME" IN ALL FIELDS RETURNING Contact, Lead);
C. List<List <sObject>> searchList = (FIND "ACME" IN ALL FIELDS RETURNING Contact, Lead);
D. List<List < sObject>> searchList = (SELECT Name, ID FROM Contact, Lead WHERE Name like
'%ACME%');
48 . Universal Containers wants to back up all of the data and attachments in its Salesforce org once
month. Which approach should a developer use to meet this requirement?
A. Use the Data Loader command line.
B. Create a Schedulable Apex class.
C. Schedule a report.
D. Define a Data Export scheduled job.
A. Unify the before insert and before update triggers and use Process Builder for the delete action.
B. Create helper classes to execute the appropriate logic when a record is saved.
C. Maintain all three triggers on the Expense__c object, but move the Apex logic out of the trigger
definition.
D. Unify all three triggers in a single trigger on the Expense__c object that includes all events.
50 . A developer must create a DrawList class that provides capabilities defined in the Sortable and
Drawable interfaces.
B. ANSWER
C.
D.
51 . A developer creates a new Apex trigger with a helper class, and writes a test class that only
exercises 95% coverage of new Apex helper class
Change Set deployment to production fails with the test coverage warning:
"Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required"
What should the developer do to successfully deploy the new Apex trigger and helper class?
A. Increase the test class coverage on the helper class
B. Remove the falling test methods from the test class.
C. Run the tests using the 'Run All Tests' method.
D . Create a test class and methods to cover the Apex trigger
53 . A developer creates a batch Apex job to update a large number of records, and receives reports
of the job timing out and not completing.
What is the first step towards troubleshooting the issue?
A. Disable the batch job and recreate it with a smaller number of records.
B. Decreas the batch size to reduce the load on the system.
C Check the debug logs for the batch job.
D. Check the asynchronous job monitoring page to view the joh status and logs.
54. When using Salesforce DX, what does a developer need to enable to create and manage scratch
orgs?
A. Production
D. Dev Hub
C. Environment Hub
D. Sandbox
55 . A developer creates a Lightning web component that imports a method within an Apex class.
When a Validate button is pressed, the method runs to execute complex validations.
In this implementation scenario, which two options are part of the Controller according to the MVC
architecture? (Choose 2 answers)
A. JavaScript file
B. Apex Class
C. HTML
D. XML file
56 . A developer created these three Rollup Summary fields in the custom object, Project_c:
Total Timesheets_c
Total Approved_Timesheet_c
Total Rejected_Timesheet_c
The developer is asked to create a new field that shows the ratio between rejected and approved
timesheets for a given project.
Which should the developer use to implement the business requirement in order to minimize
maintenance overhead?
A. Apex trigger
B. Formula field
C. Record-triggered flow
D. Roll up summary field
57 . A developer wants to send an outbound message when a record meets a specific criteria.
Which two features satisfy this use case? (Choose 2 answers)
A. Next Best Action can be used to check the record criteria and send an outbound message
B. Flow Builder can be used to check the record criteria and send an outbound message.
C. Approval Process can be used to check the record criteria and send an outbound message without
Apex code.
D. Entitlement Process can be used to check the record criteria and send en outbound messa without
Apex code.
58 . Which statement is true regarding execution order when triggers are associated to the same
object and event?
A. Trigger execution order cannot be guaranteed.
B. Triggers are executed alphabetically by trigger name.
C. executed In the order they are modified.
D. Triggers are executed in the order they are created.
Recruiters have requested the ability to view whether the Contact's Mailing State value matches a
value selected on the Preferred_Locations_c field, within the Job_Applicationc record. Recruiters
would like this value to be kept in sync, if changes occur to the Contact's Mailing State or if the Job's
Preferred_Locations_c field is updated.
What is the recommended tool a developer should use to meet the business requirement?
A. Apex Digger
B. Process Builder
C. Record-triggered flow
D. Formula field
62 . The Job_Application_c custom object has a field that is a Master-Detail relationship to the
Contact object, where the Contact object is the Master. As part of a feature implementation, a
developer needs to retrieve a list containing all Contact records where the related Account Industry
is `Technology' while also retrieving the contact's Job_Application_c records.
Based on the object's relationships, what is the most efficient statement to retrieve the list of
contacts?
A. [SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE Account.Industry =
'Technology'];
B. [SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE Accounts.Industry =
'Technology'];
C. [SELECT Id, (SELECT Id FROM Job_Applications_c) FROM Contact WHERE Accounts.Industry =
'Technology'];
D. [SELECT Id, (SELECT Id FROM Job_Application_c) FROM Contact WHERE Account.Industry =
'Technology'];
63 . Universal Containers hires a developer to build a custom search page to help user- find the
Accounts they want. Users will be able to search on Name, Description, and a custom comments
field.
Which consideration should the developer be aware of when deciding between SOQ1 Mid SOSI ?
( Choose 2 answers )
A. SOQL is able to return more records.
B. SOQL is faster for text searches.
C. SOSL is able to return more records.
D. SOSL is faster for tent searches
64 . A developer needs to allow users to complete a form on an Account record that will create a
record for a custom object.
The form needs to display different fields depending on the user’s job role. The functionality should
only be available to a small group of users.
Which three things should the developer do to satisfy these requirements? ( Choose 3 answers )
A . Add a dynamic action to the Account record page.
B . Create a custom permission for the users.
C . Create a Lightning web component.
D . Add a dynamic action to the user’s assigned page layouts.
E . Create a dynamic form.