Platform Developer I 1
Platform Developer I 1
Salesforce
Exam Questions Platform-Developer-I
Platform Developer I
NEW QUESTION 1
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.
B. Use the without sharing keyword on the class declaration.
C. Use the UserInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user.
D. Use the with sharing keyword on the class declaration.
Answer: D
Explanation:
Use the with sharing keyword on the class declaration. The with sharing keyword ensures that the Apex code respects the object-level, field-level, and record-level
sharing settings for the user who is running the Apex code. This means that the code will only return records that the user has access to, according to their Sharing
Settings. You can find more information about the with sharing keyword in the official Salesforce documentation
(https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_sharing.htm
NEW QUESTION 2
The sales management team at Universal Container requires that the Lead Source field of the Lead record be populated when a.. converted.
What should be done to ensure that a user populates the Lead Source field prior to converting a Lead?
Answer: B
NEW QUESTION 3
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
NEW QUESTION 4
For which three items can 2 trace flag be configured? Choose 3 answers
A. Flow
B. Apex Class
C. User
D. Apex Trager
E. Visualforce
Answer: BCD
NEW QUESTION 5
Which three steps allow a custom SVG to be included in a Lightning web component? Choose 3 answers
Answer: ABC
NEW QUESTION 6
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);
C. public ExtendedController(ApexPages StandardController cntrl) { }
D. ApexPages.CurrentPage().getParameters().put('input\’, 'TestValue');
E. String nextPage - controller.save().getUrl();
Answer: BDE
NEW QUESTION 7
The following automations already exist on the Account object;
• A workflow rule that updates a field when a certain criteria is met
• A custom validation on a field
• A How that updates related contact records
A developer created a trigger on the Account object.
What should the developer consider while testing the trigger code?
Answer: D
NEW QUESTION 8
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
When using SalesforceDX, a developer needs to enable Dev Hub in order to create and manage scratch orgs. A Dev Hub is a special type of org used by
developers to store source code and other development-related
artifacts. It is also used to create and manage scratch orgs, which are temporary orgs used for development and testing.
Reference: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_intro.htm
NEW QUESTION 9
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.
In which two ways can this be accomplished? 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.
C. The parent component can invoke a method in the child component
D. The parent component can use a public property to pass the data to the child component.
Answer: AD
NEW QUESTION 10
Which code statement includes an Apex method named updateaccounts in the Class AccountCont rolles for use in a Lightning web component?
A)
B)
C)
D)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: D
NEW QUESTION 10
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. Qo The @testSetup annotation is not supported when the GisTest(SeeAllData=True) annotation is used.
C. Test data is inserted once for all test methods in a class.
D. A method defined with the @testSetup annotation executes once for each test method in the test class and counts towards system limits.
Answer: BD
NEW QUESTION 14
Cloud kicks has a muli-screen flow 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 number and dates that are retrieved from an external odrer management system
in real time and displayed on the screen.
What shuold a developer use to satisfy this requirement?
A. An invocae method
B. An apex REST class
C. An outbound message
D. An Apex Controller
Answer: B
NEW QUESTION 16
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.
B. Rewrite all Visualforce pages asLightning components.
C. Set the attribute enableLightning to true in the definition.
D. Enable Available for Lightning Experience, Lightning Communities, and the mobile app on Visualforce pages used by the custom application.
Answer: A
NEW QUESTION 18
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?
Answer: C
NEW QUESTION 22
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
NEW QUESTION 26
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
NEW QUESTION 31
The Account object in an organization has a master detail relationship to a child object called Branch. The following automations exist:
A. Rollup summary fields can cause the parent record to go through Save.
B. The trigger may fire multiple times during a transaction.
C. Duplicate rules are executed once all DML operations commit to the database.
D. The validation rules will cause the trigger to fire again.
Answer: AB
NEW QUESTION 33
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.
D. Try to use application events as opposed to component events.
Answer: AC
NEW QUESTION 36
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
NEW QUESTION 39
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
NEW QUESTION 44
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?
A. <ligthning-input-field field-name="Salary__c"></lightning-input-field>
B. <lightning-formatted-number value="Salary__c" format-style="currency"></lightning-formatted-number>
C. <lightning-input type="number" value="Salary__c" formatter="currency"></lightning-input>
D. <lightning-input-currency value="Salary__c"></lightning-input-currency>
Answer: A
NEW QUESTION 47
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
NEW QUESTION 49
What are three considerations when using the @InvocableMethod annotation in Apex? Choose 3 answers
Answer: CDE
NEW QUESTION 54
A developer migrated functionality from JavaScript Remoting to a Lightning web component and wants to use the existing getOpportunities() method to provide
data.
What to do now?
Answer: A
NEW QUESTION 58
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
NEW QUESTION 62
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: AB
NEW QUESTION 63
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: B
NEW QUESTION 68
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.
What should a developer add to fulfill this requirement?
Answer: C
NEW QUESTION 69
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
NEW QUESTION 71
An Opportunity needs to have an amount rolled up from a custom object that is not in a master-detail relationship.
How can this be achieved?
A. Write a trigger on the 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
D. Use the Streaming API to create real-time roll-up summaries.
Answer: C
NEW QUESTION 75
Which three operations affect the number of times a trigger can fire? Choose 3 answers
A. Process Flows
B. Workflow Rules
C. Criteria-based Sharing calculations
D. Email messages
E. Roll-Up Summary fields
Answer: ABE
NEW QUESTION 76
A developer created a trigger on the Account object and wants to test if the trigger is properly bulklfield. 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
A developer created a trigger on the Account object and wants to test if the trigger is properly bulklfield. 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: BD
NEW QUESTION 77
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. 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() | |metho
B. ] |
C. Use Opportunit
D. SObjectType.getDescribe().getRecordTypelnfos() to get a list of record types, and iterate through them until [ JisDefaultRecordTypeMapping() is tru
E. Pencil & Paper |
F. Use the Schema.userlnfo.Opportunity.getDefaultRecordType() metho
G. <Create the opportunity and check the opportunity.recordType before inserting, which will have the record ID of the current Dal user's default record type.
Answer: B
NEW QUESTION 80
Consider the following code snippet:
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
NEW QUESTION 82
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
NEW QUESTION 85
A developer wants to invoke on outbound message when a record meets a specific criteria. Which three features satisfy this use case?
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: ABC
NEW QUESTION 90
In the Lightning UI, where should a developer look to find information about a Paused Flow Interview?
Answer: B
NEW QUESTION 93
A developer wrote an Apex method to update a list of Contacts and wants to make it available for use by Lightning web components.
Which annotation should the developer add to the Apex method to achieve this?
A)
B)
C)
D)
A. Option
B. Option
C. Option
D. Option
Answer: B
NEW QUESTION 98
How should a developer write unit tests for a private method in an Apex class?
Answer: C
NEW QUESTION 99
which statement is true regarding execution order when triggers are associated to the same object and event?
Answer: A
Answer: B
Answer: AB
A. FIND 'Universal Containers' IN Name Fields RETURNING leadjid, name), accounted, name), contacted, name)
B. FIND Universal Containers' IN CompanyName Fietds RETURNING lead{l
C. name), accounted, name), contacted, name)
D. SELECT lead(id, name). accountOd, name), contacted, name) FROM Lead, Account, Contact WHERE Name = "universal Containers'
E. SELECT Lead.i
F. Lead.Name, Account.Id, AccountName, Contacted, Contact.Name FROM Lead, Account, Contact WHERE CompanvName * Universal Containers'
Answer: A
Answer: AC
A. Bulk API
B. Tooling API
C. Setup Menu
D. Salesforce DX
E. Metadata API.
Answer: BCD
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
A. Use WITH SECURITY_ENFORCED in the SOQL that fetches the data for the component.
B. Use Securit
C. stripInaccessible to remove fields inaccessible to the current user.
D. Use Lightning Data Service to get the collection of sales records.
E. Use Lightning Locker Service to enforce sharing rules and field-level security.
Answer: B
A. @future
B. @RemoteAction
C. @InvocableMethod
D. @AuraEnaled
Answer: C
B)
C)
D)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Answer: C
Answer: BDE
Answer: D
Answer: CD
A. An Apex controller
B. An Apex REST class
C. An outbound message
D. An invocable method
Answer: B
Answer: B
Answer: D
Answer: A
A. Public class CreditcardPayment extends Payment {public override void makePayment(Decimal amount) { /*implementation*/ }}
B. Public class CreditCardPayment implements Payment {public virtual void makePayment(Decimal amount) { /*implementation*/ }}
C. Public class CreditCardPayment extends Payment {public virtual void makePayment(Decimal amount) { /*implementation*/ }}
D. Public class CreditCardPayment implements Payment {public override void makePayment(Decimal amount) { /*Implementation*/ }}
Answer: A
Answer: AB
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.
C. Developer and Developer Pro sandboxes have different storage limits.
D. Data import wizard is a client application provided by Salesforce.
Answer: CD
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
Answer: D
A. Public class CheckPaymentProcessor implements PaymentProcessor { public void pay(Decimal amount) {}}
B. Public class CheckPaymentProcessor implements PaymentProcessor { public void pay(Decimal amount);}
C. Public class CheckPaymentProcessor extends PaymentProcessor { public void pay(Decimal amount);}
D. Public class CheckPaymentProcessor extends PaymentProcessor { public void pay(Decimal amount) {}}
Answer: B
* Platform-Developer-I Most Realistic Questions that Guarantee you a Pass on Your FirstTry
* Platform-Developer-I Practice Test Questions in Multiple Choice Formats and Updatesfor 1 Year