A developer is creating a Lightning web component to show a 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?
Refer to the following Apex code:
What is the value of x when it is written to the debug log?
The following Apex method is part of the Contactservice class that is called from a trigger:
How should the developer modify the code to ensure best practices are met?
A)
B)
C)
D)
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?
A developer is migrating a Visualforce page into a Lightning web component.
Salesforce Certified Platform Developer I
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?
A developer completed modifications to a customized feature that is comprised of two elements:
* Apex trigger
* Trigger handler Apex class
What are two factors that the developer must take into account to properly deploy the modification to the production environment?
Choose 2 answers
What are three ways for a developer to execute tests in an org?
Choose 3 answers
What are two considerations for deploying from a sandbox to production? Choose 2 answers
Which two are best practices when it comes to Aura component and application event handling?
Choose 2 answers
A developer is asked to write helper methods that create test data for unit tests.
What should be changed in the TestUtils class so that its methods are only usable by unit test methods?
A developer created a Visualforce page and custom controller to display the account type field as shown below.
Custom controller code:
Visualforce page snippet:
what should the developer do to correct the problem?
A developer created this Apex trigger that calls MyClass.myStaticMsthod:
The developer creates a test class with a test method that calls Myclass.myStacicMethod directly, resulting in 81% overall code coverage.
What happens when the developer tries to deploy the trigger and two classes to production, assuming no other code exists?
What happens when the developer tries to deploy the trigger and two classes to production, assuming no other code exists?
A developer created a trigger on a custom object. This custom object also has some dependent pick lists.
According to the order of execution rules, which step happens first?
What should a developer do to check the code coverage of a class after running all tests?
Universal Containers decides to use purely declarative development to build out a new Salesforce application.
Which two options can be used to build out the business logic layer for this application?
Choose 2 answers
Universal Containers wants to automatically assign new cases to the appropriate support representative based on the case origin. They have created a custom field on the Case object to store the support
representative name.
What is the best solution to assign the case to the appropriate support representative?
A developer identifies the following triggers on the Expense__c object:
The triggers process before delete, before insert, and before update events respectively.
Which two techniques should the developer implement to ensure trigger best practices are followed?
Choose 2 answers
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 query performance?
A developer created these three Rollup Summary fields in the custom object, project_ c:
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 developer wants to import 500 Opportunity records into a sandbox.
Why should the developer choose to use Data Loader instead of Data Import Wizard?
Which two are phases in the Aura application event propagation framework?
Choose 2 answers
A developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunitylLineltem trigger.
Which method allows access to the price book?
When importing and exporting data into Salesforce, which two statements are true? Choose 2 answers
What are two benefits of using External IDs? Choose 2 answers
Consider the following code snippet for a Visualforce page that is launched using a Custom Button on the Account detail page layout.
When the Save button is pressed the developer must perform a complex validation that involves multiple objects and, upon success, redirect the user to another Visualforce
page.
What can the developer use to meet this business requirement?
The Account object in an organization has a master-detail relationship to a child object called Branch. The following automations exist:
Roll-up summary fields
Custom validation rules
Duplicate rules
developer created a trigger on the Account object.
Which two things should the developer consider while testing the trigger code?
Choose 2 answers
Which two characteristics are true for Lightning Web Component custom events? Choose 2 answers
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:
What are two ways the developer can update the method to prevent a SOQL injection attack?
Choose 2 answers
A developer needs to prevent the creation of Request__c records when certain conditions exist in the system. A RequestLogic class exists that checks the conditions.
What is the correct implementation?
A)
B)
C)
D)
Universal Containers (UC) uses out-of-the-box order management, that has a Master-Detail relationship between Order and Order Line Item.
UC stores the availability date on each Order Line Item and Orders are only shipped when all of the Order Line Items are available.
Which method should be used to calculate the estimated ship date for an Order?
A developer created a new after insert trigger on the Lead object that creates Task records for each Lead.
After deploying to production, an existing outside integration that inserts Lead records in batches to Salesforce is occasionally reporting total batch failures being caused by the Task insert statement. This causes the integration process in the outside system to stop, requiring a manual restart.
Which change should the developer make to allow the integration to continue when some records in a batch cause failure due to the Task insert statement, so that manual restarts are not needed?
What are three considerations when using the @InvocableMethod annotation in Apex?
Choose 3 answers
Universal Containers wants to assess the advantages of declarative development versus programmatic customization for specific use cases in its Salesforce implementation.
What are two characteristics of declarative development over programmatic customization?
Choose 2 answers
What can be used to override the Account's standard Edit button for Lightning Experience?
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?
Assuming that name is a String obtained by an
A)
B)
C)
D)
Which code in a Visualforce page and/or controller might present a security vulnerability?
A)
B)
C)
D)
How many Accounts will be inserted by the following block of code?
How does the Lightning Component framework help developers implement solutions faster?
A developer is creating an app that contains multiple Lightning web components.
One of the child components is used for navigation purposes. When a user clicks a button called Next in the child component, the parent component must be alerted so it can navigate to the next page.
How should this be accomplished?
Universal Containers has a support process that allows users to request support from its engineering team using a custom object, Engineering_Support__ c.
Users should be able to associate multiple Engineering_ support___c records to a single Opportunity record. Additionally, aggregate information about the Engineering Support__ c records should be shown on the Opportunity record.
Which relationship field should be implemented to support these requirements?
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?
Which two actions may cause triggers to fire?
Choose 2 answers
Universal Containers wants to ensure that all new leads created in the system have a valid email address. They have already created a validation rule to enforce this requirement, but want to add an additional
layer of validation using automation.
What would be the best solution for this requirement?
Given the following Anonymous block:
What should a developer consider for an environment that has over 10,000 Case records?
What does the Lightning Component framework provide to developers?
Which statement describes the execution order when triggers are associated to the same object and event?
A developer wrote Apex code that calls out to an external system using REST API.
How should a developer write the test to prove the code is working as intended?
What are three characteristics of change set deployments?
Choose 3 answers
Which annotation should a developer use on an Apex method to make it available to be wired to a property in a Lightning web component?
A)
B)
C)
D)
A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces.
Which is the correct implementation?
A)
B)
Which three Salesforce resources can be accessed from a Lightning web component?
Choose 3 answers