platform-developer-i_4
platform-developer-i_4
platform-developer-i_4
Get the Full Platform-Developer-I dumps in VCE and PDF From SurePassExam
https://www.surepassexam.com/Platform-Developer-I-exam-dumps.html (297 New Questions)
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
Which scenario is valid for execution by unit tests?
Answer: B
NEW QUESTION 3
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 4
Which three steps allow a custom SVG to be included in a Lightning web component? Choose 3 answers
Answer: ABC
NEW QUESTION 5
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 6
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
NEW QUESTION 7
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 8
What are three ways for 2 developer to execute tests in an org? Choose 3 answers
A. Metadata APT
B. Bulk API
C. Setup Menu
D. SalesforceDX
E. Tooling API
Answer: CDE
NEW QUESTION 9
What are three capabilities of the <ltng : require> tag when loading JavaScript resources in Aura components? Choose 3 answers
Answer: BCD
NEW QUESTION 10
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.
What should a developer Implement to support these requirements?
Answer: A
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 15
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
NEW QUESTION 17
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 22
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.
Which update should the developer make in the Flow?
Answer: D
NEW QUESTION 27
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 30
Which three resources in an Azure Component can contain JavaScript functions?
A. Controllers
B. helper
C. Design
D. Style
E. Renderer
Answer: ABE
NEW QUESTION 31
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 32
A developer is migrating a Visualforce page into a Lightning web component.
The Visualforce page shows information about a single record. The developer decides to use Lightning Data Service to access record data.
Which security consideration should the developer be aware of?
Answer: A
NEW QUESTION 34
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 38
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
NEW QUESTION 42
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.
B. Set a validation rule to enforce a value is selected.
C. Mark the field as Required on the field definition.
D. Mark the field as Required on the object's page layout.
Answer: C
NEW QUESTION 44
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.
Which two statements are valid considerations when using merged? Choose 2 answers
A. The field values on the master record are overwritten by the records being merged.
B. Merge is supported with accounts, contacts, cases, and leads.
C. External ID fields can be used with the merge method.
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: BD
NEW QUESTION 45
What are three considerations when using the @InvocableMethod annotation in Apex? Choose 3 answers
Answer: CDE
NEW QUESTION 46
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: AC
NEW QUESTION 50
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
NEW QUESTION 53
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 57
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 58
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 59
An Apex method, getAccounts, that returns a list of Accounts given a searchTern, 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)
B)
C)
D)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
NEW QUESTION 64
A developer considers the following snippet of code:
A. 3
B. 1
C. 4
D. 2
Answer: C
NEW QUESTION 68
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
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.
C. Use a regular expression on the parameter to remove special characters.
D. Use the @Readonly annotation and the with sharing keyword on the class.
Answer: AB
NEW QUESTION 73
What are two ways a developer can get the status of an enquered job for a class that queueable interface? Choose 2 answers
Answer: AC
NEW QUESTION 76
A developer is creating a Lightning web component to showa list of sales records.
The Sales Representative user should be able to see the commission field on each record. The Sales Assistant user should be able to see all fields on the record
except the commission field.
How should this be enforced so that the component works for both users without showing any errors?
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
NEW QUESTION 77
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 Can be used within the flow?
A. @future
B. @RemoteAction
C. @InvocableMethod
D. @AuraEnaled
Answer: C
NEW QUESTION 81
Which two sfdx commands can be used to add testing data to a Developer sandbox?
A. Forced: data:bulk:upsert
B. Forced: data: object :upsert
C. Forced: data: tree: upsert
D. Forced: data:async:upsert
Answer: AC
NEW QUESTION 82
Which three statements are true regarding custom exceptions in Apex? (Choose three.)
Answer: BDE
NEW QUESTION 84
How can a developer check the test coverage of active Process Builder and Flows deploying them in a Changing Set?
Answer: D
NEW QUESTION 86
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: CD
NEW QUESTION 88
A company has a custom object, Sales, }_Help_Request__c, that has a Lookup relationship to Opportunity. The Seles Help Request__c has a mumber field,
Number_ct_Hours__c, that represents the amount of time spent on the Sales_Help Request__C.
A developer is tasked with creating a field, total_Hour2__c, on Opportunity that should be the sum of all of the Number_of_Hours_c values for the
Sales_Help_Request__c records related to that Opportunity.
What should the developer use to implement this?
Answer: B
NEW QUESTION 92
A developer is creating an app that contains multiple Lightning web components.
One of the child components is used for navigation purposes. When a user click a button called.. component, the parent component must be alerted so it can
navigate to the next page.
How should this be accomplished?
A. Fire a notification.
B. Update a property on the parent.
C. Call a method in the Apex controller.
D. Create a custom event.
Answer: D
NEW QUESTION 95
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
NEW QUESTION 99
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?
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. 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
Answer: A
Answer: C
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 DMLgovernor 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 messag
D. "SObject row was retrieved via SOQL without querying the requested field Account.Is.Tech__c''.
E. If executed In a synchronous context, the apex transaction is likely to fall by exceeding the DHL governor limit.
Answer: A
Answer: D
* 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