Professional Documents
Culture Documents
PD 1
PD 1
PDI
Platform Developer I
(SU22)
Version: 24.0
Web: www.marks4sure.com
Email: support@marks4sure.com
IMPORTANT NOTICE
Feedback
We have developed quality product and state-of-art service to ensure our customers interest. If you have any
suggestions, please feel free to contact us at feedback@marks4sure.com
Support
If you have any questions about our product, please provide the following items:
exam code
screenshot of the question
login id/email
please contact us at support@marks4sure.com and our technical experts will provide support within 24 hours.
Copyright
The product of each order has its own encryption code, so you should use it independently. Any unauthorized
changes will inflict legal punishment. We reserve the right of final explanation for this statement.
Practice Test Salesforce - PDI
Question #:1
A developer created a trigger on the Account object and wants to test if the trigger is properly bulk field. 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?
Choose 2 answers
Answer: B D
Question #:2
A developer is creating a page that allows users to create multiple Opportunities. The developer is asked to
verify the current user's default } |
Opportunity record type, and set certain default values based on the record type before inserting the record. i, J
Calculator
How can the developer find the current user's default record type? ns
A. Query the Profile where the ID equals userInfo.getProfileID() and then use the
profile.Opportunity.getDefaultRecordType() | |
method. ] |
Create the opportunity and check the opportunity.recordType before inserting, which will have the
Answer: B
Question #:3
AW Computing (AWC) handles orders In Salesforce and stores Its product Inventory In after, inventory c,
on a custom object, Product c. When order for a Product c Is placed, the inventory c field Is reduced by
the quantity of the order using an Apex trigger.
AWC wants the real-time inventory reduction for a product to be sent to many of Its external systems,
including some future systems the company Is currently planning.
What should a developer add to the code at the placeholder to meet these requirements?
A)
B)
C)
D)
A. Option
B. Option
C. Option
D. Option
Answer: A
Question #:4
What are three ways for a developer to execute tests in an org? Choose 3.
A. Bulk API
B. Tooling API
C. Setup Menu
D. Salesforce DX
E. Metadata API.
Answer: B C D
Explanation
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_testing.htm
https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_apextestsuit
Question #:5
A Licensed_Professional c custom object exist in the system with two Master-Detail fields for the following
objects: Certification c and Contact. Users with the "Certification Representative" role can access the
Certification records they own and view the related Licensed Professionals records, however users with the
"Salesforce representative" role report they cannot view any Licensed professional records even though they
own the associated Contact record. What are two likely causes of users in the "Sales Representative" role not
being able to access the Licensed Professional records? Choose 2 answers
A. The organization's sharing rules for Licensed_Professional c have not finished their recalculation
process.
B. The organization recently modified the Sales representative role to restrict Read/Write access to
Licensed_Professional c
C. The organization has a private sharing model for Certification c, and Contact is the primary
relationship in the Licensed_Professional c object
D. The organization has a private sharing model for Certification c, and Certification c is the primary
relationship in the Licensed_Professional c object.
Answer: A D
Question #:6
In the following example, which sharing context will myMethod execute when it is invoked?
Answer: A
Question #:7
Which three code lines are required to create a Lightning component on a Visualforce page? Choose 3 answers
A. $Lightning.createComponent (when we create component in JavaScript using reference to the lightning app)
B. <apex:slds/>
C. $Lightning.useComponent
D. $Lightning.use (To reference either your org’s namespace, or the namespace of the managed package that
provides the app)
E. <apex:includeLightning/> (component loads the JavaScript file used by Lightning Components for
Visualforce)
Answer: A D E
Question #:8
A developer needs to confirm that an Account trigger is working correctly without changing the organization’s
data. What would the developer do to test the Account trigger?
A. Use the Test menu on the developer Console to run all test classes for the account trigger.
B. Use the New button on the Salesforce Accounts Tab to create a new Account record.
C. Use the Open Execute Anonymous feature on the Developer Console to run an ‘insert Account’ DML
statement.
D. Use Deply from the Force.com IDE to deploy an ‘insert Account’ Apex class.
Answer: A
Question #:9
A developer has an integer variable called maxAttempts. The developer meeds to ensure that once
maxAttempts is initialized, it preserves its value for the length of the Apex transaction; while being able to
share the variable's state between trigger executions. How should the developer declare maxAttempts to meet
these requirements?
Answer: C
Question #:10
A developer needs an Apex method that can process Account or Contact records. Which method signature
should the developer use?
Answer: B
Question #:11
Universal Containers has an order system that uses on Order Number to identify an order for customers service
agents. Order records will be imported into Salesforce.
A. Lookup
B. Direct Lookup
D. Indirect Lookup
Answer: C
Question #:12
A developer receives an error when trying to call a global server-side method using the
@remoteAction decorator.
Answer: B
Question #:13
Which two are best practices when it comes to component and application event handling? (Choose two.)
A. Reuse the event logic in a component bundle, by putting the logic in the helper.
B. Use component events to communicate actions that should be handled at the application level.
C. Handle low-level events in the event handler and re-fire them as higher-level events.
Answer: A D
Question #:14
Since Aura application events follow the traditional publish-subscribe model, which method is used to fire an
event?
A. ernit()
B. fireEvent()
C. fire()
D. registerEvent()
Answer: C
Question #:15
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 the component available?
Answer: A B
Question #:16
A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of
test allowing them to test independent requirements various types of Salesforce Cases.
Which approach can efficiently generate the required data for each unit test?
Answer: A
Question #:17
Which Apex class contains methods to return the amount of resources that have been used for a particular
governor, such as the number of DML statements?
A. Exception
B. Messaging
C. OrgLimits
D. Limits
Answer: D
Question #:18
What are three capabilities of the <ltng : require> tag when loading JavaScript resources in Aura components?
Choose 3 answers
Answer: B C D
Question #:19
Which code should be used to update an existing Visualforce page that uses standard
Visualforce components so that the page matches the look and feel of Lightning Experience?
A. <apex:page lightningStyleSheets=”true”> (used to apply the same styles as that is applied in Visualforce
page in lightning page [NOTE: Doesn’t take in the custom style applied to buttons])
D. apex:actionStatus
Answer: A
Question #:20
A developer has a VF page and custom controller to save Account records. The developer
wants to display any validation rule violation to the user. How can the developer make sure
Answer: B
Explanation
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_message.htm
Question #:21
A developer Is asked to create a Visualforce page that lists the contacts owned by the current user. This
component will be embedded In a Lightning page.
Without writing unnecessary code, which controller should be used for this purpose?
B. Standard controller (enforces all the standard setting which defines security settings of the user)
C. Lightning controller (it allows line side controllers that respond to events for both client and server side)
D. Custom controller (controllers are user-defined, they don’t leverage the standard controllers, they don’t
depend on security settings of the user, it runs on system mode)
Answer: B
Question #:22
Answer: A B E
Question #:23
Universal Containers has large number of custom applications that were built using a third-party javaScript
framework and exposed using Visualforce pages. The Company wants to update these applications to apply
styling that resembles the look and feel of Lightning Experience. What should the developer do to fulfill the
business request in the quickest and most effective manner?
A. Incorporate the Salesforce Lightning Design System CSS stylesheet into the JavaScript applications.
D. Enable Available for Lightning Experience, Lightning Communities, and the mobile app on Visualforce
pages used by the custom application.
Answer: A
Question #:24
Which two settings must be defined in order to update a record of a junction object? Choose 2 answers
Answer: B C
Question #:25
What are two ways a developer can get the status of an enqueued job for a class that queueable
interface?Choose 2 answers
B. View the apex flex Queue (Helps to view jobs which are in hold position)
C. View the apex Jobs page (Helps us view all the apex jobs along with their status)
D. Query the AsyncApexJob object (for methods that are annotated with future methods. We need to query to
find the ones which are queued and are meant to be executed asynchronously))
Answer: B C
Question #:26
Which declarative process automation feature supports iterating over multiple records?
A. Flows
B. Validation Rules
C. Approval Process
D. Workflow rules
Answer: A
Question #:27
Which three statements are accurate about debug logs? Choose 3 answers
B. Debug Log levels are cumulative, where FINE log level includes all events logged at the DEBUG,
INFO, WARN, and ERROR levels.
C. Amount of information logged in the debug log can be controlled by the log levels.
D. To View Debug Logs, "Manager Users" or "View All Data" permission is needed.
E. To View Debug Logs, "Manager Users" or "Modify All Data" permission is needed.
Answer: A B C
Question #:28
A. Controllers
B. helper
C. Design
D. Style
E. Renderer
Answer: A B E
Question #:29
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?
Answer: A
Question #:30
A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system.
Within the class, the developer identifies the following method as a security threat:
List<Contact> performSearch(String lastName){
return Database.query('Select Id, FirstName, LastName FROM Contact WHERE LastName Like
%'+lastName+'%); } What are two ways the developer can update the method to prevent a SOQL injection
attack? Choose 2 answers
A. Use variable binding and replace the dynamic query with a static SOQL.
B. Use the escapeSingleQuote method to sanitize the parameter before its use.
D. Use the @Readonly annotation and the with sharing keyword on the class.
Answer: A B
Question #:31
Universal Containers wants Opportunities to no longer be editable when reaching the Closed/Won stage.
Answer: A
Question #:32
Given the following code snippet, that is part of a custom controller for a Visualforce page:
In which two ways can the try/catch be enclosed to enforce object and field-level permissions and prevent the
DML statement from being executed if the current logged-in user does not have the appropriate level of
access? Choose 2 answers
A. Use if (Schema.sobjectType.Contact.isUpdatable ( ) )
C. Use if (Schema.sObjectType.Contact.isAccessible ( ) )
Answer: A B
Question #:33
Which three operations affect the number of times a trigger can fire?
Choose 3 answers
A. Process Flows
B. Workflow Rules
D. Email messages
Answer: A B E
Question #:34
Einstein Next Best Action Is configured at Universal Containers to display recommendations to internal users
on the Account detail page.
If the recommendation is approved, a new opportunity record and task should be generated. If the
recommendation is rejected, an Apex method must be executed to perform a callout to an external system.
Which three factors should a developer keep in mind when implementing the Apex method?
Choose 3 answers
B. The method must use the @Future annotation. ( it is asynchronously calling an external system)
C. The method must use the @invocableMethod annotation. (only if we use platform automation tools like
flows and process builder. It is always static, public or global, Only one @invocable annotated method can
be made/declared in class )
Answer: B D E
Question #:35
Which two statements accurately represent the MVC framework implementation in Salesforce? Choose 2
answers
A. Validation rules enforce business rules and represent the Controller (C) part of the MVC framework
B. Lightning component HTML files represent the Model (M) part of the MVC framework.
C. Triggers that create records represent the Model (M) part of the MVC framework.
D. Standard and Custom objects used in the app schema represent the View (V) part of the MVC framework
Question #:36
Refer to the following code snippet for an environment that has more than 200 Accounts belonging to the
Technology' industry:
Choose 3 answers
A. Debug log levels are cumulative, where FINE log level includes all events logged at the DEBUG, INFO,
WARN, and ERROR levels.
C. Only the 20 most recent debug logs for a user are kept.
D. Debug logs can be set for specific users, classes, and triggers.
Answer: A D E
Question #:37
A developer wants to mark each Account in a List<Account> as either or Inactive based on the Last
Modified field value being more than 90 days.
Answer: D
Question #:38
Which two statements are true about using the @testSetup annotation in an Apex test class?
Choose 2 answers
A. Records created in the test setup method cannot be updated in individual test methods.
B. The @testSetup annotation is not supported when the isTest(SeeAllData=True) annotation is used.
D. A method defined with the @testSetup annotation executes once for each test method in the test class
and counts towards system limits.
Answer: B C
Question #:39
A. LastName
B. Name
C. AccountId
D. FirstName
Answer: A
Question #:40
What are two best practices when it comes to Lightning Web Component events?
A. Use event.target to communicate data to elements that aren't in the same shadow tree.
Answer: A C
Question #:41
A developer is asked to create a Visualforce page that displays some Account fields as well
Answer: A
Question #:42
The developer creates a test class with a test method that calls MyClass.mystaticMethod, 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 exist?
A. The deployment fails because the Apex trigger has no code coverage.
B. The deployment fails because no assertions were made in the test method.
C. The deployment passes because the Apex code has required (>75%) code coverage.
D. The deployment passes because both classes and the trigger were included in the deployment.
Answer: A
Question #:43
Managers at Universal Containers want to ensure that only decommissioned containers are able to be deleted
in the system. To meet the business requirement a Salesforce developer adds ^Decommissioned" as a picklist
value for the Status : custom field within the Contact c object.
Which tool should the developer use to enforce only Container records with a status of "Decommissioned" can
be deleted?
A. Apex trigger
C. Validation rule
Answer: A
Question #:44
What will be the output in the debug log in the event of a QueryException during a call to the @query
method in the following Example?
Answer: C
Question #:45
A developer has requirement to write Apex code to update a large number of account records on a nightly
basis. The system administrator needs to be able to schedule the class to run after business hours on an
as-needed basis.
Database. Batchable<sObject>
Answer: C
Question #:46
What can be used to override the Account's standard Edit button for Lightning Experience7
A. Lightning action
B. Lightning component
C. Lightning page
D. Lightning flow
Answer: B
Question #:47
Universal container wants a list button to display a visualforce page that allows users to edit multiple records
which visualforce feature supports this requirement.
Question #:48
D. 1 Account is inserted.
Answer: C
Question #:49
Universal Containers wants Opportunities to no longer be editable when it reaches the Closed/Won stage.
Choose 2 answers
C. Use a trigger.
Answer: C D
Question #:50
A. RemoteAction
B. HttpInvocable
C. AuraEnabled
D. RestResource
Answer: D
Question #:51
What is the value of the Trigger.old context variable in a Before Insert trigger?
B. Undefined
C. null
Answer: C
Question #:52
A developer has a Visualforce page and custom controller to save Account records. The developer wants to
display any validation rule violation to the user. How can the developer make sure that validation rule
violations are displayed?
Answer: B
Question #:53
A developer is implementing an Apex class for a financial system. Within the class, the
variables ‘creditAmount’ and ‘debtAmount’ should not be able to change once a value is
assigned. In which two ways can the developer declare the variables to ensure their value
A. Use the static keyword and assign its value in the class constructor.
B. Use the final keyword and assign its value in the class constructor.
C. Use the static keyword and assign its value in a static initializer.
D. Use the final keyword and assign its value when declaring the variable.
Answer: B D
Question #:54
A development team wants to use a deployment script to automatically deploy to a sandbox during their
development cycles.
Which two tools can they use to run a script that deploys to a sandbox?
Choose 2 answers
B. SFDX CLI
C. Change Sets
D. Developer Console
Answer: A B
Question #:55
Which two statements are true about Getter and Setter methods as they relate to Visualforce?
B. There is no guarantee for the order in which Getter methods are called.
Answer: C D
Question #:56
Answer: B
Question #:57
What are three considerations when using the @InvocableMethod annotation in Apex?
Choose 3 answers
B. A method using the @InvocableMethod annotation can have multiple input parameters.
E. Only one method using the @InvocableMethod annotation can be defined per Apex class.
Answer: C D E
Question #:58
A developer Edition org has five existing accounts. A developer wants to add 10 more accounts for …
The following code is executed in the Developer Console using the Executor Anonymous window:
How many total accounts will be in the org after this code is executed?
A. 5
B. 6
C. 10
D. 15
Answer: C
Question #:59
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 permission for the currently logged-in user while using the custom search
tool?
A. Use the schema describe calls to determine if the logged-in users has access to the Account object.
C. Use the UserInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user.
Answer: D
Question #:60
Universal Containers recently transitioned from Classic to Lighting Experience. One of its business processes
requires certain value from the opportunity object to be sent via HTTP REST callout to its external order
management system based on a user-initiated action on the opportunity page. Example values are as follow
Name
Amount
Account
Which two methods should the developer implement to fulfill the business requirement? (Choose 2 answers)
A. Create a Lightning component that performs the HTTP REST callout, and use a Lightning Action to
expose the component on the Opportunity detail page.
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 an after update trigger on the Opportunity object that calls a helper method using
@Future(Callout=true) to perform the HTTP REST callout.
D. Create a Visualforce page that performs the HTTP REST callout, and use a Visualforce quick action to
expose the component on the Opportunity detail page.
Answer: A C
Question #:61
A Visual Flow uses an apex Action to provide additional information about multiple Contacts, stored in a
custom class, contactInfo. Which is the correct definition of the Apex method that gets additional information?
A. @InvocableMethod(label='Additional Info')
{ /*implementation*/ }
B. @InvocableMethod(label='additional Info')
{ /*implementation*/ }
C. @invocableMethod(label)='Additional Info')
{ /*Implementation*/ }
D. @InvocableMethod(Label='additional Info')
{ /*implementation*/ }
Answer: C
Question #:62
Which code in a Visualforce page and/or controller might present a security vulnerability?
Answer: B
Question #:63
A Lightning component has a wired property, searchResults, that stores a list of Opportunities. Which
definition of the Apex method, to which the searchResults property is wired, should be used?
A. @AuraEnabled(cacheable=true)
B. @AuraEnabled(cacheable=true)
C. @AuraEnabled(cacheable=false)
D. @AuraEnabled(cacheable=false)
Answer: A
Question #:64
A. @AuraEnabled
B. @RestResource
C. @Remote Action
D. @Httplnvocable
Answer: B
Question #:65
An Approval Process is defined in the Expense_Item c. A business rule dictates that whenever a user
changes the Status to 'Submitted' on an Expense_Report c record, all the Expense_Item c records related to
the expense report must enter the approval process individually. Which approach should be used to ensure the
business requirement is met?
A. Create a Process Builder on Expense_Report c with a 'Submit for Approval' action type to submit
allrelated Expense_Item c records when the criteria is met.
B. Create two Process Builder, one on Expense_Report c to mark the related Expense_Item c
assubmittable and the second on Expense_Item c to submit the records for approval.
D. Create a Process Builder on Expense_Report c with an 'Apex' action type to submit all
relatedExpense_Item c records when the criteria is met.
Answer: B
Question #:66
An Opportunity needs to have an amount rolled up from a custom object that is not in a master-detail
relationship.
A. Write a trigger on the child object and use a red-black tree sorting to sum the amount for all related child
objects under the Opportunity.
B. Write a Process Builder that links the custom object to the Opportunity.
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
Answer: C
Question #:67
What should a developer consider for an environment that has over 10,000 Case records?
Answer: C
Question #:68
A developer must create a lightning component that allows users to input contact record
information to create a contact record, including a salary c custom field. what should the
developer use, along with a lightning-record-edit form, so that salary c field functions as a
currency input and is only viewable and editable by users that have the correct field levelpermissions on
salary C?
</lightning-input-field>
</lightning-formatted-number>
</lightning-input>
</lightning-input-currency>
Answer: A
Question #:69
Which three web technologies can be integrated into a Visualforce page? (Choose three.)
A. JavaScript
B. CSS
C. Java
D. PHP
E. HTML
Answer: A B E
Question #:70
A developer migrate functionality from Javascript Remoting to a lightning web component and wants to use the existing
getoppotunities() method to provide data. Which modification to the method is necessary?
A. The method must be decorated with (cacheable=true).
Answer: A
Question #:71
A Salesforce Administrator is creating a record-triggered flow. When certain criteria are met, the flow must
call an Apex method to execute complex validation involving several types of objects.
When creating the Apex method, which annotation should a developer use to ensure the method
A. @future
B. @RemoteAction
C. @InvocableMethod
D. @AuraEnabled
Answer: C
Question #:72
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.
Answer: A
Question #:73
Universal Containers has a Visualforce page that displays a table of every Container_c. being ……. Is falling
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?
Answer: D
Question #:74
What are two use cases for executing Anonymous Apex code? Choose 2 answers
Answer: B C
Question #:75
Universal Containers wants Opportunities to be locked from editing when reaching the Closed/Won stage.
Which two strategies should a developer use to accomplish this? Choose 2 answers
B. Use a trigger.
Answer: A B
Question #:76
Which statement generates a list of Leads and Contacts that have a field with the phrase 'ACME'?
A. List <sObject> searchList = (FIND "*ACME*" IN ALL FIELDS RETURNING Contact, Lead);
B. List<List <sObject>> searchList = (FIND "*ACME*" IN ALL FIELDS RETURNING Contact, Lead);
C. Map <sObject> searchList = (FIND "*ACME*" IN ALL FIELDS RETURNING Contact, Lead);
D. List<List < sObject>> searchList = (SELECT Name, ID FROM Contact, Lead WHERE Name like
'%ACME%');
Answer: B
Question #:77
Which two are phases in the Aura application event propagation framework? Choose 2 answers
A. Emit
B. Control
C. Default
D. Bubble
Answer: C D
Question #:78
A. 0
B. 1
C. 2
D. 3
Answer: C
Question #:79
A recursive transaction is limited by a DML statement creating records for these two objects:
1. Accounts
2. Contacts
A. The transaction fails only if the Contact trigger stack depth is greater or equal to 16.
B. The transaction succeeds as long as the Contact trigger stack depth is less than 16.
C. The transaction fails and all the changes are rolled back.
D. The transaction succeeds and all the changes are committed to the database.
Answer: D
Question #:80
A business has a proprietary Order Management System (OMS) that creates orders from their website and …
the order. When the order is created in the OMS, an integration also creates an order record in Salesforce …
relates it to the contact as identified by the email on the order. As the order goes through different stages in
OMS, the integration also updates it in Salesforce.
It is notified that each update from the OMS creates a new order record in Salesforce.
Which two actions prevent the duplicate order records from being created in Salesforce?
Choose 2 answers
Answer: A D
Question #:81
What should a developer use to obtain the Id and Name of all the Leads. Accounts, and Contacts that hove the
company name "Universal Containers"?
A. FIND 'Universal Containers' IN Name Fields RETURNING lead id, name), accounted, name),
contacted, name)
B. FIND Universal Containers' IN CompanyName Fields RETURNING lead(ld. name), accounted, name),
contacted, name)
C. SELECT lead(id, name). accountId, name), contacted, name) FROM Lead, Account, Contact WHERE
Name = "universal Containers'
Answer: A
Question #:82
The Account object in an organization has a master detail relationship to a child object called Branch. The
following automations exist:
• Duplicate rules
What two things should the developer consider while testing the trigger code?
Choose 2 answers
A. Rollup summary fields can cause the parent record to go through Save.
C. Duplicate rules are executed once all DML operations commit to the database.
Answer: A B
Question #:83
Which salesforce org has a complete duplicate copy of the production org including data
and configuration?
A. Partial Copy Sandbox(Has metadata as well as sample data stored in the Production org)
B. Production
Answer: D
Question #:84
Given the following block code: try{ List <Accounts> retrievedRecords = [SELECT Id FROM Account
WHERE Website = null]; }catch(Exception e){ //manage exception logic } What should a developer do to
ensure the code execution is disrupted if the retrievedRecordslist remains empty after the SOQL query?
A. Check the state of the retrieveRecords variable and throw a custom exception if the variable is empty.
B. Check the state of the retrievedRecords variable and use System.assert(false) if the variable is empty
C. Check the state of the retrievedRecords variable and access the first element of the list if the variable is
empty.
D. Replace the retrievedRecords variable declaration from a List of Account to a single Account.
Answer: B
Question #:85
Answer: D
Question #:86
An after trigger on the Account object performs a DML update operation on all of the child Opportunities of
an Account. There are no active triggers on the Opportunity object, yet a “maximum trigger depth exceeded”
error occurs in certain situations.
Which two reasons possibly explain the Account trigger firing recursively? (Choose two.)
A. Changes to Opportunities are causing cross-object workflow field updates to be made on the Account.
B. Changes to Opportunities are causing roll-up summary fields to update on the Account.
C. Changes are being made to the Account during an unrelated parallel save operation.
D. Changes are being made to the Account during Criteria Based Sharing evaluation.
Answer: A B
Question #:87
When importing and exporting data into Salesforce, which two statements are true?
Choose 2 answers
A. Bulk API can be used to import large data volumes in development environments without bypassing the
storage limits.
B. Bulk API can be used to bypass the storage limits when importing large data volumes in development
environments.
Answer: C D
Question #:88
How should a custom user interface be provided when a user edits an Account in Lightning Experience?
Answer: D
Question #:89
Universal Hiring is using Salesforce to capture job applications. A salesforce administrator created two custom
objects; Job c acting as the master object, Job application. : acting as the detail.
What is the recommended tool a developer should use to meet the business requirement?
A. Record-triggered flow
B. Process Builder
C. Formula field
D. Apex trigger
Answer: C
Question #:90
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 SOQL and SOSL?
Choose 2 answers
Answer: C D
Question #:91
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?
C. Create a test class to execute the business logic and run the test in the Developer Console.
Answer: A
Question #:92
Answer: B D
Question #:93
A developer needs to join data received from an integration with an external system with parent records in
Salesforce. The data set does not contain the Salesforce IDs of the parent records, but it does have a foreign
key attribute that can be used to identify the parent.
Which action will allow the developer to relate records in the data model without knowing the Salesforce ID?
B. Create and populate a custom field on the parent object marked as Unique
C. Create and populate a custom field on the parent object marked as an External ID.
Answer: D
Question #:94
A Visual Flow uses an apex Action to provide additional information about multiple Contacts, stored in a
custom class, contactInfo. Which is the correct definition of the Apex method that gets additional information?
A. @InvocableMethod(label='Additional Info')
{ /*implementation*/ }
B. @InvocableMethod(label='additional Info')
{ /*implementation*/ }
C. @invocableMethod(label)='Additional Info')
{ /*Implementation*/ }
D. @InvocableMethod(Label='additional Info')
{ /*implementation*/ }
Answer: C
Question #:95
A developer wants to retrieve the Contacts and Users with the email address 'dev@uc.com'.
Answer: A
Question #:96
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.
Answer: A
Question #:97
Which two types of process automation can be used to calculate the shipping cost for an Order when the Order
is placed and apply a percentage of the shipping cost of some of the related Order Products?
Choose 2 answers
A. Workflow Rule
B. Approval Process
C. Process Builder
D. Flow Builder
Answer: D
Question #:98
A developer needs to update an unrelated object when a record gets saved. Which two trigger types should the
developer create?
A. After insert
B. After update
C. Before update
D. Before insert
Answer: C D
Question #:99
The Sales Representative user should be able to see the commission-field on each record. The Sales Assistance
user should be able to see all field on the record except the commission field.
How should this be enforced so that the component works for both users without showing any errors?
B. Use Lightning Locker Service to enforce sharing rules and field-level security.
C. Use with SECURITY_EMFoRCED in the SOQL that fetches the data for the component.
Answer: D
Question #:100
Answer: B
Question #:101
Which Lightning code segment should be written to declare dependencies on a Lightning component,
c:accountList, that is used in a Visualforce page?
A)
B)
C)
D)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
Question #:102
Which two examples above use the system. debug statements to correctly display the results from the SOQL
aggregate queries? Choose 2 answers
A. Example 1
B. Example 2
C. Example 3
D. Example 4
Answer: B C
Question #:103
The following Apex method is part of the ContactService class that is called from a trigger: public static void
setBusinessUnitToEMEA(Contact thisContact){ thisContact.Business_Unit c = "EMEA" ; update
thisContact; } How should the developer modify the code to ensure best practice are met?
thisContact.Business_Unit c = 'EMEA' ;
update contacts[0];
thisContact.Business_Unit c = 'EMEA' ;
update contacts;
contacts.add(thisContact.Business_Unit c = 'EMEA');
update contacts;
contacts[0].Business_Unit c = 'EMEA' ;
update contacts[0];
Answer: C
Question #:104
A. The LeadId and Contactid fields on the standard Campaign Member object
B. A custom field, Link c, on the standard Contact object that looks up to an Account or a Campaign
Answer: C
Question #:105
Which two characteristics are true for Aura component events? Choose 2 answers
B. Depending on the current propagation phase, calling event. Stoppropagation () may not stop the event
propagation.
C. If a container component needs to handle a component event, add a includeFacets" true” attribute to its
handler.
Answer: A B
Question #:106
Which two operations can be performed using a formula field? Choose 2 answers
Answer: C D
Question #:107
A developer observes that an Apex test method fails in the Sandbox. To identify the issue, the developer
copies the code inside the test method and executes it via the Execute Anonymous tool in the Developer
Console. The code then executes with no exceptions or errors. Why did the test method fail in the sandbox and
pass in the Developer Console?
D. The test method does not use System.runAs to execute as a specific user.
Answer: B
Question #:108
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?
Answer: C
Question #:109
What should the developer use to ensure the data being Integrated is matched to the right records in
Salesforce?
A. Lookup field
B. External ID field
C. Formula field
D. External Object
Answer: B
Question #:110
What should the developer consider while testing the trigger code?
B. Workflow rules will fire only after the trigger has committed all DML operations to the database.
C. A workflow rule field update will cause the custom validation to run again.
Answer: D
Question #:111
What should a developer use to create a Visualforce section in the Account page layout that displays all of the
plan.. Account and all of the Plan_item_c records related to those plan_c records.
Answer: C
Question #:112
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.
Choose 3 answers
Answer: A B E
Question #:113
A developer created a child Lightning web component nested inside a parent Lightning web component,
parent component needs to pass a string value to the child component.
Choose 2 answers
A. The parent component can use a custom event to pass the data to the child component,
B. The parent component can use the Apex controller class to send data to the child component.
D. The parent component can use a public property to pass the data to the child component.
Answer: A D
Question #:114
Which process automation should be used to send an outbound message without using Apex code?
A. Workflow Rule
B. Process Builder
C. Approval Process
D. Flow Builder
Answer: A
Question #:115
As part of a data cleanup strategy, AW Computing wants to proactively delete associated opportunity records
when the related Account is deleted.
A. Workflow Rules
B. Scheduled job
C. Record-Triggered Flow
D. Process Builder
Answer: C
Question #:116
A developer wrote Apex code that calls out to an external system. How should a developer write the test to
provide test coverage?
Answer: B
Question #:117
An Apex method, getAccounts, that returns a List of Accounts given a search Term, is available for Lighting
Web components to use. What is the correct definition of a Lighting Web component property that uses the
getAccounts method?
A. @AuraEnabled(getAccounts, ‘$searchTerm’)
accountList;
B. @wire(getAccounts, ‘$searchTerm’)
accountList;
accountList;
accountList;
Answer: D
Explanation
https://developer.salesforce.com/docs/component-library/documentation/en/48.0/lwc/lwc.data_wire_service_abo
Question #:118
A. CalloutException
B. A custom Exception
C. NoAccessException
D. LimitException
Answer: D
Question #:119
Which three resources in an Aura Component can contain Javascript functions? Choose 3 answers
A. Controller
B. Helper
C. Renderer
Answer: A B C
Question #:120
Which two SOQL queries performed are safe from SOQL injections? Choose 2 answers
A. String query = 'SELECT Id FROM Account WHERE Name LIKE \''%' + name.noQuotes() + '%\'';
C. String query = 'SELECT Id FROM Account WHERE Name LIKE \''%' + name + '%\'';
Answer: B D
Question #:121
When using SalesforceDX, what does a developer need to enable to create and manage scratch orgs?
A. Production
B. Dev Hub
C. Environment Hub
D. Sandbox
Answer: B
Explanation
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs.htm
Question #:122
Universal Containers has implemented an order management application. Each Order can have one or more
Order Line items. The Order Line object is related to the Order via a master-detail relationship. For each Order
Line item, the total price is calculated by multiplying the Order Line item price with the quantity ordered.
What is the best practice to get the sum of all Order Line item totals on the Order record?
B. Quick action
C. Apex trigger
D. Formula field
Answer: A
Question #:123
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?
Answer: C
Question #:124
An org tracks customer orders on an Order object and the items of an Order on the Line Item object. The Line
Item object has a MasterDetail relationship to the order object. A developer has a requirement to calculate the
order amount on an Order and the line amount on each Line item based on quantity and price.
A. Implement the line amount as a numeric formula field and the order amount as a roll-up summary field.
B. Write a single before trigger on the Line Item that calculates the item amount and updates the order
amount on the Order.
C. Implement the Line amount as a currency field and the order amount as a SUM formula field.
D. Write a process on the Line item that calculates the item amount and order amount and updates the filed
on the Line Item and the order.
Answer: C
Question #:125
AW Computing tracks order information in custom objects called order c and order_Line_ c - Currently, all
shipping information is stored in the order c object.
The company wants to expand Its order application to support split shipments so that any number of
order_Line c records on a single order c can be shipped to different locations.
Answer: C
Question #:126
• Defect_c: a custom object to represent known issues with the company's software
• case_Defect c: a junction object between Case and Defector to represent that a defect Is a
customer issue
Answer: D
Question #:127
A developer must create a ShippingCalculator class that cannot be instantiated and must include a working
default implementation of a calculate method, that sub-classes can override. What is the correct
implementation of the ShippingCalculator class?
Answer: B
Explanation
the extending class can override the existing virtual methods by using the override keyword in the method
definition. Overriding a virtual method allows you to provide a different implementation for an existing
methodhttps://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_extending.htm
Question #:128
D. Salesforce integrations
Answer: B
Question #:129
Which two statements are accurate regarding Apex classes and interfaces?
Choose 2 answers
Answer: C D
Question #:130
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.
Answer: D
Question #:131
A developer has to identify a method in en Apex class that performs resource intensive actions in memory by
iterating over the result set of a SOQL statement on the account. The method also performs a SOQL statement
to save the changes to the database.
Which two techniques should the developer implement as a best practice to ensure transaction control and
avoid exceeding governor limits?
Choose 2 answers
A. Use the @ReadOnly annotation to bypass the number of rows returned by a SOQL.
D. Use the System.Limit class to monitor the current CPU governor limit consumption.
Answer: C D
Question #:132
Which three Salesforce resources can be accessed from a Lightning web component?
Choose 3 answers
A. SVG resources
D. Static resources
Answer: A D E
Question #:133
Universal Containers stores the availability date on each Line Item of an Order and Orders are only shipped
when all of the Line Items are available. Which method should be used to calculate the estimated ship date for
an Order?
B. Use a DAYS formula on each of the availability date fields and a COUNT Roll-Up Summary field on
the Order.
D. Use a Max Roll-Up Summary field on the Latest availability date fields.
Answer: D
Question #:134
What should a developer use to fix a Lightning web component bug in a sandbox?
A. Developer Console
B. Force.com IDE
C. Execute Anonumous
D. VS Code
Answer: D
Question #:135
Where are two locations a developer can look to find information about the status of asynchronous or future
methods? Choose 2 answers
B. Apex Jobs
Answer: A B
Question #:136
Which three statements are true regarding trace flags? (Choose three.)
D. If active trace flags are not set, Apex tests execute with default logging levels.
E. Trace flags can be set in the Developer Console, Setup, or using the Tooling API.
Answer: C D E
Question #:137
A developer writes a trigger on the Account object on the before update event that increments a count field. A
workflow rule also increments the count field every time that an Account is created or update. The field update
in the workflow rule is configured to not re-evaluate workflow rules. What is the value of the count field if an
Account is inserted with an initial value of zero, assuming no other automation logic is implemented on the
Account?
A. 3
B. 2
C. 1
D. 4
Answer: B
Question #:138
Universal Containers (UC) decided it will not to send emails to support personnel directly from Salesforce in
the event that an unhandled exception occurs. Instead, UC wants an external system be notified of the error.
What is the appropriate publish/subscribe logic to meet these requirements?
A. Publish the error event using the addError() method and have the external system subscribe to the event
using CometD.
B. Publish the error event using the Eventbus.publish() method and have the external system subscribe to
the event using CometD.
C. Have the external system subscribe to the BatchApexError event, no publishing is necessary.
D. Publish the error event using the addError() method and write a trigger to subscribe to the event and
notify the external system.
Answer: B
Question #:139
Which three data types can a SOQL query return? Choose 3 answers
A. List
B. Long
C. Integer
D. sObject
Answer: A C D
Question #:140
A developer created a custom order management app that uses an Apex class. The order is represented by an
Order object and an Orderltem 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 Orderltem records to a new Order
record?
Answer: D
Question #:141
What should a developer use to script the deployment and unit test execution as part of continuous integration?
A. Developer Console
B. Execute Anonymous
C. Salesforce CLI
D. VS Code
Answer: C
Question #:142
A developer needs to save a List of existing Account records named myAccounts to the database, but the
records do not contain Salesforce Id values. Only the value of a custom text field configured as an External ID
with an API name of Foreign_Key c is known.
Which two statements enable the developer to save the records to the database without an Id? (Choose two.)
A. Upsert myAccounts.Foreign_Key c;
D. Database.upsert(myAccounts).Foreign_Key c;
Answer: A C
Question #:143
A third-party vendor created an unmanaged Lightning web component. The Salesforce Administrator wishes
to expose the component only on Record Page Layouts.
Which two actions should the developer take to accomplish this business objective?
Choose 2 answers
Answer: B D
Question #:144
A developer wants to get access to the standard price book in the org while writing a test class that covers an
OpportunityLineItem trigger. Which method allows access to the price book?
B. Use @TestVisible to allow the test method to see the standard price book.
D. Use @IsTest (SeeAllData=True) and delete the existing standard price book
Answer: C
Question #:145
A developer is building custom search functionality that uses SOSL to search account and contact records that
match search terms provided by the end user. The feature is exposed through a Lightning web component, and
What is the maximum number of search terms the end user can provide to successfully execute the search
without exceeding a governor limit?
A. 20
B. 150
C. 200
D. 2,000
Answer: D
Question #:146
Answer: D
Explanation
QUESTION 160
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?
Account.Industry = ‘Technology’];
Accounts.Industry = ‘Technology’];
Account.Industry = ‘Technology’];
Answer: B
Question #:147
What should a developer do to check the code coverage of a class after running all tests?
A. View the Code Coverage column in the list view on the Apex Classes page.
B. View the Class Test Percentage tab on the Apex Class fist view m Salesforce Setup.
C. View Use cede coverage percentage for the class using the Overall Code Coverage panel in the
Developer Console Tests tab.
D. Select and run the class on the Apex Test Execution page in the Developer Console.
Answer: B
Question #:148
A. 2
B. 1
C. 3
Answer: D
Question #:149
Which two process automations can be used on their own to send Salesforce Outbound Message?
Choose 2 answers
A. Process Builder
B. Workflow Rule
C. Flow Builder
D. Strategy Builder
Answer: B C
Question #:150
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.
A. An Apex controller
C. An outbound message
D. An invocable method
Answer: B
Question #:151
• Calculate the line amount for each Line Item based on quantity selected and price.
Answer: A
Question #:152
which statement is true regarding execution order when triggers are associated to the same object and event?
A. Trigger execution order cannot be guaranteed. ( It can’t be guaranteed because the order of trigger execution
in this case depends on the condition of trigger)
(_Practice Test Salesforce - PDI
Pass Your Certification With Marks4sure Guarantee 64 of 123
B. executed In the order they are modified.
Answer: A
Question #:153
Which three statements are true regarding custom exceptions in Apex? (Choose three.)
E. A custom exception class can extend other classes besides the Exception class.
Answer: B D E
Question #:154
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?
B. Use Test.loadDataO < > and reference a CSV file in a static resource.
Answer: B
Question #:155
Management asked for opportunities to be automatically created for accounts with annual revenue greater than
$1,000,000. A developer created the following trigger on the Account object to satisfy this requirement.
Users are able to update the account records via the UI and can see an opportunity created for high annual
revenue accounts. However, when the administrator tries to upload a list of 179 accounts using Data Loader, It
fails with system. Exception errors.
Which two actions should the developer take to fix the code segment shown above?
Choose 2 answers
A. Check if all the required fields for Opportunity are being added on creation.
C. Move the DML that saves opportunities outside the for loop.
Answer: C D
Question #:156
How can a developer check the test coverage of active Process Builder and Flows deploying them in a
Changing Set?
Answer: D
Question #:157
A developer has a requirement to create an Order When an Opportunity reaches a "Closed-Won" status.
A. Process Builder
B. Lightning Component
C. Lightning
D. Apex trigger
Answer: A
Question #:158
A developer is debugging the following code to determinate why Accounts are not being created Account a =
new Account(Name = 'A'); Database.insert(a, false); How should the code be altered to help debug the issue?
Answer: B
Question #:159
A custom Visualforce controller calls the ApexPages,addMessage () method, but no messages are rendering on
the page.
Which component should be added to the Visualforce page to display the message?
Answer: B
Question #:160
Universal Containers has an order system that uses an Order Number to identify an order for customers and
service agents. Order will be imported into Salesforce.
A. Lookup
B. Direct Lookup
D. Indirect Lookup
Answer: C
Question #:161
The values 'High', 'Medium', and 'Low' are Identified as common values for multiple picklist across different
object. What is an approach a developer can take to streamline maintenance of the picklist and their values,
while also restricting the values to the ones mentioned above?
A. Create the Picklist on each object and use a Global Picklist Value Set containing the Values.
B. Create the Picklist on each object as a required field and select "Display values alphabeticaly, not in the
order entered".
C. Create the Picklist on each object and select "Restrict picklist to the values defined in the value set".
D. Create the Picklist on each and add a validation rule to ensure data integrity.
Answer: A
Question #:162
Which statement should be used to allow some of the records in a list of records to be inserted rf others fail to
be inserted?
A. insert records
B. Database.insert(records, true)
D. Database.insert(records, false)
Answer: D
Question #:163
Given the multi-tenant architecture of the Salesforce platform, what Is a best practice a developer should
Implement and ensure successful execution of the method?
Answer: D
Question #:164
One of the child components is used for navigation purposes. When a user click a button called.. component,
the parent component must be alerted so it can navigate to the next page.
A. Fire a notification.
Answer: D
Question #:165
Universal Container uses Service Cloud with a custom field, stage_c, on the Case object.
Management wants to send a follow-up email reminder 6 hours after the stage_c field is set to ‘’;Waiting on
customer’’ The …. Administrator wants to ensure the solution used is bulk safe.
Which two automation tools should a developer recommend to meet these business requirements?
Choose 2 answers
A. Scheduled Flow
C. Record_Triggered Flow
D. Process Builder
Answer: A C
Question #:166
A developer needs to create a custom button for the Account object that, when clicked, will perform a series of
calculations and redirect the user to a custom Visualforce page. The developer wants to ensure the Visualforce
page matches the Lightning Experience user interface.
What attribute needs to be defined within the <apex:page> tag to meet the requirement?
A. applyHtmlTag="true"
B. wizard=true"
C. setup="true"
D. lightningStylesheets=''true"
Answer: D
Question #:167
A developer must create an Apex class, contactcontroller, that a Lightning component can
use to search for Contact records. User of the Lightning component should only be able to
search Contact records to which they have access. Which two will restrict the records correctly?
Answer: B D
Question #:168
A developer must implement a CheckPaymentProcessor class that provides check processing payment
capabilities that adhere to what defined for payments in the PaymentProcessor interface. public interface
PaymentProcessor { void pay(Decimal amount); } Which is the correct implementation to use the
PaymentProcessor interface class?
Answer: B
Question #:169
Which two events need to happen when deploying to a production org? Choose 2 answers
D. All test and triggers must have at least 75% test coverage combined
Answer: A B
Question #:170
Which two sfdx commands can be used to add testing data to a Developer sandbox?
A. Forced: data:bulk:upsert
D. Forced: data:async:upsert
Answer: A C
Question #:171
A developer has a Apex controller for a Visualforce page that takes an ID as a URL parameter. How should
the developer prevent a cross site scripting vulnerability?
Answer: B
Question #:172
Which process automation should be used to post a message to Chatter without using Apex code?
A. Outbound Message
B. Entitlement Process
C. Strategy Builder
D. Flow Builder
Answer: D
Question #:173
A developer must modify the following code snippet to prevent the number of SOQL queries issued from
exceeding the platform governor limit. public class without sharing OpportunityService( public static
List<OpportunityLineItem> getOpportunityProducts(Set<Id> opportunityIds){ List<OpportunitylineItem>
oppLineItems = new List<OpportunityLineItem>(); for(Id thisOppId : opportunityIds){
oppLineItems.addAll([Select Id FROM OpportunityLineItems WHERE OpportunityId = :thisOppId)]; } return
oppLineItems; } }
The above method might be called during a trigger execution via a Lightning component. Which technique
should be implemented to avoid reaching the governor limit?
A. Use the System.Limits.getQueries() method to ensure the number of queries is less than 100.
B. Use the System.Limits.getlimitQueries() method to ensure the number of queries is less than 100.
C. Refector the code above to perform the SOQL query only if the Set of opportunityIds contains less 100
Ids.
D. Refactor the code above to perform only one SOQL query, filtering by the Set of opportunityIds.
Answer: D
Question #:174
What is the maximum number of SOQL queries used by the following code? List<Account> aList = [SELECT
Id FROM Account LIMIT 5]; for (Account a : aList){ List<Contact> cList = [SELECT Id FROM Contact
WHERE AccountId = :a.Id); }
A. 5
B. 6
C. 1
D. 2
Answer: B
Question #:175
What should a developer do to check the code coverage of a class after running all tests?
A. View the Code Coverage column in the view on the Apex Classes page.
B. View the Class test Coverage tab on the Apex Class record.
C. view the overall Code Coverage panel of the tab in the Developer Console.
D. Select and run the class on the Apex Test Execution page
Answer: B
Question #:176
Which three per-transaction limits have higher governor limits in asynchronous Apex transactions?
Answer: A C E
Question #:177
As a part of class implementation a developer must execute a SOQL query against a large data ser based on
the contact object. The method implementation is as follows.
Which two methods are best practice to implement heap size control for the above code? (Choose 2 Answers)
A. Use the FOR UPDATE option on the SOQL query to lock down the records retrieved.
C. Use a SOQL FOR loop, to chunk the result set in batches of 200 records.
D. Use WHERE clauses on the SOQL query to reduce the number of records retrieved.
Answer: B C
Question #:178
A developer of Universal Containers is tasked with implementing a new Salesforce application that must be
able to by their company's Salesforce administrator.
Which three should be considered for building out the business logic layer of the application? Choose 3
answers
A. Workflows
B. validation Rules
C. Process Builder
D. Scheduled Jobs
E. Invocable Actions
Answer: A B C
Question #:179
A Custom Exception
B. CalloutException
C. LimitException
D. NoAccessException
Question #:180
Application Events follow the traditional publish-subscribe model. Which method is used to fire an event?
A. Fire()
B. Emit()
C. RegisterEvent()
D. FireEvent()
Answer: A
Question #:181
An Approval Process is defined In the Expense item c object. A business rule dictates that whenever a …
clients the Status to Submitted on an Expense_Item c record related to the expense report must enter the
approval process individually.
A developers asked to explore if this automation can be implemented without writing any Apex code.
Answer: A
Question #:182
If apex code executes inside the execute() method of an Apex class when implementing the Batchable
interface, which statement are true regarding governor limits? Choose 2 answers
A. The Apex governor limits might be higher due to the asynchronous nature of the transaction.
B. The apex governor limits are reset for each iteration of the execute() method.
C. The Apex governor limits are relaxed while calling the constructor of the Apex class.
D. The Apex governor limits cannot be exceeded due to the asynchronous nature of the transaction,
Answer: A B
Question #:183
A developer needs to implement the functionality for a service agent to gather multiple
Question #:184
The sales management team at Universal Containers requires that the Lead Source field of the Lead record be
populated when a Lead is converted.
What should be used to ensure that a user populates the Lead Source field prior to converting a Lead?
A. Process Builder
B. Validation Rule
C. Formula Field
D. workflow Rule
Answer: B
Question #:185
A developer must troubleshoot to pinpoint the causes of performance issues when a custom page loads in their
org. Which tool should the developer use to troubleshoot?
A. AppExchange
B. Salesforce CLI
D. Developer Console
Answer: D
Question #:186
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?
C. Schedule a report.
Answer: D
Question #:187
Answer: A
Question #:188
A. Calling event, stopPropagation ( ) may or may not stop the event propagation based of the current
propagation phase.
B. If a container component needs to handle a component event, add a handleFacets='' attribute to Its
handler.
C. Only parent components that create subcomponents (either in their markup or programmatically) can
handle events.
Answer: A D
Question #:189
A developer created these three Rollup Summary fields in the custom object, Project_ct,
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. Record-triggered Flow
B. Formula field
C. Apex Trigger
D. Process Builder
Answer: B
Question #:190
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 artifact is part of the Controller according to the MVC architecture?
A. HTML file
B. JavaScript file
C. XML file
D. Apex class
Answer: D
Question #:191
B. Formulas are calculated at runtime and are not stored in the database.
D. Fields that are used in a formula field can be deleted or edited without the formula.
Answer: B C
Question #:192
In the Lightning UI, where should a developer look to find information about a Paused Flow Interview?
Answer: B
Question #:193
Answer: C
Question #:194
Universal Containers decides to use purely declarative development to build out a new Salesforce application.
Which three options can be used to build out the business logic layer for this application?
Choose 3 answers
A. Flow Builder
B. Validation Rules
C. Process builder
Answer: A B C
Question #:195
The orderHelper class is a utility class that contains business logic for processing orders. Consider the
following code snippet:
A developer needs to create a constant named DELIVERY_MULTIFILTER with a value of 4.15. The value of
the constant should not change at any time in the code.
How should the developer declare the DELIVERY_MULTIFILTER constant to meet the business objectives?
Answer: B
Question #:196
A developer created a new trigger that inserts a Task when a new Lead is created. After deploying to
production, an outside integration chat reads task records is periodically reporting errors.
Which change should the developer make to ensure the integration is not affected with minimal impact to
business logic?
Answer: d
Question #:197
How many accounts will be inserted by the following block ofcode? for(Integer i = 0 ; i < 500; i++) { Account
a = new Account(Name='New Account ' + i); insert a; }
A. 150
B. 0
C. 500
D. 100
Answer: B
Question #:198
A credit card company needs to Implement the functionality for a service agent to process damaged credit
cards. When the customers call In, the service agent must gather many pieces of information Is tasked to
Implement this functionality.
What should the developer use to satisfy this requirement In the most efficient manner?
A. Flow Builder
B. Lightning Component
C. Approval Process
D. Apex Trigger
Answer: D
Question #:199
Which two are phases in the Salesforce Application Event propagation framework? Choose
2 answers
A. Bubble
B. Default
C. Capture
Answer: B C
Question #:200
Which three process automations can immediately send an email notification to the owner of an Opportunity
when its Amount is changed to be greater than $10,000? Choose 3 answers
A. Workflow Rule
B. Flow Builder
C. Approval Process
D. Escalation Rule
E. Process Builder
Answer: A C E
Question #:201
Universal Containers wants to assess the advantages of declarative development versus programmatic
customization for specific use cases in its Salesforce implementation.
Choose 2 answers
Answer: B C
Question #:202
A custom picklist field, Food_Preference c, exist on a custom object. The picklist contains the following
options: 'Vegan','Kosher','No Preference'. The developer must ensure a value is populated every time a record
is created or updated. What is the most efficient way to ensure a value is selected every time a record is saved?
A. Set "Use the first value in the list as the default value" as True.
Answer: C
Question #:203
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?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
Question #:204
How can a developer access the updated custom field value from a trigger?
A. By writing, a Before Update trigger and accessing the field value from Trigger.new
B. By writing an After Insert trigger and accessing the field value from Trigger.old
C. By writing an After Update trigger and accessing the field value from Trigger.old
D. By writing a Before Insert trigger and accessing the field value from Trigger.new
Answer: A
Question #:205
A. <apex:page renderAs=”pdf”>
Answer: A
Question #:206
An org has an existing Visual Flow that creates an Opportunity with an Update records element. A developer
must update the Visual Flow also created a Contact and store the created Contact's ID on the Opportunity.
Answer: B
Question #:207
Universal Containers has created a unique process for tracking container repairs. A custom field, status c,
has been created within the container c custom object. A developer is tasked with sending notifications to
multiple external systems every time the value of the status picklist changes.
Which two tools should the developer use to meet the business requirement and ensure low maintenance of the
solution?
Choose 2 answers
A. Record-Triggered flow
B. Apex trigger
C. Apex callouts
D. Platform event
Answer: C D
Question #:208
what are the methods used to show input in classic and lightning ?
Question #:209
When using SalesforceDX, what does a developer need to enable to create and manage scratch orgs?
A. Production
B. Dev Hub
C. Environment Hub
D. Sandbox
Answer: B
Question #:210
How many accounts will be inserted by the following block ofcode? for(Integer i = 0 ; i <
Integer x;
if(abok=false;integer=x;){
X=1;
}elseif(abok=true;integer=x;){
X=2;
}elseif(abok!=null;integer=x;){
X=3;
)elseif{
X=4;}
A. X=4
B. X=8
C. X=9
D. X=10
Answer: A
Question #:211
Which three steps allow a custom SVG to be included in a Lightning web component? Choose 3 answers
Answer: A B C
Question #:212
A developer must provide a custom user interface when users edit a Contact. Users must be able to use the
interface in Salesforce Classic and Lightning Experience.
A. Override the Contact’s Edit button with a Visualforce page in Salesforce Classic and a Lightning
B. Override the Contact’s Edit button with a Visualforce page in Salesforce Classic and a Lightning page
in Lightning Experience.
C. Override the Contact’s Edit button with a Lightning component in Salesforce Classic and a Lightning
D. Override the Contact’s Edit button with a Lightning page in Salesforce Classic and a Visualforce page in
Lightning Experience.
Answer: A
Question #:213
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?
Answer: D
Question #:214
A Salesforce developer wants to review their code changes immediately and does not want to install anything
on their computer or on the org.
A. Developer Console
C. Setup Menu
Answer: A
Question #:215
Which Salesforce feature allows a developer to see when a user last logged in to Salesforce if real-time
notification is not required?
B. Developer Log
D. Calendar Events
Answer: C
Question #:216
thisLead.RecordTypeId = BUSINESS_RECORDTYPEID;
The developer receives deployment errors every time a deployment is attempted from Sandbox to Production.
Answer: B
Question #:217
A lead developer creates an Apex interface called "Laptop". Consider the following code snippet:
How can a developer use the Laptop Interface within the Silvertaptop class?
A. @Extends(class=Laptop'')
C. @Interface (class=''Laptop'')
Answer: B
Question #:218
When an order is created, it needs to sync with the-in-house order fulfillment system. The order fulfillment
system can accept SOAP messages over the HTTPS. If the connection fails, messages should be retried for up
to 24 hours.
What is the recommended approach to sync the orders in Salesforce with the order fulfillment system?
B. Create an after insert trigger on the Order object to make a callout to the order fulfilment system
C. Write an Apex SOAP service to integrate with the order fulfillment system.
D. Use Process Bulkier to call an invocable Apex method that sends a message to the order fulfilment
system.
Answer: B
Question #:219
Which three considerations must the developer keep in mind while developing the Apex Interface?
Choose 3 answers
C. The Apex interface class access modifier can be set to Private, Public, or Global.
Answer: A B D
Question #:220
Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a Master-Detail
relationship with the standard Account object. Based on some internal discussion, the UC administrator tried
to change the Master-Detail relationship to a Lookup relationship but was not able to do so. What is a possible
reason that this change was not permitted?
Answer: A
Question #:221
What are two ways that a controller and extension can be specified on a Visualforce page?
Choose 2 answers
A. a@pex:page=Account extends="myControllerExtension"
Answer: B D
Question #:222
B. The record will be created and a message will be in the debug log.
Answer: C
Question #:223
DeleteExpense,
applyDefaultstoexpense
validateexpenseupdate;
The triggers process before delete, before insert, and before update events respectively.
Which two techniques should the developer implement to ensure trigger best practice are
followed?
A. Unify the before insert and before update triggers and use Process Builder for the delete action.
B. Maintain all three triggers on the Expense c object, but move the Apex logic out for the trigger
definition.
C. Create helper classes to execute the appropriate logic when a record is saved.
D. Unify all three triggers in a single trigger on the Expense c object that includes all events.
Answer: C D
Question #:224
Apex trigger
What are two factors that the developer must take into account to properly deploy the modification to the
production environment?
B. At least one line of code must be executed for the Apex trigger.(1% coverage)
Answer: A B
Question #:225
Universal Container is building a recruiting app with an Applicant object that stores information about an
individual person that represents a job. Each application may apply for more than one job.
What should a developer implement to represent that an applicant has applied for a job?
Answer: A
Question #:226
What are two benefits of using declarative customizations over code? Choose 2 answers
Answer: A C
Question #:227
B. Importing data using the Data Loader and the Bulk API
Answer: B
Question #:228
A developer has two custom controller extensions where each has a save() method.
Which save() method will be called for the following Visualforce page?
</apex:page>
C. ExtensionB save()
D. ExtensionA save()
Answer: A
Question #:229
How does the Lightning Component framework help developers implement solutions faster?
Answer: C
Question #:230
A develop created these three roll-up summary fields on the custom object. Project_c:
The developer is asked to create a new field that should the ratio between rejected and approved timesheet for
a given project.
What are two benefits of choosing a formula held instead of an Apex trigger to fulfill the request? Choose 2
answers
Answer: B C
Question #:231
Universal Containers stores Orders and Line Items in Salesforce. For security reason, financial representatives
are allowed to see information on the Order such as order amount, but they are not allowed to see the Line
items on the Order. Which type of relationship should be used?
A. Lookup
B. Direct Lookup
C. Indirect lookup
D. Master Detail
Answer: A
Question #:232
A team of many developers work in their own individual orgs that have the same configuration at the
production org. Which type of org is best suited for this scenario?
A. Developer Sandbox
B. Developer Edition
C. Full Sandbox
Answer: C
Question #:233
A developer needs to implement a custom SOAP Web Service that is used by an external Web Application.
The developer chooses to Include helper methods that are not used by the Web Application In the
Implementation of the Web Service Class.
Which code segment shows the correct declaration of the class and methods?
A)
B)
C)
D)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Question #:234
A developer uses a loop to check each Contact in a list. When a Contact with the Title of
“Boss” is found, the Apex method should jump to the first line of code outside of the for
loop.
Which Apex solution will let the developer implement this requirement?
A. break;
B. Continue
C. Next
D. Exit
Answer: A
Question #:235
What are three techniques that a developer can use to invoke an anonymous block of code? (Choose three.)
B. Create a Visualforce page that uses a controller class that is declared without sharing.
C. Run code using the Anonymous Apex feature of the Developer’s IDE.
E. Create and execute a test method that does not specify a runAs() call.
Answer: A C D
Question #:236
A. Tooling API
B. Developer console
C. Bulk API
D. Matadata API
Answer: A B
Question #:237
When a user edits the Postal Code on an Account, a custom Account text field named "Timezone" must be
update based on the values in a PostalCodeToTimezone c custom object. How should a developer implement
this feature?
Answer: B
Question #:238
What occurs when more than one Account is returned by the SOQL query?
Answer: D
Question #:239
While writing a test class that covers an OpportunityLineItem trigger, a Developer is unable to create a
standard PriceBook since one already exists in the org.
D. Use @TestVisible to allow the test method to see the standard PriceBook.
Answer: A
Question #:240
How should the developer modify the code to ensure exceptions are handled gracefully?
Answer: A
Question #:241
A developer writes a trigger on the Account object on the before update event that increments a count field. A
workflow rule also increments the count field every time that an Account is created or updated. The field
update in the workflow rule is configured to not re-evaluate workflow rules.
What is the value of the count field if an Account is inserted with an initial value of zero, assuming no other
automation logic is implemented on the Account?
A. 1
B. 3
C. 4
D. 2
Answer: D
Question #:242
Choose 3 answers
A. Process Builder
B. Visualforce
C. Apex Class
D. Apex Trigger
E. User
Answer: C D E
Question #:243
A team of developers is working on a source-driven project that allows them to work independently, with
many different org configurations. Which type of Salesforce orgs should they use for their development?
A. Developer sandboxes
B. Scratch orgs
D. Developer orgs
Answer: B
Question #:244
Get Cloudy Consulting (GCC) has a multitude of servers that host its customers’ websites. GCC wants to
provide a servers status page that is always on display in its call center. It should update in real time with any
changes made to any servers. To accommodate this on the server side, a developer created a server Update
platform event.
Answer: A
Question #:245
Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a master-detail
relationship with the standard Account object.
Based on some internal discussions, the UC administrator tried to change the master-detail relationship to a
lookup relationship, but was not able to do so.
A. The Account object does not allow changing a field type for a custom field.
B. The organization wide default for the Vendor object is Public Read/Write.
C. The Account object has a roll-up summary field on the Vendor object.
D. Some of the Vendor records have null for the Account field.
Answer: C
Question #:246
A developer is tasked with performing a complex validation using Apex as part of advanced business logic.
certain criteria are met for a PurchaseOrder, the developer must throw a custom exception.
What is the correct way for the developer to declare a class that can be used as an exception?
Answer: B
Question #:247
A developer must create a CreditcardPayment class that provides an implementation of an existing Payment
class. Public virtual class Payment { public virtual void makePayment(Decimal amount) { /*implementation*/
} } Which is the correct implementation?
Answer: A
Question #:248
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
{ /*implementation*/ }
B. @InvocableMethod
{ /*implementation*/ }
C. @InvocableMethod
{ /*implementation*/ }
D. @InvocableMethod
{ /*implementation*/ }
Answer: B
Question #:249
A Salesforce Administrator used Flow Builder to create a flow named ‘’accountOnboarding’’. The flow must
be used inside an Aura component.
Which tag should a developer use to display the flow in the component?
A. Lightning-flow
B. Aura:flow
C. Lightning:flow
D. Aura:flow
Answer: C
Question #:250
A developer wants to invoke on outbound message when a record meets a specific criteria.
Choose 3 answer
A. Approval Process has the capacity to check the record criteria and send an outbound message without
Apex Code
B. Process builder can be used to check the record criteria and send an outbound message with Apex Code.
C. workflows can be used to check the record criteria and send an outbound message.
D. Process builder can be used to check the record criteria and send an outbound messagewithout Apex
Code.
E. Visual Workflow can be used to check the record criteria and send an outbound message without Apex
Code.
Answer: A B C
Question #:251
An org has an existing Flow that creates an Opportunity with an Update Records element. A developer update
the Flow to also create a Contact and store the created Contact's ID on the Opportunity.
Answer: D
Question #:252
Calculate the line amount for each Line Item based on quantity selected and price.
A. Line Items has a Master-Detail field to Order and the Master can be re-parented.
B. Line Item has a Lookup field to Order and there can be many Line Items per Order
C. Order has a Lookup field to Line Item and there can be many Line Items per Order.
D. Order has a Master-Detail field to Line Item and there can be many Line Items per Order.
Answer: A
Question #:253
The StatusFetcher class successfully compiled and saved. However, the Calculator class has a compile time
error.
A. Change the class declaration for the statusFetcher class to public with inherited sharing.
D. Change the class declaration for the Calculator class to public with inherited sharing.
Answer: B
Question #:254
In an environment where the full result set is returned, what is a possible outcome of this code?
A. The total number of records processed as a result of DML statements will be exceeded
B. The total number of records processed as a result of DML statements will be exceeded.
C. The transaction will succeed and the first ten thousand records will be committed to the database.
Answer: B
Question #:255
A developer is creating a test coverage for a class and needs to insert records to validate functionality. Which
method annotation should be used to create records for every method in the test class?
A. @BeforeTest
B. @isTest(SeeAllData=True)
C. @TestSetup
D. @PreTest
Answer: C
Question #:256
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 Master-Detail field on the Account object to the Global Address object
B. Add a Master-Detail field on the Global Address object to the Account object.
C. Add a Lookup field on the Account object to the Global Address object.
D. Add a Lookup field on the Global Address object to the Account object
Answer: B
Question #:257
Which two statements true about Getter and Setter methods as they relate to Visualforce? Choose 2 answers
B. There is no guarantee for the order in which Getter or Setter methods are executed.
Answer: A D
Question #:258
The Salesforce Administrator created a custom picklist field, Account_status_c, on the a Account object. This
picklist has possible values of Inactive’’ and Active?
As part of a new business process, management wants to ensure an opportunity record is created only for
Accounts marked as "Active". A developer is asked to implement this business requirement.
Which two automation tools should be used to fulfill the business need?
Choose 2 answers
A. Salesforce Flow
B. Approval Process
C. Process Builder
D. Workflow Rules
Answer: A
Question #:259
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?
Answer: C
Question #:260
A developer is asked to create a Visualforce page for Opportunities that allows users to save or merge the
current record.
A. A custom controller
Answer: A
Question #:261
Universal Containers decides to use exclusively declarative development to build out a new
Salesforce application. Which three options should be used to build out the database layer
A. Roll-Up Summaries
B. Triggers
C. Relationships
D. Process Builder
Answer: A C D
Question #:262
A developer is asked to explore if this automation can be implemented without writing any Apex code.
Answer: C
Question #:263
A. A Master-Detail Relationship detail record inherits the sharing and security of its master record.
B. When a record of a master object in a Lookup Relationship is deleted, the detail records are also deleted.
D. When a record of a master object in a Master-Detail Relationship is deleted, the detail records are kept
and not deleted.
Answer: A
Question #:264
Answer: D
Question #:265
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 it's trainers?
A. SELECT Id, (SELECT Id FROM Trainers__r) FROM Gym_C WHERE Name = ‘Viridian City Gym’
B. SELECT Id, (SELECT Id FROM Trainer_c) FROM Gym_c WHERE Name - Viridian City Gym'
D. SELECT Id, (SELECT Id FROM Trainers) FROM Gym_C WHERE Name - Viridian City Gym'
Answer: A
Question #:266
C. Changing a user's default division when the transfer division option is checked
Answer: A
Question #:267
Which code modification should be made to insert the Accounts so that field-level security is respected?
Answer: A
Question #:268
A developer created a weather app that contains multiple Lightning web components.
One of the components, called Toggle, has a toggle for Fahrenheit or Celsius units. Another component, called
Temperature, displays the current temperature in the unit selected in the Toggle component
When a user toggles from Fahrenheit to Celsius or vice versa in the Toggle component, the information must
be sent to the Temperature component so the temperature can be converted and displayed.
Answer: A
Question #:269
What should a developer do to correct the code so that there is no chance of hitting a governor limit?
Answer: C
Question #:270
A. Developer Console
B. Salesforce CLI
C. Workbench
D. Sandbox refresh
Answer: B
Question #:271
A primaryid_c custom field exists on the candidate_c custom object. The filed is used to store each candidate's
id number and is marked as Unique in the schema definition.
As part of a data enrichment process. Universal Containers has a CSV file that contains updated data for all
candidates in the system, the file contains each Candidate's primary id as a data point. Universal Containers
wants to upload this information into Salesforce, while ensuring all data rows are correctly mapped to a
candidate in the system.
Which technique should the developer implement to streamline the data upload?
Answer: C
Question #:272
Refer to the following code snippet for an environment has more than 200 Accounts belonging to the
Technology' industry:
When the code execution, which two events occur as a result of the Apex transaction?
When the code executes, which two events occur as a result of the Apex transaction?
Choose 2 answers
A. If executed in an asynchronous context, the apex transaction is likely to fall by exceeding the DML
governor limit
B. The Apex transaction succeeds regardless of any uncaught exception and all processed accounts are
updated.
C. The Apex transaction fails with the following message. "SObject row was retrieved via SOQL without
querying the requested field Account.Is.Tech c''.
D. If executed In a synchronous context, the apex transaction is likely to fall by exceeding the DHL
governor limit.
Answer: C
Question #:273
The Visualforce page shows information about a single record. The developer decides to use Lightning Data
Service to access record data.
Answer: A
Question #:274
A developer writes a single trigger on the Account object on the after insert and after update events. A
workflow rule modifies a field every time an Account is created or updated.
How many times will the trigger fire if a new Account is inserted, assuming no other automation logic is
implemented on the Account?
A. 4
B. 1
C. 2
D. 8
Answer: C
Question #:275
Universal Containers wants a list button to display a Visualforce page that allows users to edit multiple
records. which Visualforce feature supports this requirement?
A. <apex:listButton> tag
B. Custom controller
D. Controller extension
Answer: C
Question #:276
B. An ant migration tool deployment with destructivechanges xml file and the components to delete in the
package .xml file
D. An ant migration tool deployment with a destructivechanges XML file and an empty package .xml file
Answer: B
Question #:277
A developer needs to create a custom button for the Account object that, when clicked, will perform a series of
calculation and redirect the user to a custom visualforce page.
Which three attributes need to be defined with values in the <apex:page> tag to accomplish this?
Choose 3 answers
A. renderAs
B. standard Controller
C. readOnly
D. Action
E. extensions
Answer: A B D
Question #:278
What are two ways the developer can fire the exception in Apex? Choose 2 answers
B. New ParityException( );
Answer: A D
Question #:279
A developer created a Visualforce page and custom controller to display the account type field as shown
below. Custom controller code: public class customCtrlr{ private Account theAccount; public String actType;
public customCtrlr() { theAccount = [SELECT Id, Type FROM Account WHERE Id =
:apexPages.currentPage().getParameters().get('id')]; actType = theAccount.Type; } } Visualforce page snippet:
The Account Type is {!actType} The value of the account type field is not being displayed correctly on the
page. Assuming the custom controller is property referenced on the Visualforce page, what should the
developer do to correct the problem?
Answer: A
Explanation
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_custom.htm
Question #:280
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
Answer: A B
Question #:281
While writing an Apex class that creates Accounts, a developer wants to make sure that all required fields are
handled properly.
Which approach should the developer use to be sure that the Apex class works correctly?
Question #:282
A developer needs to confirm that a Contact trigger works correctly without changing the organization's data.
what should the developer do to test the Contact trigger?
A. Use the New button on the Salesforce Contacts Tab to create a new Contact record.
B. Use the Open execute Anonymous feature on the Developer Console to run an 'insert Contact' DML
statement
C. Use Deploy from the VSCode IDE to display an 'insert Contact' Apex class.
D. Use the Test menu on the Developer Console to run all test classes for the Contact trigger
Answer: D
Question #:283
How should a developer write unit tests for a private method in an Apex class?
Answer: C
Question #:284
A business implemented a magnification plan to encourage its customers to watch some educational videos.
Customers can watch videos over several days, and their progress is recorded. Award points are granted to
customers for all completed videos. When the video is marked as completed in Salesforce, an external web
service must be called so that points can be awarded to the user.
A developer implemented these requirements in the after update trigger by making a calf to an external web
A. Surround the external call with a try-catch block to handle the exception.
Answer: C
Question #:285
Universal Container use a simple order Management app. On the Order Lines, the order line total is calculated
by multiplying the item price with the quantity ordered. There is a Master-Detail relationship between the
Order and the Order Lines object.
What is the practice to get the sum of all order line totals on the order header?
B. Apex Trigger
C. Process Builder
Answer: A
Question #:286
A developer must create a ShippingCalculator class that cannot be instantiated and must include a working
default implementation of a calculate method, that sub-classes can override.
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B
Question #:287
A developer must build application that tracks which Accounts have purchase specific pieces of equal
products. Each Account could purchase many pieces of equipment.
How should the developer track that an Account has purchased a piece of equipment.
Answer: C
Question #:288
Which Salesforce feature allows a developer to see when a user last logged in to Salesforce if real-time
B. Developer Log
D. Calendar Events
Answer: C
Question #:289
A large corporation stones Orders and Line Items In Salesforce for different lines of business. Users are a.. see
Orders across the entire organization, but, for security purposes, should only be able to see the Line If Orders
in their line of business.
Which type of relationship should be used between Line Items and Orders?
A. Master-Detail
B. Lookup
C. Direct Lookup
D. Indirect Lookup
Answer: A
Question #:290
A developer must write an Apex method that will be called from a Lightning component. The method may
Which method should a developer use to ensure only users that should be able to delete Accounts can
A. Schema.sObjectType.Account.isDeletable()
B. Account.isDeletable()
C. accountRec.isDeletable()
D. accountRec.sObjectType.isDeletable()
Answer: A
Question #:291
A developer has a single custom controller class that works with a Visualforce Wizard to support creating and
editing multiple subjects. The wizard accepts data from user inputs across multiple Visualforce pages and from
a parameter on the initial URL.
Which three statements are useful inside the unit test to effectively test the custom controller?
Choose 3 answers
A. insert pageRef.
B. Test.setCurrentPage(pageRef);
D. ApexPages.CurrentPage().getParameters().put('input\’, 'TestValue');
Answer: B D E
Question #:292
A. <apex:page contentType="pdf">
B. <apex:page rendersAs="application/pdf">
C. <apex:page contentType="application/pdf">
D. <apex:page renderAs="pdf">
Answer: D
Explanation
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_output_pdf_renderas.htm
You can generate a downloadable, printable PDF file of a Visualforce page using the PDF rendering service.
Convert a page to PDF by changing the <apex:page> tag.
<apex:page renderAs="pdf">
Question #:293
A developer wants to import 500 Opportunity records into a sandbox. Why should the developer choose to use
data Loader instead of Data Import Wizard?
Answer: B
Question #:294
A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable
interfaces. public interface Sortable { void sort(); } public interface Drawable { void draw(); } Which is the
correct implementation?
Answer: C
Question #:295
A developer needs to prevent the creation of Request_c records when certain conditions exist in the system. A
RequestLogic class exists to checks the conditions. What is the correct implementation?
RequestLogic.validateRecords {trigger.new};
RequestLogic.validateRecords (trigger.new);
if (RequestLogic.isvalid{Request})
if (RequestLogic.isValid{Request})
Answer: B
Question #:296
A. Governor limits prevent apex from impactiong the performance of multiple tenants on the same instance
B. Apex sharing controls access to records fomr multiple tenants on the same instance
C. Global apex classes can be referenced from multiple tenants on the same instance
D. Org-level data security controls which users can see data from multiple tenants on the same instance
Answer: A
Question #:297
A company has been adding data to Salesforce and has not done a good Job of limiting the creation of
duplicate Lead records. The developer is considering writing an Apex process to identify duplicates and merge
the records together.
Choose 2 answers
A. The field values on the master record are overwritten by the records being merged.
D. The merge method allows up to three records, including the master and two additional records with the
same sObject type, to be merged into the master record.
Answer: B D
We help you pass any IT / Business Certification Exams with 100% Pass Guaranteed or Full Refund. Especially
Cisco, CompTIA, Citrix, EMC, HP, Oracle, VMware, Juniper, Check Point, LPI, Nortel, EXIN and so on.
We prepare state-of-the art practice tests for certification exams. You can reach us at any of the email addresses listed
below.
Sales: sales@marks4sure.com
Feedback: feedback@marks4sure.com
Support: support@marks4sure.com
Any problems about IT certification or our products, You can write us back and we will get back to you within 24
hours.