pd1 Dumps
pd1 Dumps
2. When a user edits the Postal Code on an Account, a custom Account text field
named "Timezone" must be updated based on the values in a
PostalCodeToTimezone__c custom object.
Which two automation tools can be used to implement this feature?
A Quick actions
B. Approval process
C Account trigger
D. Fast Field Updates record-triggered flow
6. The value of the account type field is not being displayed correctly on the page.
Assuming the custom controller is properly referenced on the Visualforce page, what
should the developer do to correct the problem?
A. Add a getter method for the actType attribute.
B. Change theAccount attribute to public.
C. Add with sharing to the custom controller.
D. Convert theAccount.Type to a String.
8. What can be used to override the Account's standard Edit button for Lightning
Experience?
A. Lightning action
B. Lightning page
C. Lightning component
D. Lightning flow
9 . A developer created this Apex trigger that calls MyClass.myStaticMethod:
trigger myTrigger on Contact (before insert)
{ MyClass.myStaticMethod(trigger.new); }
The developer creates a test class with a test method that calls
MyClass.myStaticMethod directly, resulting in 81% overall code coverage.
What happens when the developer tries to deploy the trigger and two classes to
production, assuming no other code exists?
A. The deployment passes because both classes and the trigger were included in the
deployment.
B. The deployment fails because no assertions were made in the test method.
C. The deployment passes because the Apex code has the required >75% code
coverage.
D. The deployment falls because the Apex trigger has no code coverage.
10. A developer needs to create a baseline set of data (Accounts, Contacts, Products,
Assets) for an entire suite of Apex tests allowing them to test isolated requirements
for various types of Salesforce cases.
Which approach can efficiently generate the required data for each unit test?
A. Create a mock using the HttpCalloutMock interface.
B. Use @TestSetup with a void method.
C. Add @IsTest(seeAllData=true) at the start of the unit test class.
D. Create test data before Test.startTest() in the unit test.
12. A company has a custom object, Order_c, that has a required, unique external ID
field called Order_Number_c.
Which statement should be used to perform the DML necessary to insert new
records and update existing records in a list of Order__c records using the external ID
field?
A. merge orders;
B. merge orders Order_Number__c;
C. upsert orders Order_Number__c;
D. upsert orders;
13. An org has an existing flow that edits an Opportunity with an Update Records
element. A developer must update the flow to also create a Contact and store the
created Contact's ID on the Opportunity.
Which update must the developer make in the flow?
A. Add a new Update Records element.
B. Add a new Roll Back Records element.
C. Add a new Create Records element.
Add a new Get Records element.
14. A developer needs to create a baseline set of data (Accounts, Contacts, Products,
Assets) for an entire suite of tests allowing them to test independent requirements
for various types of Salesforce Cases.
Which approach can efficiently generate the required data for each unit test?
A. Create a mock using the Stub API.
B. Create test data before Test.startTest() in the unit test.
C. Use @TestSetup with a void method.
D. Add @IsTest(seeAllData=true) at the start of the unit test class
15. Which Lightning Web Component custom event property settings enable the
event to bubble up the containment hierarchy and cross the Shadow DOM boundary?
A. bubbles: true, composed: false
B. bubbles: false, composed: false
C. bubbles: true, composed: true
D. bubbles: false, composed: true
16. Universal Containers needs to create a custom user interface component that
allows users to enter information about their accounts. The component should be
able to validate the user input before saving the information to the database.
What is the best technology to create this component?
A. Flow
B. Lightning Web Components
C. Visualforce
D. VUE JavaScript framework
17. How should a developer write unit tests for a private method in an Apex class?
A. Use the SeeAllData annotation.
B. Add a test method in the Apex class.
C. Mark the Apex class as global.
D. Use the @TestVisible annotation.
D. String query = ‘SELECT Id FROM Account WHERE Name LIKE \‘%’ + name +
‘%\’’;
List <Account> results = Database.query(query);
21. While developing an Apex class with custom search functionality that will be
launched from a Lightning Web Component, how can the developer ensure only
records accessible to the currently logged in user are displayed?
A. Use the WITH SECURITY_ENFORCED clause within the SOQL.
B. Use the inherited sharing keyword.
C. Use the with sharing keyword.
D. Use the without sharing keyword.
23. What can be easily developed using the Lightning Component framework?
A. Salesforce Classic user interface pages
B. Lightning Pages
C. Customized JavaScript buttons
D. Salesforce integrations
24. While working in a sandbox, an Apex test fails when run in the Test Runner.
However, executing the Apex logic in the Execute Anonymous window succeeds with
no exceptions or errors.
Why did the method fail in the sandbox test framework but succeed in the Developer
Console?
A. The test method does not use System.runAs to execute as a specific user.
B. The test method is calling an @future method.
C. The test method relies on existing data in the sandbox.
D. The test method has a syntax error in the code.
25. How many Accounts will be inserted by the following block of code?
for (Integer i=0; i < 500; i++) (
Account a = new Account (Name='New Account ‘+ i);
insert a;
}
A. 100
B. 0
C. 150
D. 500
26. Which two characteristics are true for Lightning Web Component custom events?
A. Data may be passed in the payload of a custom event using @wire decorated
properties.
B. Data may be passed in the payload of a custom event using a property called
detall.
C. By default a custom event only propagates to its immediate container and to its
immediate child component.
D. By default a custom event only propagates to it's Immediate container.
27. Cloud Kicks has a multi-screen flow that its call center agents use when handling
inbound service desk calls.
At one of the steps in the flow, the agents should be presented with a list of order
numbers and dates that are retrieved from an external order management system in
real time and displayed on the screen.
What should a developer use to satisfy this requirement?
A. An outbound message
B. An Apex REST class
C. An Apex controller
D. An invocable method
28. Where are two locations a developer can look to find information about the
status of batch or future methods?
A. Developer Console
B. Apex Jobs
C. Paused Flow Interviews component
D. Apex Flex Queue
29. A lead developer creates a virtual class called "OrderRequest". Consider the
following code snippet:
public class CustomerOrder(
//code implementation
}
How can a developer use the OrderRequest class within the CustomerOrder class?
A. @Extends (class="OrderRequest")
public class CustomerOrder
B. public class CustomerOrder implements Order
C. public class Customerorder extends OrderRequest
D. @Implements (class="OrderRequest")
public class CustomerOrder
30. What is the value of the Trigger.old context variable in a before insert trigger?
A. An empty list of sObjects
B. Undefined
C. null
D. A list of newly created sObjects without IDs
34. A Next Best Action strategy uses an Enhance element that invokes an Apex
method to determine a discount level for a Contact, based on a number of factors.
What is the correct definition of the Apex method?
A. @InvocableMethod
global List<List<Recommendation>> getLevel (List<ContactWrapper> input)
{/*implementation"/}
B. @InvocableMethod
global Recommendation getlevel (ContactWrapper input)
{/*implementation"/}
C. @InvocableMethod
global static ListRecommendation getLevel (List<ContactWrapper input)
{/*implementation"/}
D. @InvocableMethod
global static List<List<Recommendation>>
getLevel ( List <ContactWrapper> input)
36. Universal Containers has developed custom Apex code and Lightning Components
in a Sandbox environment. They need to deploy the code and associated
configurations to the Production environment.
What is the recommended process for deploying the code and configurations to
Production?
A. Use the Force.com IDE to deploy the Apex code and Lightning Components.
B. Use the Ant Migration Tool to deploy the Apex code and Lightning Components.
C. Use a change set to deploy the Apex code and Lightning Components.
D. Use Salesforce CLI to deploy the Apex code and Lightning Components.
37. In the following example, which sharing context will myMethod execute when it
is invoked?
public Class myClass {
public void myMethod() { /* implementation */ }
}
A. Sharing rules will be enforced by the instantiating class.
B. Sharing rules will be enforced for the running user.
C. Sharing rules will not be enforced for the running user.
D. Sharing rules will be inherited from the calling context.
38. What are two considerations for deploying from a sandbox to production?
A. At least 75% of Apex code must be covered by unit tests.
B. Unit tests must have calls to the System.assert method.
C. Should deploy during business hours to ensure feedback can be quickly addressed.
D. All triggers must have at least one line of test coverage.
40. Universal Containers has a Visualforce page that displays a table of every
Container__c being rented by a given Account. Recently this page is failing with a
view state limit because some of the customers rent over 10,000 containers.
What should a developer change about the Visualforce page to help with the page
load errors?
A. Implement pagination with an OffsetController.
B. Implement pagination with a StandardSetController.
C. Use JavaScript remoting with SOQL Offset.
D. Use lazy loading and a transient List variable.
41. Universal Containers decides to use purely declarative development to build out a
new Salesforce application.
Which two options can be used to build out the business logic layer for this
application?
A. Record-Triggered Flow
B. Batch Jobs
C. Remote Actions
D. Validation Rules
42. A custom object Trainer__c has a lookup field to another custom object Gym__c.
Which SOQL query will get the record for the Viridian City Gym and all it's trainers?
A. SELECT ID FROM Trainer__c WHERE Gym_r.Name = 'Viridian City Gym’
B. SELECT ID, (SELECT ID FROM Trainer__c) FROM Gym__C WHERE Name =
'Viridian City Gym’
C. SELECT ID, (SELECT ID FROM Trainers__r) FROM Gym__C WHERE Name =
'Viridian City Gym’
D. SELECT ID, (SELECT ID FROM Trainer__c) FROM Gym__C WHERE Name =
'Viridian City Gym’
43. Which three resources in an Aura component can contain JavaScript functions?
A. Style
B. Renderer
C. Controller
D. Design
E. Helper
44. A developer created a custom order management app that uses an Apex class.
The order is represented by an Order object and an OrderItem object that has a
master-detail relationship to Order. During order processing, an order may be split
into multiple orders.
What should a developer do to allow their code to move some existing OrderItem
records to a new Order record?
A. Add without sharing to the Apex class declaration.
B. Change the master-detail relationship to an external lookup relationship.
C. Create a Junction object between OrderItem and Order.
D. Select the Allow reparenting option on the master-detail relationship.
47. An Opportunity needs to have an amount rolled up from a custom object that is
not in a master-detail relationship.
How can this be achieved?
A. Write a trigger on the Opportunity object and use tree sorting to sum the amount
for all related child objects under the Opportunity.
B. Use the Streaming API to create real-time roll-up summaries.
C. Write a trigger on the child object and use an aggregate function to sum the
amount for all related child objects under the Opportunity.
D. Use the Metadata API to create real-time roll-up summaries.
A. Indirect Lookup
B. External ID and Unique
C. Direct Lookup
D. Lookup
51. A developer created a trigger on a custom object. This custom object also has
some dependent pick lists.
According to the order of execution rules, which step happens first?
A. The original record is loaded from the database.
B. System validation is run for maximum field lengths
C. Old values are overwritten with the new record values.
D. JavaScript validation is run in the browser.
52. Universal Containers implemented a private sharing model for the Account
object. A custom Account search tool was developed with Apex to help sales
representatives find accounts that match multiple criteria they specify. Since its
release, users of the tool report they can see Accounts they do not own.
What should the developer use to enforce sharing permissions for the currently
logged in user while using the custom search tool?
A. Use the with sharing keyword on the class declaration.
B. Use the without sharing keyword on the class declaration.
C. Use the Userinfo Apex class to filter all SOQL queries to returned records owned by
the logged-in user.
D. Use the schema describe calls to determine if the logged-in user has access to
the Account object.
53. Universal Containers has a support process that allows users to request support
from its engineering team using a custom object, Engineering_Support_c.
Users should be able to associate multiple Engineering_Support__c records to a
single Opportunity record. Additionally, aggregate information about the
Engineering_Support__c records should be shown on the Opportunity record.
Which relationship field should be implemented to s upport these requirements?
A. Lookup field from Opportunity to Engineering Support__c
B: Master-detail field from Engineering support__c to Opportunity
C. Master-detail field from Opportunity to Engineering_Support__c
D. Lookup field from Engineering_Support__c to Opportunity
54. A developer is creating an app that contains multiple Lightning web components.
One of the child components is used for navigation purposes. When a user clicks a
button called Next in the child component, the parent component must be alerted so
it can navigate to the next page.
How should this be accomplished?
A. Update a property on the parent.
B. Call a method in the Apex controller.
C. Fire a notification.
D. Create a custom event.
56. Universal Containers is building a recruiting app with an Applicant object that
stores information about an individual person and a Job object that represents a job.
Each applicant may apply for more than one job.
What should a developer implement to represent that an applicant has applied for a
job?
A. Junction object between Applicant and Job
B. Lookup field from Applicant to Job
C. Master-detail field from Applicant to Job
D. Formula field on Applicant that references Job
57. A developer is implementing an Apex class for a financial system. Within the class,
the variables 'creditAmount' and 'debitAmount" should not be able to change once a
value is assigned.
In which two ways can the developer declare the variables to ensure their value can
only be assigned one time?
A. Use the static keyword and assign its value in a static initializer.
B. Use the final keyword and assign its value in the class constructor.
C. Use the final keyword and assign its value when declaring the variable.
D. Use the static keyword and assign its value in the class constructor.
59. Developers at Universal Containers (UC) use version control to share their code
changes, but they notice that when they deploy their code to different environments
they often have failures. They decide to set up Continuous Integration (CI).
What should the UC development team use to automatically run tests as part of their
CI process?
A. Salesforce CLI
B. Visual Studio Code
C. Force.com Toolkit
D. Developer Console
60. A developer is asked to prevent anyone other than a user with Sales Manager
profile from changing the Opportunity Status to Closed Lost if the lost reason is blank.
Which automation allows the developer to satisfy this requirement in the most
efficient manner?
A. An Apex trigger on the Opportunity object
B. An error condition formula on a validation rule on Opportunity
C. A record trigger flow on the Opportunity object
D. An approval process on the Opportunity object
61. A developer created a trigger on the Account object and wants to test if the
trigger is properly bulkified. The developer team decided that the trigger should be
tested with 200 account records with unique names.
What two things should be done to create the test data within the unit test with the
least amount of code?
A. Use the @isTest (seeAllData = true) annotation in the test class.
B. Use the @isTest(isParallel = true) annotation in the test class.
C. Create a static resource containing test data.
D. Use Test.loadData to populate data in your test methods.
62. A business has a proprietary Order Management System (OMS) that creates
orders from its website and fulfills the orders. When the order is created in the OMS,
an integration also creates an order record in Salesforce and relates it to the contact
as identified by the email on the order. As the order goes through different stages in
the OMS, the integration also updates it in Salesforce.
The business notices that each update from the OMS creates a new order record in
Salesforce.
Which two actions should prevent the duplicate order records from being created in
Salesforce?
A. Use the order number from the OMS as an external ID.
B. Ensure that the order number in the OMS is unique.
C. Use the email on the contact record as an external ID.
D. Write a trigger on the Order object to delete the duplicates.
63. Which three data types can a SOQL query return?
A. Double
B. Long
C. sobject
D. Integer
E. List
64. A developer created a new after insert trigger on the Lead object that creates
Task records for each Lead.
After deploying to production, an existing outside integration that inserts Lead
records in batches to Salesforce is occasionally reporting total batch failures being
caused by the Task insert statement. This causes the integration process in the
outside system to stop, requiring a manual restart.
Which change should the developer make to allow the integration to continue when
some records in a batch cause failures due to the Task insert statement, so that
manual restarts are not needed?
A. Use the Database method with allorNone set to false.
B. Deactivate the trigger before the integration runs.
C. Remove the Apex class from the integration user's profile.
D. Use a try-catch block after the insert statement.
65. Which two statements are true about using the @testSetup annotation in an
Apex test class?
A. Records created in the test setup method cannot be updated in Individual test
methods.
B. In a test setup method, test data is inserted once and made available for all test
methods in the test class.
C. A method defined with the @testSetup annotation executes once for each test
method in the test class and counts towards system limits.
D. The testSetup annotation is not supported when the @isTest(SeeAllData=True)
annotation is used.