Salesforce Certified Platform Developer 1 (SP25) Questions and Answers
A developer deployed a trigger to update the status__c of Assets related to an Account when the Account’s status changes and a nightly integration that updates Accounts in bulk has started to fail with limit failures.
What should the developer change about the code to address the failure while still having the code update all of the Assets correctly?
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?
What is a considerations for running a flow in debug mode?
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?
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?
Managers at Universal Containers want to ensure that only decommissioned containers are able to be deleted in the system. To meet the business requirement a Salesforce developer adds "Decommissioned" as a picklist value for the Status _c custom field within the Container _c object.
Which two approaches could a developer use to enforce only Container records with a status of "Decommissioned" can be deleted?
Choose 2 answers
A developer completed modifications 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 them to the production environment?
Choose 2 answers
Which three steps allow a custom Scalable Vector Graphic (SVG) to be included in a Lightning web component?
Choose 3 answers
Universal Containers has developed custom Apex code and Lightning Components in a Sandbox environment. They need to deploy
the code and associated configurations to the Production environment.
What is the recommended process for deploying the code and configurations to Production?
A company has a custom object, order __c, that has a required, unique external ID field called order Number__c.
Which statement should be used to perform the DML necessary to insert new records and update existing records in a list of Order __c records
using the external ID field?
A developer created a child Lightning web component nested inside a parent Lightning web component. The parent component needs to pass a string value to the child component.
In which two ways can this be accomplished?
Choose 2 answers
Consider the following code snippet:
public static List
List
for (Id leadId : leadIds) {
result.add([SELECT FIELDS(ALL) FROM Lead WHERE Id = :leadId]);
}
return result;
}
Given the multi-tenant architecture of the Salesforce platform, what is a best practice a developer should implement to ensure successful execution of the method?
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?
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?
Universal Hiring uses Salesforce to capture job applications. A salesforce administrator created two custom objects; Job__c acting as the master object, to Application_c acting as the detail.
Within the Job__c object, a custom multi-select picklist, preferred _Locations__c, contains a list of approved states for the position. Each Job_Application__c record relates to a Contact within the system through a master-detail relationship.
Recruiters have requested the ability to view whether the Contact's Mailing State value matches a value selected on the Preferred Locations__c field, within the Job_Application__c record. Recruiters would like this value to be kept in sync if changes occur to the Contact's Mailing State.
What is the recommended tool a developer should use to meet the business requirement?
Refer to the component code requirements below:
Requirements:
For mobile devices, the information should display in three rows.
For desktops and tablets, the information should display in a single row.
Requirement 2 is not displaying as desired.
Which option has the correct component code to meet the requirements for desktops and tablets?
A developer must implement a CheckPaymentProcessor class that provides check processing payment capabilities that adhere to what is defined for payments in the PaymentProcessor interface.
apex
Copy
public interface PaymentProcessor {
void pay(Decimal amount);
}
Which is the correct implementation to use the PaymentProcessor interface class?
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?
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 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?
What should be used to create scratch orgs?
When importing and exporting data into Salesforce, which two statements are true?
Choose 2 answers
Which action causes a before trigger to fire by default for Accounts?
Which code statement includes an Apex method named updateAccounts in the class AccountController for use in a Lightning web component?
What are two benefits of using declarative customizations over code?
Choose 2 answer
A lead developer creates a virtual class called "OrderRequest". Consider the following code snippet:
Public class CustomerOrder {
//code implementation
}
How can a developer use the OrderRequest class within the CustomerOrder class?
What are two benefits of using External IDs?
Choose 2 answers
What should a developer use to fix a Lightning web component bug in a sandbox?
A custom picklist field, Pool Preference ¢, exists 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 optimal way to ensure a value is selected every time a record is saved?
A developer needs to allow users to complete a form on an Account record that will create a record for a custom object.
The form needs to display different fields depending on the user’s job role, The functionality should only be available to a small group of users.
Which three things should the developer do to satisfy these requirements?
Choose 3 answers
Which code in a Visualforce page and/or controller might present a security vulnerability?
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
What is a benefit of developing applications
Universal Containers (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 add to create the most efficient model that supports the business need?
A developer is tasked with building a custom Lightning web component to collect Contact information.
The form will be shared among many different types of users in the org. There are security requirements that only certain fields should be edited and viewed by certain groups of users.
What should the developer use in their Lightning Web Component to support the security requirements?
A developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunityLineltem trigger.
Which method allows access to the price book?
Which Lightning Web Component custom event property settings enable the event to bubble up the containment hierarchy and cross
the Shadow DOM boundary?
Which statement describes the execution order when triggers are associated to the same object and event?
Which statement should be used to allow some of the records in a list of records to be inserted if others fail to be inserted?
What are three characteristics of change set deployments?
Choose 3 answers Sending a change set between two orgs requires a deployment connection.
How many Accounts will be inserted by the following block of code?
A developer creates a Lightning web component that imports a method within an Apex class. When a Validate button is pressed, the method runs to execute complex validations.
In this implementation scenario, which two options are.. of the Controller according to the MVC architecture?
Choose 2 answers
A development team wants to use a deployment script to automatically deploy to a sandbox during their development cycles.
Which two tools can they use to run a script that deploys to a sandbox?
Choose 2 answers
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 developer is working on a project to import data from an external system into Salesforce. The data contains sensitive information that should not be visible to all users in Salesforce.
What should the developer do to ensure that the data is secure?
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?
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 business has a proprietary Order Management System (OMS) that creates orders from its website and fulfills the orders. When the order is created in the OMS, an integration also creates an order record inSalesforce and relates it to the contact as identified by the email on the order. As the order goes through different stages in the OMS, the integration also updates it in Salesforce.
The business notices that each update from the OMS creates a new order record in Salesforce.
Which two actions should prevent the duplicate order records from being created in Salesforce?
Choose 2 answers
A developer created a trigger on the Account object. While testing the trigger, the developer sees the error message ‘Maximum trigger depth exceeded’.
What could be the possible causes?
What are three considerations when using the @lnvocableMethod annotation in Apex?
Choose 3 answers
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
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?
A developer must provide custom user interfaces when users edit a Contact in either Salesforce Classic or Lightning Experience.
What should the developer use to override the Contact's Edit button and provide this functionality?
Which three resources in an Aura component can contain JavaScript functions?
Choose 3 answers
A developer is alerted to an issue with a custom Apex trigger that is causing records to be duplicated.
What is the most appropriate debugging approach to troubleshoot the issue?
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?
Which two are phases in the Aura application event propagation framework?
Choose 2 answers
Management asked for opportunities to be automatically created for accounts with annual revenue greater than $1, 000,000. A developer created the following trigger on the Account object to satisfy this requirement.
for (Account a : Trigger.new) {
if (a.AnnualRevenue > 1000000) {
List
if (oppList.size() == 0) {
Opportunity oppty = new Opportunity(Name = a.Name, StageName = 'Prospecting', CloseDate = System.today().addDays(30));
insert oppty;
}
}
}
Users are able to update the account records via the UI and can see an opportunity created for high annual revenue accounts. However, when the administrator tries to upload a list of 179 accounts using Data Loader, it fails with system, Exception errors.
Which two actions should the developer take to fix the code segment shown above?
Choose 2. answers
Which three code lines are required to create a Lightning component on a Visualforce page?
Choose 3 answers.
Universal Containers (UC) is developing a process for their sales teams that requires all sales reps to go through a set of scripted steps with each new customer they create.
In the first step of collecting information, UC's ERP system must be checked via a REST endpoint to see if the customer exists. If the customer exists, the data must be presented to the sales rep in Salesforce.
Which two should a developer implement to satisfy the requirements?
Choose 2 answers
In terms of the MVC paradigm, what are two advantages of implementing the view layer of a Salesforce application using Lightning Web Component-based development over Visualforce?
Choose 2 answers