Skip to content

Rohit Wakchoure

7x certified Salesforce Technical Delivery Lead

Menu
  • Myself
    • Projects
    • TechSkills
    • Companies
    • Education
    • Certified
    • Contact
  • Blog
    • Art
    • Comics
    • Salesforce
  • Quiz
    • Salesforce Exam Preparation
      • Associate Exam Quiz
      • Administrator Exam Quiz
      • App Builder Exam Quiz
      • Platform Developer I Exam Quiz
      • Business Analyst Exam Quiz
  • Interview Q&A
    • Salesforce Q&A
      • Salesforce Admin
      • Salesforce Developer
Menu

Platform Developer I Quiz

9
Created on June 25, 2023 By wakchourerohit@gmail.com

Salesforce Certified Platform Developer I Practice Q&A

1 / 60

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?

2 / 60

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?

3 / 60

Which three statements are true regarding custom exceptions in Apex? (Choose three.)

4 / 60

Universal Containers decides to use exclusively declarative development to build out a new
Salesforce application. Which three options should be used to build out the database layer
for the application?

Choose 3 answers

5 / 60

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?

6 / 60

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?

7 / 60

What are three considerations when using the @InvocableMethod annotation in Apex?
Choose 3 answers

8 / 60

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?

9 / 60

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.
How should the Developer overcome this problem?

10 / 60

Given the following Anonymous Block:

Which one do you like?
What should a developer consider for an environment that has over 10,000 Case records?

11 / 60

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?

12 / 60

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?

13 / 60

Assuming that ‘name; is a String obtained by an <apex:inputText> tag on a Visualforce page.
Which two SOQL queries performed are safe from SOQL injections?

Choose 2 answers

14 / 60

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

15 / 60

Which code displays the content of Visualforce page as PDF?

16 / 60

Which three steps allow a custom SVG to be included in a Lightning web component?

Choose 3 answers

17 / 60

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?

18 / 60

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?

19 / 60

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?

20 / 60

Which Salesforce feature allows a developer to see when a user last logged in to Salesforce if real-time
notification is not required?

21 / 60

A developer has an integer variable called maxAttempts. The developer meeds to ensure that once
maxAttempts is initialized, it preserves its value for the lenght 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?

22 / 60

Given the following trigger implementation:
trigger leadTrigger on Lead (before update){
final ID BUSINESS_RECORDTYPEID = ‘012500000009Qad’;
for(Lead thisLead : Trigger.new){
if(thisLead.Company != null && thisLead.RecordTypeId != BUSINESS_RECORDTYPEID){
thisLead.RecordTypeId = BUSINESS_RECORDTYPEID;
}
}
}
The developer receives deployment errors every time a deployment is attempted from Sandbox to
Production.
What should the developer do to ensure a successful deployment?

23 / 60

A developer wants to retrieve the Contacts and Users with the email address ‘dev@uc.com’.
Which SOSL statement should the developer use?

24 / 60

What will be the output in the debug log in the event of a QueryExeption during a call to the @query method in the following Example?

25 / 60

What are three ways for a developer to execute tests in an org?

Choose 3.

26 / 60

Which code in a Visualforce page and/or controller might present a security vulnerability?

27 / 60

How should a custom user interface be provided when a user edits an Account in Lightning Experience?

28 / 60

Which three data types can a SOQL query return?

Choose 3 answers

29 / 60

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?

 

30 / 60

Which statement generates a list of Leads and Contacts that have a field with the phrase ‘ACME’?

31 / 60

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?

32 / 60

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?

33 / 60

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?

34 / 60

Which process automation should be used to send an outbound message without using Apex code?

35 / 60

Which two events need to happen when deploying to a production org?

Choose 2 answers

36 / 60

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?

37 / 60

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?

38 / 60

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?

39 / 60

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?

40 / 60

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?

41 / 60

Which salesforce org has a complete duplicate copy of the production org including data
and configuration?

42 / 60

A developer has the following requirements:
Calculate the total amount on an Order.
Calculate the line amount for each Line Item based on quantity selected and price.
Move Line Items to a different Order if a Line Item is not stock.
Which relationship implementation supports these requirements?

43 / 60

A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the
system. Whithin 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

44 / 60

A Next Best Action strategy uses an Enchance Element that invokes an Apex method to determine a
discount level for a Contact, based on a number of factors. What is the correct definition of the Apex
method?

45 / 60

A developer needs to prevent the creation of request records when certain conditions exist in the
system. A RequestLogic class exists to checks the conditions. What is the correct implementation?

46 / 60

A developer is asked to create a Visualforce page that displays some Account fields as well
as fields configured on the page layout for related Contacts.
How should the developer implement this request?

47 / 60

Which aspect of Apex programming is limited due to multitenancy?

48 / 60

What does the Lightning Component framework provide to developers?

49 / 60

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?

50 / 60

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.

51 / 60

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?

52 / 60

Which Salesforce feature allows a developer to see when a user last logged in to Salesforce if real-time
notification is not required?

53 / 60

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?

54 / 60

A recursive transaction is limited by a DML statement creating records for these two objects:
1. Accounts

2. Contacts
The Account trigger hits a stack depth of 16.
Which statement is true regarding the outcome of the transaction?

55 / 60

Where are two locations a developer can look to find information about the status of asynchronous or
future calls?

Choose 2 answers

56 / 60

Which exception type cannot be caught ?

57 / 60

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?

58 / 60

A developer is implementing an Apex class for a financial system. Within the class, the
variables ‘creditAmount’ and ‘debtAmount’ should not be able to change once a value is
assigned. In which two ways can the developer declare the variables to ensure their value
can only be assigned one time?

Choose 2 answers

59 / 60

Which two are phases in the Salesforce Application Event propagation framework?

Choose 2 answers

60 / 60

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.

Your score is

The average score is 77%

LinkedIn Facebook Twitter VKontakte
0%

©2025 Rohit Wakchoure | Design: Newspaperly WordPress Theme