Salesforce Certified Platform Developer 1 (SP25) Questions and Answers
A developer creates a batch Apex job to update a large number of records, and receives reports of the job timing out and not completing.
What is the first step towards troubleshooting the issue?
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?
Universal Containers has a 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?
Given the following Anonymous block:
What should a developer consider for an environment that has over 10,000 Case records?
What should a developer consider for an environment that has over 10,000 Case records?
A developer is implementing an Apex class for a financial system. Within the class, the variables 'creditAmount' and 'debitAmount' 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
What should be used to create scratch orgs?
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?
Which three data types can a SOQL query return?
Choose 3 answers
The orderHelper class is a utility class that contains business logic for processing orders. Consider the following code snippet:
Public class without sharing orderHelper {// code implementation
}
A developer needs to create a constant named delivery_multiplier 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 multiplier constant to meet the business objectives?
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?
Universal Containers decided to transition from Classic to Lightning Experience. They asked a developer to replace a JavaScript button that was being used to create records with prepopulated values.
What can the developer use to accomplish this?
(Full question statement)
Universal Containers wants Opportunities to no longer be editable when they reach the Closed/Wonstage.
Which two strategies can a developer use to accomplish this?
Choose 2 answers.
While working in a sandbox, an Apex test fails when run in the Test Runner. However, executing the Apex logic in the Execute Anonymous window succeeds with no exceptions or errors.
Why did the method fail in the sandbox test framework but succeed in the Developer Console?
(Full question statement)
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?
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 Primaryld_c custom field exists on the Candidate _c¢ custom object. The field 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 .. 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?
What are two ways for a developer to execute tests in an org?
Choose 2 answers
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?
Given the following Apex statement:
Account myAccount = [SELECT Id, Name FROM Account);
What occurs when more than one Account is returned by the SOQL query?
What are two benefits of using External IDs?
Choose 2 answers
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 has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violations to the user.
How can the developer make sure that validation rule violations are displayed?
What should a developer use to fix a Lightning web component bug in a sandbox?
In the following example, which sharing context will myMethod execute when it is invoked?
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?
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?
What are two benefits of using declarative customizations over code?
Choose 2 answer
The value of the account type field is not being displayed correctly on the page. Assuming the custom controller is properly referenced on the Visualforce page, what should the developer do to correct the problem?
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 developer is designing a new application on the Salesforce platform and wants to ensure it can support multiple tenants effectively.
Which design framework should the developer consider to ensure scalability and maintainability?
A lead developer creates an Apex interface called Laptop.
Consider the following code snippet:
apex
CopyEdit
public class SilverLaptop {
// code implementation
}
How can a developer use the Laptop interface within the SilverLaptop class?
Universal Containers has a Visualforce page that displays a table of every Container__c being rented by a given Account. Recently this page is failing 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?
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 developer wants to mark each Account in a List
Which Apex technique should the developer use?
A developer created this Apex trigger that calls MyClass.mystaticMethod:
The developer creates a test class with a test method that calls MyClass.myStaticMethod 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?
Universal Containers needs to create a custom user interface component that allows users to enter information about their accounts.
The component should be able to validate the user input before saving the information to the database.
What is the best technology to create this component?
When the code executes, a DML exception is thrown.
How should a developer modify the code to ensure exceptions are handled gracefully?
(Full question statement)
Which statement generates a list ofLeadsandContactsthat have a field containing the phrase "ACME"?
Universal Containers (UC) processes orders in Salesforce in a custom object, Order__c. They also allow sales reps to upload CSV files with thousands of orders at a time.
A developer is tasked with integrating orders placed in Salesforce with UC's enterprise resource planning (ERP) system.
After the status for an Order__c is first set to 'Placed', the order information must be sent to a REST endpoint in the ERP system that can
process one order at a time.
What should the developer implement to accomplish this?
Which three steps allow a custom Scalable Vector Graphic (SVG) to be included in a Lightning web component?
Choose 3 answers
A developer wants to send an outbound message when a record meets a specific criteria.
Which two features satisfy this use case?
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?
Which code in a Visualforce page and/or controller might present a security vulnerability?
Consider the following code snippet:
apex
CopyEdit
public class with sharing AccountsController {
@AuraEnabled
public List
return [SELECT Id, Name, Industry FROM Account];
}
}
Apex Test Class Snippet:
apex
CopyEdit
@isTest
private class with sharing AccountsController_Test {
@testSetup
private static void makeData(){
User user1 = [SELECT Id FROM User WHERE Profile.Name = 'System Administrator' AND isActive = true LIMIT 1];
User user2 = [SELECT Id FROM User WHERE Profile.Name = 'Standard User' AND UserName = 'test@test.com' AND isActive = true LIMIT 1];
TestUtils.insertAccounts(10, user1.Id);
TestUtils.insertAccounts(20, user2.Id);
}
@isTest
private static void getAllAccounts_StandardUser_Test(){
List
System.assertEquals(20, result.size());
}
}
When the test class runs, the assertion fails.
Which change should the developer implement in the Apex test method to ensure the test method executes successfully?
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?
Assuming that name is a String obtained by a Visualforce page, which two SOQL queries performed are safe from SOQL injection? (Choose two.)
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?
A developer is integrating with a legacy on-premise SQL database.
What should the developer use to ensure the data being integrated is matched to the right records in Salesforce?
If Apex code executes inside the execute() method of an Apex class when implementing the Batchable interface, which two statements are true regarding governor limits?
Choose 2 answers
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 all it's trainers?
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?
Which annotation exposes an Apex class as a RESTful web service?
Which two characteristics are true for Lightning Web Component custom events?
Choose 2 answers
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 another custom object called PostalCodeToTimezone__c.
What is the optimal way to implement this feature?
Where are two locations a developer can look to find information about the status of batch or future methods?
Choose 2 answers
Developers at Universal Containers (UC) use version control to share their code changes, but they notice that when they deploy their code to different environments they often have failures. They decide to set up Continuous Integration (CI).
What should the UC development team use to automatically run tests as part of their CI process?
A company decides to implement a new process where every time an Opportunity is created, a follow up Task should be created and assigned to the Opportunity Owner.
What is the most efficient way for a developer to implement this?
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?
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-level permissions on Salary__c?
What should a developer use to obtain the Id and Name of all the Leads, Accounts, and Contacts that have the company name "Universal Containers?
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.
What should a developer use to satisfy this requirement?